From patchwork Fri May 19 17:45:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 127115 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3B66942B4B; Fri, 19 May 2023 19:46:30 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D0EFB42D35; Fri, 19 May 2023 19:46:18 +0200 (CEST) Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) by mails.dpdk.org (Postfix) with ESMTP id 46D9342B8B for ; Fri, 19 May 2023 19:46:17 +0200 (CEST) Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-1ae52ce3250so32637355ad.2 for ; Fri, 19 May 2023 10:46:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1684518376; x=1687110376; 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=gp7Zbj4LaQncTo/74G6s7UvUz+0BKFPO9Wlfx4lrYqGYe9XO1qPhTStHKxCdrm9FKv 2X3V8pUtXhtqtdTkm5jS9C7GKpDe5oVelu4MdjVqMHTX0gCW6kBwLf4t3zfJcdUK2hvQ Kn9iJFqbF1RcfgCx9/dc67F9h/LB0GA2VWGzrgEW2gGGl7pdml9rMh82nSbuRjxA5gg2 Avrsz3+aM7FQ0zJ9vRkmQbp9e0vzIw834AKxAzj1yBp7uWAwusoWeVkNJzvvnGWnPNeT uTjofxWepyM8df7ZDmYJ8147l5Y6yNpd9kgUcIN+4fSVf+DV5PBg6zPTHhQzrtF5Krtz ZamA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684518376; x=1687110376; 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=hq7lHNedw3F+sMsJioDd/ss8S3DJ6tCsnu2zuMgOj1/hj/Uc0/pv3zuRP3QPehfByT HlmnFSAYGr3Ew5BD0ihBX1EoVNC6zPRM3yHAqRjTayJp4BqjF+2lWg7OucW/yO/CVSlQ EKKURVJgsp7ke3ieGQDCmymxtv0SP7X0B8GWFUAa+ErucmiBEgez0IXBHTZlPgWXGa1k MU5hIMGNyERRmBrSi9FWJ4BmpEVGgUKKbyXv4vNldt6ODuHeIpUNhGfYW/MZYOJNN343 YgGmJvkLmRSjThIEyUBXwBtwZddM8ujQzRhaFWR/5mZAhu8C9ESsWwibf70lyg2kxf3B mjYQ== X-Gm-Message-State: AC+VfDySxE7rDfPtnRwIatp0Ir1SDqlIrLSzDQAHW4B2G5GOKCuDGbH0 XxUCED1qoyZfpQouD7qXAGaZgUAI7f4V/Ei6h3aWR65o X-Google-Smtp-Source: ACHHUZ6TukyhsGP4mjQ7yUFj6LaYnJYoZdc5XdNg/V3yG8aN8q6phI08wtrNs1iw4F9uvVVCtyZyFg== X-Received: by 2002:a17:902:7249:b0:1ae:1a33:6c with SMTP id c9-20020a170902724900b001ae1a33006cmr3358236pll.31.1684518376246; Fri, 19 May 2023 10:46:16 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id e3-20020a170902744300b001aaf2e7b06csm3713101plt.132.2023.05.19.10.46.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 May 2023 10:46:15 -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 v3 02/19] eal: replace use of sanity check in comments and messages Date: Fri, 19 May 2023 10:45:54 -0700 Message-Id: <20230519174611.11232-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230519174611.11232-1-stephen@networkplumber.org> References: <20230517161603.117728-1-stephen@networkplumber.org> <20230519174611.11232-1-stephen@networkplumber.org> MIME-Version: 1.0 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;