From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A72D443A3D; Mon, 5 Feb 2024 19:04:30 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BF53D40ED8; Mon, 5 Feb 2024 19:03:47 +0100 (CET) Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) by mails.dpdk.org (Postfix) with ESMTP id DC88340269 for ; Mon, 5 Feb 2024 19:03:44 +0100 (CET) Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-1d958e0d73dso27441465ad.1 for ; Mon, 05 Feb 2024 10:03:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1707156224; x=1707761024; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ApPm79+YUtT09EP+FY3CN8Jd9NvPoernSgFeoMJrzko=; b=YTY7Nb/lM8AWmgehOyuoZoLILsBPLHOfivJeCE6XvWfinqytVQ0bXQtfW8pFTUZaLM 3kDjb6nt5DZYieoPAL4Ix1Ofoq4baR7wyuCgCIU+9eEsNWyLVpeuxxTyS387xMUVI+NQ jDwAMLjKzJTnDZew1R7gMCR2iHmZFt7Ds4OcUh9lTiLmw/mN7TilvflvQ7lQEOhfRdhy lVjYqFPsEdbQuzSK0022FlvvqAaq4oc9XsntB7+C/i11RnJmF8i03OSb1mSYJ99UevFP HyeY1yUipdnPEzXpnRgG2724aZVkgBh15cDXvF9ycPRkIdphF6jS2eC1AS64ikxlbUiX ssBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707156224; x=1707761024; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ApPm79+YUtT09EP+FY3CN8Jd9NvPoernSgFeoMJrzko=; b=AWYFNg7FLnq9bHjnDcz3ecnRB2YpC4U1wUL+wpDzKet/+5g9Csmpn0PFXW5zacDCd0 dJqgyptJyS4s8eCIrryqQndTQrdh9HGQ2e79u67OWqcxESItF65wOJSZCp1caX/ADAVu bxVuNnbvYROI4IwbjKLZD2zV7mw7hrIG1q8ie4Jn4ONQUR/Xjxkj6s7duo1vLooH4/IB P8+OLLXbZRTsHqbcwpux5cZYtYaBlmXMDdb+bvHvUCxh6e3iDkeGJ/cj9AbkyYjCiqtq 7blMJqf6e9A1zcy1x00h1IjUf/akyIdT2n1CGdkmFcH/d3sArc4OcZtPOy47rHZFPbie zacQ== X-Gm-Message-State: AOJu0YxJt6c/yAM+RHcWvD2/nDDuNNEcRF/GrPS1uBPW6+s8vqJqWWXS dxtL5uNCU4n1mJwdz/D4TjHLKqSTichnVYI10Bdi4BwihsR6VUKJcUWppuCdRHQRmI/T+r6f9q4 b3fM= X-Google-Smtp-Source: AGHT+IFj7BcOaA2GeW2bEZq9MYJr9R0b+pHl8OajeFJvEpmbWqGVdl8IDZewrhEyYuB+PWtppROXcg== X-Received: by 2002:a17:902:fc90:b0:1d7:17e6:44fb with SMTP id mf16-20020a170902fc9000b001d717e644fbmr7334960plb.32.1707156224065; Mon, 05 Feb 2024 10:03:44 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCVyqY4nkmaF49BRyPGLnJGfAfZa17LrDGHxYH7t+E3OZCOa/0u8dbeBw3SU770iTgmbbUqkyCc0+p0NaNsrtvQFcTkx1dsxC2f39uZ+vQ3zWRuQxVgX5DIcgad6EhLrrP7RhCWrjLbjWkld8YQkSAkkLBH359euMN69dqvTOty4E0qmBsRvX80TWCoNcDecy+7+r6vKR83Xs8TlDk2uTwg5pizaLq93m+7xQU8H4YiAeTZYGc8H+FxQ3RziLM++DnWGdn8qNNd3w/sJ+gjaY+C+pLsN9y5US0ufUX4BmQ== Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id x8-20020a170902b40800b001d9b0a15bbfsm144867plr.262.2024.02.05.10.03.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 10:03:43 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Anatoly Burakov , Jerin Jacob , Sunil Kumar Kori , Bruce Richardson , Dmitry Kozlyuk , Tyler Retzlaff , Pallavi Kadam Subject: [PATCH v9 06/23] eal: replace use of sanity check in comments and messages Date: Mon, 5 Feb 2024 09:43:34 -0800 Message-ID: <20240205180328.131019-7-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240205180328.131019-1-stephen@networkplumber.org> References: <0230331200824.195294-1-stephen@networkplumber.org> <20240205180328.131019-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sanity check is on the Tier 2 non-inclusive list. Replace or remove it. Signed-off-by: Stephen Hemminger Acked-by: Anatoly Burakov --- lib/eal/common/eal_common_memory.c | 2 +- lib/eal/common/eal_common_proc.c | 3 ++- lib/eal/common/eal_common_trace.c | 2 +- lib/eal/common/eal_memcfg.h | 2 +- lib/eal/common/rte_malloc.c | 2 +- lib/eal/freebsd/eal.c | 2 +- lib/eal/linux/eal.c | 2 +- lib/eal/windows/eal.c | 2 +- 8 files changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/eal/common/eal_common_memory.c b/lib/eal/common/eal_common_memory.c index 60ddc30580a7..9f4a8676f18f 100644 --- a/lib/eal/common/eal_common_memory.c +++ b/lib/eal/common/eal_common_memory.c @@ -562,7 +562,7 @@ check_dma_mask(uint8_t maskbits, bool thread_unsafe) uint64_t mask; int ret; - /* Sanity check. We only check width can be managed with 64 bits + /* We only check width can be managed with 64 bits * variables. Indeed any higher value is likely wrong. */ if (maskbits > MAX_DMA_MASK_BITS) { EAL_LOG(ERR, "wrong dma mask size %u (Max: %u)", diff --git a/lib/eal/common/eal_common_proc.c b/lib/eal/common/eal_common_proc.c index d24093937c1d..838602edef08 100644 --- a/lib/eal/common/eal_common_proc.c +++ b/lib/eal/common/eal_common_proc.c @@ -309,7 +309,8 @@ read_msg(int fd, struct mp_msg_internal *m, struct sockaddr_un *s) break; } } - /* sanity-check the response */ + + /* Check that the response is valid */ if (m->msg.num_fds < 0 || m->msg.num_fds > RTE_MP_MAX_FD_NUM) { EAL_LOG(ERR, "invalid number of fd's received"); return -1; diff --git a/lib/eal/common/eal_common_trace.c b/lib/eal/common/eal_common_trace.c index 6ad87fc0df5d..b2bab5c45f1e 100644 --- a/lib/eal/common/eal_common_trace.c +++ b/lib/eal/common/eal_common_trace.c @@ -468,7 +468,7 @@ __rte_trace_point_register(rte_trace_point_t *handle, const char *name, struct trace_point *tp; uint16_t sz; - /* Sanity checks of arguments */ + /* Check arguments */ if (name == NULL || register_fn == NULL || handle == NULL) { trace_err("invalid arguments"); rte_errno = EINVAL; diff --git a/lib/eal/common/eal_memcfg.h b/lib/eal/common/eal_memcfg.h index 60e2089797a2..e8a85df35585 100644 --- a/lib/eal/common/eal_memcfg.h +++ b/lib/eal/common/eal_memcfg.h @@ -18,7 +18,7 @@ * Memory configuration shared across multiple processes. */ struct rte_mem_config { - volatile uint32_t magic; /**< Magic number - sanity check. */ + volatile uint32_t magic; /**< Magic number check. */ uint32_t version; /**< Prevent secondary processes using different DPDK versions. */ diff --git a/lib/eal/common/rte_malloc.c b/lib/eal/common/rte_malloc.c index 6d3c301a2368..dac077bc8e09 100644 --- a/lib/eal/common/rte_malloc.c +++ b/lib/eal/common/rte_malloc.c @@ -654,7 +654,7 @@ rte_malloc_heap_destroy(const char *heap_name) ret = -1; goto unlock; } - /* sanity checks done, now we can destroy the heap */ + /* checks done, now we can destroy the heap */ rte_spinlock_lock(&heap->lock); ret = malloc_heap_destroy(heap); rte_spinlock_unlock(&heap->lock); diff --git a/lib/eal/freebsd/eal.c b/lib/eal/freebsd/eal.c index bab77118e967..1500778b4f06 100644 --- a/lib/eal/freebsd/eal.c +++ b/lib/eal/freebsd/eal.c @@ -501,7 +501,7 @@ eal_parse_args(int argc, char **argv) goto out; } - /* sanity checks */ + /* options checks */ if (eal_check_common_options(internal_conf) != 0) { eal_usage(prgname); ret = -1; diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c index fd422f1f6236..50cebdbbd481 100644 --- a/lib/eal/linux/eal.c +++ b/lib/eal/linux/eal.c @@ -803,7 +803,7 @@ eal_parse_args(int argc, char **argv) goto out; } - /* sanity checks */ + /* options checks */ if (eal_check_common_options(internal_conf) != 0) { eal_usage(prgname); ret = -1; diff --git a/lib/eal/windows/eal.c b/lib/eal/windows/eal.c index 52f0e7462dd8..915c8e569a5d 100644 --- a/lib/eal/windows/eal.c +++ b/lib/eal/windows/eal.c @@ -194,7 +194,7 @@ eal_parse_args(int argc, char **argv) if (eal_adjust_config(internal_conf) != 0) return -1; - /* sanity checks */ + /* options checks */ if (eal_check_common_options(internal_conf) != 0) { eal_usage(prgname); return -1; -- 2.43.0