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 EEA4E45711; Thu, 1 Aug 2024 17:48:49 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 933E243455; Thu, 1 Aug 2024 17:48:36 +0200 (CEST) Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) by mails.dpdk.org (Postfix) with ESMTP id 6CF1642F6D for ; Thu, 1 Aug 2024 17:48:34 +0200 (CEST) Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-1fc60c3ead4so52323785ad.0 for ; Thu, 01 Aug 2024 08:48:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1722527313; x=1723132113; 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=tHojnRvlb9P+m4WjIV5MTJfgmKt0acR8rU+hDo4bk0Q=; b=odEkvDOScPnpjoJynC7GhW0gp/MNCnjHS0Y9hLVoFTUI5pb3Q0KVkareVimT1KGDTe lwwIXe0/wEK2j419OLY8JHuNX0P4KSydXkruiM3IpS1iKArzVDJ3PKgKwbEwMAfqSsDU SOL32yrtcSA8RfXZKYNSzw5nGccAdTNu4kDOj6oW+QdG/ZhQ29GudeYBIPyPbQcr0hW1 9kQc+Itw8P4lOM+pET4QZoGaxQTH5+OmyRoTxjj6XrAMniG3FnVL9R2i3Tx1t8cL/zGb 74wwIgwxoMYLkiZdyOA7p2TogTqlKPxqV2q34czas+sji5hzeYmGD1TcZtNsB7jXSsz1 rF9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722527313; x=1723132113; 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=tHojnRvlb9P+m4WjIV5MTJfgmKt0acR8rU+hDo4bk0Q=; b=C6WtXwrSEv6UeEYP9eb4ZkvzEYTqk0o7gbqMoinmtYbziK3jB+WnzCu9WjHKfi6pHW lGC9eThBvxNUu+Qs9YwJD4jEWGPmA8YFWn/K6PA0tKb4OFw1rdXwpQ1cyL5Ht6DlTL4r eAw+5N4ajVR80LhiyjjQl1Qv4qGl/6l4Nf62awCEAYn+Qh+AqRH3UjJaZPbZclj7qnt2 kCSKcF26x1u3ICcDoq977F3wV//w67+KZEmLfsDJu3St9MxKBpSZ2UvwyeXKy90pgRiw 0lkVDTFnXw7paZSK/Drz9iU8BQ7iCpBBeKsLZe1dy5nwt3MubVOwX3O1BRgABfi1ohj/ d7Dg== X-Gm-Message-State: AOJu0YwLepgjsaGGZvKz8i2TaSqczsxJUPquIsi6yWvxR+AnAj60WAg5 nga2F5lSCk0eCXqKvXr0ej+Ssw3VQzX+J4vrXY1AtvXI5EK5cZfH0vTmKkQxGAugL443paWvCvK B X-Google-Smtp-Source: AGHT+IHvWQ7skA3zgUncrR2VafiNBrC6GHXboQ2CE50DadEVFqvPYiA17QHw8RWg3RPZteU++NpgVA== X-Received: by 2002:a17:903:2291:b0:1f3:dd7:ad42 with SMTP id d9443c01a7336-1ff570dbd4bmr10020525ad.0.1722527313585; Thu, 01 Aug 2024 08:48:33 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1ff590579b3sm92405ad.178.2024.08.01.08.48.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Aug 2024 08:48:33 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Anatoly Burakov Subject: [PATCH v11 2/7] eal: replace use of sanity check in comments and messages Date: Thu, 1 Aug 2024 08:46:35 -0700 Message-ID: <20240801154821.150443-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240801154821.150443-1-stephen@networkplumber.org> References: <20240529233811.663211-1-stephen@networkplumber.org> <20240801154821.150443-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 3eed4d4be6..c3a2069010 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 1229230063..c7cc6fa28b 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 d742cc98e2..254d071d12 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 28b78a95a6..f6ef5b1470 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