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 0759044107; Thu, 30 May 2024 01:39:07 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EA5A040A6C; Thu, 30 May 2024 01:38:57 +0200 (CEST) Received: from mail-pj1-f41.google.com (mail-pj1-f41.google.com [209.85.216.41]) by mails.dpdk.org (Postfix) with ESMTP id 9FA0F40289 for ; Thu, 30 May 2024 01:38:17 +0200 (CEST) Received: by mail-pj1-f41.google.com with SMTP id 98e67ed59e1d1-2c1a16805f9so411629a91.0 for ; Wed, 29 May 2024 16:38:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1717025897; x=1717630697; 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=QvV2qmdLs4RKcERhNJ4V15AwUB0YcGmKeHwuxo7W6+c=; b=tTmUTkr8l3sT9TXEXTE8c3KDAs9kjIcYy9KvoCEz5eh5yNjSLeY+IFQ4jd5Ekv+YFg YOMppKpiabuGUjJf0CrnInvVzDH9VT0q9uyc6hCKZdp3WYVrF05vtN0iz+6PI98YmNHB auS3LdiqaLB6PFnRhmXc+KAB/H8TTK/VOtWY2Rhin+F9/yhlgrRm/bnNwIbTiidcx3iY 7M5a0sqKHT155oNUAINvFYvQeDIcn/6pXDx+ZZP0ezMlPZjkuek1aNmFumIswmb8DWkn u4tyRVvpy4qCJEWr8Y9aXA+VOLcbvh6VnMGmrgSnOYhFwbTcMha86UcOc5GKKSD2Hxmp 7Eyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717025897; x=1717630697; 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=QvV2qmdLs4RKcERhNJ4V15AwUB0YcGmKeHwuxo7W6+c=; b=wbZesPeLIGe5yQzwAXBiLXSIrsiWxMTgPkh2rrBUlG1hmv7159f5d6c8wCe2YtHxY8 T8qWoUkBCPP3x4CEXTqTywY6bAARPmQpjHa+W1zRa7aGgqnRrdVAiBypKFhaajZxfihh BjoJsJaOsDp/ljde2EworJmnrDOjoOzYe70yZhB3l7PepUk3Pbmd1NqN/0g+z8DHkcT8 9PKDijnw3HbrSg1zMn/3ZlITglvwxaBRqC++14qQpEdsndIYSsr/09tPkzU/3OG1r8wR K9jMjUThHbCa4jY4KlC3WthfB7pkn6G5ePlgjT9KW3MyTb2jNqY7n13vCW75MRe83g94 vBsA== X-Gm-Message-State: AOJu0Yzq7HWabH90GPz6/g3I5YHo4I/ZwWxGd+xzksNeXVXeePdHSpWD Sub9W8BuFFyzMSZJEdW5s4hVB7tU8TmrY7EEnKuL5sLkcUKl0A2hUu997TrJCyQaVqPsgd3rEgZ F X-Google-Smtp-Source: AGHT+IGz9udbv7jY0fO2st+rhHQ3nWr8CbQSYlgOKfFodtM5Rq4HFt8255y5xjNtvYXW8InqjmKoQQ== X-Received: by 2002:a17:90a:f00c:b0:2c1:a546:350d with SMTP id 98e67ed59e1d1-2c1acc2d871mr403123a91.4.1717025896600; Wed, 29 May 2024 16:38:16 -0700 (PDT) Received: from hermes.lan (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2c1a7761d78sm353955a91.12.2024.05.29.16.38.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 16:38:16 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Anatoly Burakov Subject: [PATCH v10 02/20] eal: replace use of sanity check in comments and messages Date: Wed, 29 May 2024 16:33:36 -0700 Message-ID: <20240529233811.663211-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240529233811.663211-1-stephen@networkplumber.org> References: <20240529233811.663211-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 60ddc30580..9f4a8676f1 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 d24093937c..838602edef 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 918f49bf4f..9349f5780d 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 60e2089797..e8a85df355 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 6d3c301a23..dac077bc8e 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 bab77118e9..1500778b4f 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 fd422f1f62..50cebdbbd4 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 52f0e7462d..915c8e569a 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