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 92E9642B34; Thu, 18 May 2023 18:46:07 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8A42442D3E; Thu, 18 May 2023 18:45:55 +0200 (CEST) Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by mails.dpdk.org (Postfix) with ESMTP id 5328842D31 for ; Thu, 18 May 2023 18:45:52 +0200 (CEST) Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-64d18d772bdso1057075b3a.3 for ; Thu, 18 May 2023 09:45:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1684428351; x=1687020351; 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=rkmP4yDVJq3cPKNDtzkeSFvJIe3Chqiof/Cw6G7obf8=; b=geNP1WmeebzV9CMsFuCBCe8vNyGQcCZjadKX1pd9m4Y4OtOyrFYjgIbRK9Evjgzg4m fHUTUv/6GtBjRMu1s9103aeVL6RW1WZUTyf0WNr05NSnWbDPhcclF5pHpbL0ph8VsF1w dXNv7rSCLHAdElXLn/gSHyK4+9VSWlIM0wizY+VJZbj6Cej2b8ryB7dQaciy1/sC4f7G xfxrSYnXYxziUgWKLlDDWdMQiSzMKtjukrb48Btw51fkiiu1RQPKPjmAk3ESVMvzSZNX XyAqdU9q3/sF20nn3NDNk/e0G9Ci3RLwi1CiRmTEv7R3iPTerriSO3QKb2EUqkdYubk+ OXTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684428351; x=1687020351; 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=rkmP4yDVJq3cPKNDtzkeSFvJIe3Chqiof/Cw6G7obf8=; b=GrG1Ns9d9u8OMcm1hF+6otSOY5rl2D6cddNU53hqqtN+qrBa/hjxrTjxiOaPDTO8b1 Wq9OXEjfqqbBVoYF7QcIwWowi0n2yg4bMmsqfsc/smYBsy/Lahl/Jf7BFcg+TzEd4+Ig v70vjds54xxTh1vsymfVPC8OIve3pfD2QQ8UDZtWO2HpVV4EJow7BGnYHDSYPQId/J2e 50wDarswYcBHN0TrhWpCy7jMfOa04FNdg2v0aZqB0IA9UkfdDMESy4JNddJu5XJP2+HS L9meP77ec0Haxb4rt8lnb1p6NLQvVNuUHZdxo9odkNHTxxVpcDBmE7menr4q/4UBSPL7 D9bQ== X-Gm-Message-State: AC+VfDzY8e3K6/ZmD9ntNDM35iPkUBnuKUABMKHWf5rythlmAhJ2OXLh dVuyDZ/b6urpFKKBohULg6UaQdL02kP7o9CdBMWIbjqS X-Google-Smtp-Source: ACHHUZ70kWSg9EkZtu1wYdlyUTajc6MAi20Zzrl/AuLGe1KU+VGSVvcdWnzFFzWvOa9ko4SIzQn4hQ== X-Received: by 2002:a05:6a20:1443:b0:105:9ca9:56aa with SMTP id a3-20020a056a20144300b001059ca956aamr561933pzi.0.1684428351082; Thu, 18 May 2023 09:45:51 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id j7-20020a62e907000000b005e0699464e3sm1513579pfh.206.2023.05.18.09.45.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 May 2023 09:45:50 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Anatoly Burakov , Jerin Jacob , Sunil Kumar Kori , Bruce Richardson , Dmitry Kozlyuk , Narcisa Ana Maria Vasile , Dmitry Malloy , Pallavi Kadam Subject: [PATCH v2 02/19] eal: replace use of sanity check in comments and messages Date: Thu, 18 May 2023 09:45:29 -0700 Message-Id: <20230518164546.108105-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230518164546.108105-1-stephen@networkplumber.org> References: <20230517161603.117728-1-stephen@networkplumber.org> <20230518164546.108105-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. Acked-by: Anatoly Burakov Signed-off-by: Stephen Hemminger --- 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 e21fc7cfaecc..f99c6b43c885 100644 --- a/lib/eal/common/eal_common_memory.c +++ b/lib/eal/common/eal_common_memory.c @@ -560,7 +560,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) { RTE_LOG(ERR, EAL, "wrong dma mask size %u (Max: %u)\n", diff --git a/lib/eal/common/eal_common_proc.c b/lib/eal/common/eal_common_proc.c index 1fc1d6c53bd2..972f3269d8ae 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) { RTE_LOG(ERR, EAL, "invalid number of fd's received\n"); return -1; diff --git a/lib/eal/common/eal_common_trace.c b/lib/eal/common/eal_common_trace.c index cb980af06d9f..cadb85b94fde 100644 --- a/lib/eal/common/eal_common_trace.c +++ b/lib/eal/common/eal_common_trace.c @@ -465,7 +465,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 ea013a9daf17..dc7ef18dc11b 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 ebafef3f6cf2..e632c395132c 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 7daf22e31449..d3499dd5906d 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 ae323cd492d4..251aa533b274 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 033825c14c67..17a5f9d1ba30 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.39.2