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 7F33D43403; Wed, 29 Nov 2023 18:31:50 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7BB7842E61; Wed, 29 Nov 2023 18:31:39 +0100 (CET) Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) by mails.dpdk.org (Postfix) with ESMTP id 0CF7742E59 for ; Wed, 29 Nov 2023 18:31:37 +0100 (CET) Received: by mail-pf1-f182.google.com with SMTP id d2e1a72fcca58-6cdcd790f42so1109428b3a.3 for ; Wed, 29 Nov 2023 09:31:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1701279096; x=1701883896; 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=ksJmSbQRBda6mJczmSnP7sVMOFk/rLpepAambJjB4gY=; b=bFBnyepNZ+7PFyu+EB95hN+rB4CgW+Sx62lFzBwyMkr38lK4qdEvR+GVSAH9QZjaHp AftdSrY+paafyxkgvehxfss9VBF5P9lV/REtlnxXj7YvVXZ600mPYHGWMjJ7zBh1BhZy 1aBYtwXjZJQX9LcE7RLGB9Z66Fx5RRX2puDr91Fa8/3UcbLF3JFMD0GCpo0l9DQ6hwpX kg5ONaGztjEP7yywAoVYszkgShiDuRtxdTN2xy9aPbFzLedvVOTvZae+tDW+PJq/WzJS vCXitowOEaIt+/NsXUpsvqsdzsYqY57fvUzxLrhs+Pg7arwjYFFF/5ulJVe+Fy9c7WI8 kNKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701279096; x=1701883896; 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=ksJmSbQRBda6mJczmSnP7sVMOFk/rLpepAambJjB4gY=; b=EvuZ6MvuWgR3DAxQao9GDj7OTjfsPx8ygQwOOBIVk4RjnhEIeGa2ltndrFUmVL7MVy l7UuBbc9921zfSOmljIILT36eKJ3iGSBfB4opxp8AWC/v6ZVT9t0Ixc+cEUJTOseqoV1 lg8NyRSe/g+SAuZ+AT9i8AyeW/PILU0PwdpGX3AwNxFyCwTxe0NJOIQft1M4pIvuGUIW kIa/b3EtIlu0lLB7qdpvwX566C4KUQjB4/Xk0yA2WzZsB60WLrEE8m5orXmhauKdRjDV KHZlp+2Knn1B/RegHPDzGkhS+RLnZNTz/8SBrVu3lkjtCYIVVQ0DPgDtpe8nPHN7HgdD 1Mvw== X-Gm-Message-State: AOJu0Yw+un90kEGQtyl7YyYf6Qx79Fv/5s+zujHDnMMx3rJMinLPKDPE WPJCiN8DYEHdGLQ1qcugiv22WXcFfxP9HEAnB0I= X-Google-Smtp-Source: AGHT+IGvKcNghDbjFQScRKM+FsdmTFPs8ojcjcHyhpEcmGGuRm6fmN0EWBWxEtAzsdjUVbZTdCdSMw== X-Received: by 2002:a05:6a21:a591:b0:18c:138e:f268 with SMTP id gd17-20020a056a21a59100b0018c138ef268mr20181276pzc.21.1701279095987; Wed, 29 Nov 2023 09:31:35 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id y42-20020a056a0003aa00b006baa1cf561dsm10950435pfs.0.2023.11.29.09.31.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 09:31:34 -0800 (PST) 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 v5 02/19] eal: replace use of sanity check in comments and messages Date: Wed, 29 Nov 2023 09:25:56 -0800 Message-ID: <20231129173122.126895-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231129173122.126895-1-stephen@networkplumber.org> References: <20230802232550.125487-1-stephen@networkplumber.org> <20231129173122.126895-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 d9433db62345..27adaf51e5ab 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) { 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 728815c4a968..9f43c3199577 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 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 9db0c399aef0..153f8c8364cd 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 568e06e9ed91..aa71e4e08422 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 57da058cec60..14fd3ce4ec20 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 7ec215221158..3fb1e26f92b8 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.42.0