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 3CBFE45711; Thu, 1 Aug 2024 17:49:32 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 38D4B4348A; Thu, 1 Aug 2024 17:48:44 +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 7F1C943463 for ; Thu, 1 Aug 2024 17:48:38 +0200 (CEST) Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-7104f93a20eso1773302b3a.1 for ; Thu, 01 Aug 2024 08:48:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1722527318; x=1723132118; 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=E4CdIP5XA6GB4hqX1fDHNJfm1ddNiez0zWgaKdNBquE=; b=ZZR1vmKeWaHipakhDeBa+B0G8CHauqWBPJ7cosK6TF779L+HMTQAW3YxhCdcyZzLN0 WUSmo7sX30GX6KX83Sv9ug957ff9dPdisNRcSM6FzEz2lLR2rx0UK0d3H784XTw31yjK brr0NGpoOVxSW0XDvDtNwsuvCHT5xaVkUASVba2+sLBPk4lioVymnjvo0hawEOkMtIZW kN84cychw1P6Lrlds13VfrCyeYF+3RN5LkEuuDN6My1gWPMGXQsQUbheP3NhbD8HOzuW y94juf+s/zrKaqbZWSQMpwgsV4cFpox5vbULEvYqGtaHqPxy8N0JTVhlXUjgT+yV/r2M N5ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722527318; x=1723132118; 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=E4CdIP5XA6GB4hqX1fDHNJfm1ddNiez0zWgaKdNBquE=; b=nrv/oj/pJsSNwHlPYPfzW3b8ktrRj/pWR/xDOWRX4hlA3Ds9+7cCBc9Hilh+CwM15X iw9MrBUrn1O7ql+oksEOhnfey9jA58k59Ct6MkXwa7v/GTRn2EpvXznKYcT9YRXgj18L iQc1baokQgfO546TNsZr9X+3SCJCvQqZ+tKN44mud4kL/9R2DnQXamj954lV5+ICDInm 6virPR02LfBq2AWC6yRkfOgAnnIIqmqZ5ROCe1xmrQLWHD+sa7PqsV7IHjoh0tSMpqdb H//Bn8ZG/sVKhb7tHCI9sibfXvBk/3QoSGDVUSYSLaP/mtBDNJNI2XLFyJImvYuyJRej PTLQ== X-Gm-Message-State: AOJu0YzhI4d3h2N2OfWypZLtv5npKhGPmJf1QljUZ6g57wHd6177WFsT zrkJzGH/V3K1OWpUpJMZkaaTzXZicXzT2yfsrvvdIwUm/O4GvJigMB8nHIcZgnmdupSQMn4OVlv O X-Google-Smtp-Source: AGHT+IES47M/3PrAyqvx/kJwAK2qmdEOLW5SnyN2p5KiATYOOM4nmA7y0r8D2MIJeTICB1r/WHMI8Q== X-Received: by 2002:a17:902:d501:b0:1fb:8245:fdeb with SMTP id d9443c01a7336-1ff574fd60dmr9180365ad.64.1722527317380; Thu, 01 Aug 2024 08:48:37 -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.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Aug 2024 08:48:37 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Hemant Agrawal Subject: [PATCH v11 7/7] drivers: remove use of term sanity check Date: Thu, 1 Aug 2024 08:46:40 -0700 Message-ID: <20240801154821.150443-8-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 Don't use term "sanity" because it is considered derogatory. Signed-off-by: Stephen Hemminger Acked-by: Hemant Agrawal --- drivers/bus/fslmc/qbman/qbman_sys_decl.h | 2 +- drivers/common/cnxk/roc_nix_tm_ops.c | 2 +- drivers/common/cnxk/roc_npa.c | 6 +++--- drivers/common/dpaax/caamflib/desc.h | 2 +- drivers/common/mlx5/linux/mlx5_common_os.c | 2 +- drivers/common/sfc_efx/base/ef10_nvram.c | 4 ++-- drivers/common/sfc_efx/base/efx_rx.c | 2 +- drivers/crypto/bcmfs/hw/bcmfs4_rm.c | 6 +++--- drivers/crypto/bcmfs/hw/bcmfs5_rm.c | 6 +++--- drivers/dma/idxd/idxd_pci.c | 2 +- drivers/event/opdl/opdl_evdev.c | 2 +- drivers/event/opdl/opdl_evdev_init.c | 2 +- drivers/net/ark/ark_ethdev.c | 8 ++++---- drivers/net/ark/ark_ethdev_rx.c | 2 +- drivers/net/bnx2x/bnx2x.c | 2 +- drivers/net/bnx2x/bnx2x_stats.c | 8 ++++---- drivers/net/bnx2x/ecore_sp.c | 2 +- drivers/net/bnx2x/elink.c | 4 ++-- drivers/net/bnxt/bnxt_hwrm.c | 2 +- drivers/net/bnxt/hsi_struct_def_dpdk.h | 2 +- drivers/net/bonding/rte_eth_bond_8023ad.c | 2 +- drivers/net/cnxk/cnxk_ethdev.c | 4 ++-- drivers/net/cxgbe/cxgbe_ethdev.c | 10 ++-------- drivers/net/cxgbe/cxgbevf_main.c | 4 ++-- drivers/net/fm10k/fm10k_ethdev.c | 2 +- drivers/net/fm10k/fm10k_rxtx.c | 2 +- drivers/net/ixgbe/ixgbe_fdir.c | 2 +- drivers/net/ixgbe/ixgbe_ipsec.c | 2 +- drivers/net/ixgbe/ixgbe_rxtx.c | 2 +- drivers/net/mlx4/mlx4.c | 2 +- drivers/net/mlx4/mlx4_flow.c | 6 +++--- drivers/net/mlx5/mlx5_flow_dv.c | 2 +- drivers/net/mlx5/mlx5_flow_hw.c | 6 ++---- drivers/net/mlx5/mlx5_rxq.c | 2 +- drivers/net/mlx5/mlx5_rxtx_vec.h | 2 +- drivers/net/mvpp2/mrvl_qos.c | 2 +- drivers/net/nfp/flower/nfp_flower_flow.c | 2 +- drivers/net/nfp/nfp_net_flow.c | 2 +- drivers/net/qede/qede_rxtx.c | 6 +++--- drivers/net/ring/rte_eth_ring.c | 7 ++----- drivers/net/sfc/sfc_dp_rx.h | 2 +- drivers/net/txgbe/txgbe_ipsec.c | 2 +- drivers/net/txgbe/txgbe_rxtx.c | 2 +- 43 files changed, 66 insertions(+), 77 deletions(-) diff --git a/drivers/bus/fslmc/qbman/qbman_sys_decl.h b/drivers/bus/fslmc/qbman/qbman_sys_decl.h index caaae41777..2b6162d0ce 100644 --- a/drivers/bus/fslmc/qbman/qbman_sys_decl.h +++ b/drivers/bus/fslmc/qbman/qbman_sys_decl.h @@ -9,7 +9,7 @@ #include #include -/* Sanity check */ +/* Byte order check */ #if (__BYTE_ORDER__ != __ORDER_BIG_ENDIAN__) && \ (__BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__) #error "Unknown endianness!" diff --git a/drivers/common/cnxk/roc_nix_tm_ops.c b/drivers/common/cnxk/roc_nix_tm_ops.c index 9f3870a311..6cf329eee2 100644 --- a/drivers/common/cnxk/roc_nix_tm_ops.c +++ b/drivers/common/cnxk/roc_nix_tm_ops.c @@ -528,7 +528,7 @@ roc_nix_tm_hierarchy_disable(struct roc_nix *roc_nix) node->flags &= ~NIX_TM_NODE_ENABLED; } - /* Verify sanity of all tx queues */ + /* Verify all tx queues */ for (i = 0; i < sq_cnt; i++) { sq = nix->sqs[i]; if (!sq) diff --git a/drivers/common/cnxk/roc_npa.c b/drivers/common/cnxk/roc_npa.c index 6c14c49901..bd8ab1b395 100644 --- a/drivers/common/cnxk/roc_npa.c +++ b/drivers/common/cnxk/roc_npa.c @@ -458,7 +458,7 @@ npa_aura_pool_pair_alloc(struct npa_lf *lf, const uint32_t block_size, char name[PLT_MEMZONE_NAMESIZE]; const struct plt_memzone *mz; - /* Sanity check */ + /* argument checks */ if (!lf || !block_size || !block_count || !pool || !aura || !aura_handle) return NPA_ERR_PARAM; @@ -622,7 +622,7 @@ npa_aura_alloc(struct npa_lf *lf, const uint32_t block_count, int pool_id, { int rc, aura_id; - /* Sanity check */ + /* parameter check */ if (!lf || !aura || !aura_handle) return NPA_ERR_PARAM; @@ -1096,7 +1096,7 @@ npa_dev_init(struct npa_lf *lf, uintptr_t base, struct mbox *mbox) uint8_t aura_sz; int rc; - /* Sanity checks */ + /* Input checks */ if (!lf || !base || !mbox) return NPA_ERR_PARAM; diff --git a/drivers/common/dpaax/caamflib/desc.h b/drivers/common/dpaax/caamflib/desc.h index 4a1285c4d4..37c87eebd5 100644 --- a/drivers/common/dpaax/caamflib/desc.h +++ b/drivers/common/dpaax/caamflib/desc.h @@ -107,7 +107,7 @@ extern enum rta_sec_era rta_sec_era; /* * ONE - should always be set. Combination of ONE (always - * set) and ZRO (always clear) forms an endianness sanity check + * set) and ZRO (always clear) forms an endianness check */ #define HDR_ONE BIT(23) #define HDR_ZRO BIT(15) diff --git a/drivers/common/mlx5/linux/mlx5_common_os.c b/drivers/common/mlx5/linux/mlx5_common_os.c index 41345e1597..2caa1a1da0 100644 --- a/drivers/common/mlx5/linux/mlx5_common_os.c +++ b/drivers/common/mlx5/linux/mlx5_common_os.c @@ -235,7 +235,7 @@ mlx5_get_ifname_sysfs(const char *ibdev_path, char *ifname) /** * Suffix RTE_EAL_PMD_PATH with "-glue". * - * This function performs a sanity check on RTE_EAL_PMD_PATH before + * This function performs a check on RTE_EAL_PMD_PATH before * suffixing its last component. * * @param buf[out] diff --git a/drivers/common/sfc_efx/base/ef10_nvram.c b/drivers/common/sfc_efx/base/ef10_nvram.c index ce8357fa94..fad9f0f507 100644 --- a/drivers/common/sfc_efx/base/ef10_nvram.c +++ b/drivers/common/sfc_efx/base/ef10_nvram.c @@ -595,13 +595,13 @@ tlv_update_partition_len_and_cks( /* * We just modified the partition, so the total length may not be - * valid. Don't use tlv_find(), which performs some sanity checks + * valid. Don't use tlv_find(), which performs some checks * that may fail here. */ partition.data = cursor->block; memcpy(&partition.tlv_cursor, cursor, sizeof (*cursor)); header = (struct tlv_partition_header *)partition.data; - /* Sanity check. */ + /* Header check */ if (__LE_TO_CPU_32(header->tag) != TLV_TAG_PARTITION_HEADER) { rc = EFAULT; goto fail1; diff --git a/drivers/common/sfc_efx/base/efx_rx.c b/drivers/common/sfc_efx/base/efx_rx.c index dce9ada55d..28676c5a5b 100644 --- a/drivers/common/sfc_efx/base/efx_rx.c +++ b/drivers/common/sfc_efx/base/efx_rx.c @@ -930,7 +930,7 @@ efx_rx_qcreate_internal( ndescs, id, flags, eep, erp)) != 0) goto fail4; - /* Sanity check queue creation result */ + /* Check queue creation result */ if (flags & EFX_RXQ_FLAG_RSS_HASH) { const efx_rx_prefix_layout_t *erplp = &erp->er_prefix_layout; const efx_rx_prefix_field_info_t *rss_hash_field; diff --git a/drivers/crypto/bcmfs/hw/bcmfs4_rm.c b/drivers/crypto/bcmfs/hw/bcmfs4_rm.c index 9a30c654da..051bbea9cc 100644 --- a/drivers/crypto/bcmfs/hw/bcmfs4_rm.c +++ b/drivers/crypto/bcmfs/hw/bcmfs4_rm.c @@ -317,7 +317,7 @@ bcmfs4_mdst_desc(uint64_t addr, unsigned int length_div_16) } static bool -bcmfs4_sanity_check(struct bcmfs_qp_message *msg) +bcmfs4_message_check(struct bcmfs_qp_message *msg) { unsigned int i = 0; @@ -458,8 +458,8 @@ bcmfs4_enqueue_single_request_qp(struct bcmfs_qp *qp, void *op) struct bcmfs_queue *txq = &qp->tx_q; struct bcmfs_qp_message *msg = (struct bcmfs_qp_message *)op; - /* Do sanity check on message */ - if (!bcmfs4_sanity_check(msg)) { + /* Do check on message */ + if (!bcmfs4_message_check(msg)) { BCMFS_DP_LOG(ERR, "Invalid msg on queue %d", qp->qpair_id); return -EIO; } diff --git a/drivers/crypto/bcmfs/hw/bcmfs5_rm.c b/drivers/crypto/bcmfs/hw/bcmfs5_rm.c index cbfe42cb47..2df10a3028 100644 --- a/drivers/crypto/bcmfs/hw/bcmfs5_rm.c +++ b/drivers/crypto/bcmfs/hw/bcmfs5_rm.c @@ -293,7 +293,7 @@ bcmfs5_mdst_desc(uint64_t addr, unsigned int len_div_16) } static bool -bcmfs5_sanity_check(struct bcmfs_qp_message *msg) +bcmfs5_message_check(struct bcmfs_qp_message *msg) { unsigned int i = 0; @@ -389,8 +389,8 @@ bcmfs5_enqueue_single_request_qp(struct bcmfs_qp *qp, void *op) struct bcmfs_queue *txq = &qp->tx_q; struct bcmfs_qp_message *msg = (struct bcmfs_qp_message *)op; - /* Do sanity check on message */ - if (!bcmfs5_sanity_check(msg)) { + /* Do check on message */ + if (!bcmfs5_message_check(msg)) { BCMFS_DP_LOG(ERR, "Invalid msg on queue %d", qp->qpair_id); return -EIO; } diff --git a/drivers/dma/idxd/idxd_pci.c b/drivers/dma/idxd/idxd_pci.c index 81637d9420..b60b233a1d 100644 --- a/drivers/dma/idxd/idxd_pci.c +++ b/drivers/dma/idxd/idxd_pci.c @@ -205,7 +205,7 @@ init_pci_device(struct rte_pci_device *dev, struct idxd_dmadev *idxd, goto err; } - /* sanity check device status */ + /* check device status */ if (pci->regs->gensts & GENSTS_DEV_STATE_MASK) { /* need function-level-reset (FLR) or is enabled */ IDXD_PMD_ERR("Device status is not disabled, cannot init"); diff --git a/drivers/event/opdl/opdl_evdev.c b/drivers/event/opdl/opdl_evdev.c index b34a5fcacd..de9c560967 100644 --- a/drivers/event/opdl/opdl_evdev.c +++ b/drivers/event/opdl/opdl_evdev.c @@ -241,7 +241,7 @@ opdl_queue_setup(struct rte_eventdev *dev, struct opdl_evdev *device = opdl_pmd_priv(dev); - /* Extra sanity check, probably not needed */ + /* Extra check, probably not needed */ if (queue_id == OPDL_INVALID_QID) { PMD_DRV_LOG(ERR, "DEV_ID:[%02d] : " "Invalid queue id %u requested\n", diff --git a/drivers/event/opdl/opdl_evdev_init.c b/drivers/event/opdl/opdl_evdev_init.c index be3437fc2f..12eb2695f5 100644 --- a/drivers/event/opdl/opdl_evdev_init.c +++ b/drivers/event/opdl/opdl_evdev_init.c @@ -300,7 +300,7 @@ static int opdl_add_deps(struct opdl_evdev *device, struct opdl_queue *queue_deps = &device->queue[deps_q_id]; struct opdl_stage *dep_stages[OPDL_PORTS_MAX]; - /* sanity check that all stages are for same opdl ring */ + /* check that all stages are for same opdl ring */ for (i = 0; i < queue->nb_ports; i++) { struct opdl_ring *r = opdl_stage_get_opdl_ring(stage_for_port(queue, i)); diff --git a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c index c029dc46b3..36b3e2b8e6 100644 --- a/drivers/net/ark/ark_ethdev.c +++ b/drivers/net/ark/ark_ethdev.c @@ -349,10 +349,10 @@ eth_ark_dev_init(struct rte_eth_dev *dev) ARK_PMD_LOG(NOTICE, "Arkville HW Commit_ID: %08x\n", rte_be_to_cpu_32(ark->sysctrl.t32[0x20 / 4])); - /* If HW sanity test fails, return an error */ + /* If HW test fails, return an error */ if (ark->sysctrl.t32[4] != 0xcafef00d) { ARK_PMD_LOG(ERR, - "HW Sanity test has failed, expected constant" + "HW test has failed, expected constant" " 0x%x, read 0x%x (%s)\n", 0xcafef00d, ark->sysctrl.t32[4], __func__); @@ -360,7 +360,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev) } ARK_PMD_LOG(DEBUG, - "HW Sanity test has PASSED, expected constant" + "HW test has PASSED, expected constant" " 0x%x, read 0x%x (%s)\n", 0xcafef00d, ark->sysctrl.t32[4], __func__); @@ -590,7 +590,7 @@ eth_ark_dev_start(struct rte_eth_dev *dev) rte_thread_t thread; /* Delay packet generator start allow the hardware to be ready - * This is only used for sanity checking with internal generator + * This is only used for checking with internal generator */ char tname[RTE_THREAD_INTERNAL_NAME_SIZE]; snprintf(tname, sizeof(tname), "ark-pg%d", dev->data->port_id); diff --git a/drivers/net/ark/ark_ethdev_rx.c b/drivers/net/ark/ark_ethdev_rx.c index 80e431f1ae..e7683c9175 100644 --- a/drivers/net/ark/ark_ethdev_rx.c +++ b/drivers/net/ark/ark_ethdev_rx.c @@ -283,7 +283,7 @@ eth_ark_recv_pkts(void *rx_queue, mbuf->pkt_len = meta->pkt_len; mbuf->data_len = meta->pkt_len; - if (ARK_DEBUG_CORE) { /* debug sanity checks */ + if (ARK_DEBUG_CORE) { /* debug checks */ if ((meta->pkt_len > (1024 * 16)) || (meta->pkt_len == 0)) { diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c index 597ee43359..92abd2d3f1 100644 --- a/drivers/net/bnx2x/bnx2x.c +++ b/drivers/net/bnx2x/bnx2x.c @@ -7820,7 +7820,7 @@ static int bnx2x_check_valid_mf_cfg(struct bnx2x_softc *sc) uint32_t ovlan2; uint8_t i, j; - /* various MF mode sanity checks... */ + /* various MF mode checks... */ if (mf_info->mf_config[SC_VN(sc)] & FUNC_MF_CFG_FUNC_HIDE) { PMD_DRV_LOG(NOTICE, sc, diff --git a/drivers/net/bnx2x/bnx2x_stats.c b/drivers/net/bnx2x/bnx2x_stats.c index d473c5e7ec..9dcb90bda8 100644 --- a/drivers/net/bnx2x/bnx2x_stats.c +++ b/drivers/net/bnx2x/bnx2x_stats.c @@ -181,7 +181,7 @@ bnx2x_stats_pmf_update(struct bnx2x_softc *sc) */ return; } - /* sanity */ + /* input validation */ if (!sc->port.pmf || !sc->port.port_stx) { PMD_DRV_LOG(ERR, sc, "BUG!"); return; @@ -231,7 +231,7 @@ bnx2x_port_stats_init(struct bnx2x_softc *sc) uint32_t mac_addr; uint32_t *stats_comp = BNX2X_SP(sc, stats_comp); - /* sanity */ + /* input validation */ if (!sc->link_vars.link_up || !sc->port.pmf) { PMD_DRV_LOG(ERR, sc, "BUG!"); return; @@ -457,7 +457,7 @@ bnx2x_func_stats_init(struct bnx2x_softc *sc) struct dmae_command *dmae = &sc->stats_dmae; uint32_t *stats_comp = BNX2X_SP(sc, stats_comp); - /* sanity */ + /* input validation */ if (!sc->func_stx) { PMD_DRV_LOG(ERR, sc, "BUG!"); return; @@ -1280,7 +1280,7 @@ bnx2x_port_stats_base_init(struct bnx2x_softc *sc) struct dmae_command *dmae; uint32_t *stats_comp = BNX2X_SP(sc, stats_comp); - /* sanity */ + /* input validation */ if (!sc->port.pmf || !sc->port.port_stx) { PMD_DRV_LOG(ERR, sc, "BUG!"); return; diff --git a/drivers/net/bnx2x/ecore_sp.c b/drivers/net/bnx2x/ecore_sp.c index c6c3857778..158205266f 100644 --- a/drivers/net/bnx2x/ecore_sp.c +++ b/drivers/net/bnx2x/ecore_sp.c @@ -207,7 +207,7 @@ static int ecore_exe_queue_step(struct bnx2x_softc *sc, break; } - /* Sanity check */ + /* Argument check */ if (!cur_len) return ECORE_SUCCESS; diff --git a/drivers/net/bnx2x/elink.c b/drivers/net/bnx2x/elink.c index 2c81f85b96..6ebd47d927 100644 --- a/drivers/net/bnx2x/elink.c +++ b/drivers/net/bnx2x/elink.c @@ -1088,7 +1088,7 @@ static void elink_get_epio(struct bnx2x_softc *sc, uint32_t epio_pin, { uint32_t epio_mask, gp_oenable; *en = 0; - /* Sanity check */ + /* Input check */ if (epio_pin > 31) { ELINK_DEBUG_P1(sc, "Invalid EPIO pin %d to get", epio_pin); return; @@ -1105,7 +1105,7 @@ static void elink_set_epio(struct bnx2x_softc *sc, uint32_t epio_pin, uint32_t e { uint32_t epio_mask, gp_output, gp_oenable; - /* Sanity check */ + /* Input check */ if (epio_pin > 31) { ELINK_DEBUG_P1(sc, "Invalid EPIO pin %d to set", epio_pin); return; diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index fc142672f6..c46bd99285 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -538,7 +538,7 @@ static int bnxt_hwrm_send_message(struct bnxt *bp, void *msg, done = bnxt_check_cq_hwrm_done(cpr, is_tx, is_rx, i == timeout - 1); - /* Sanity check on the resp->resp_len */ + /* Input check on the resp->resp_len */ rte_io_rmb(); if (resp->resp_len && resp->resp_len <= bp->max_resp_len) { /* Last byte of resp contains the valid key */ diff --git a/drivers/net/bnxt/hsi_struct_def_dpdk.h b/drivers/net/bnxt/hsi_struct_def_dpdk.h index 9beacd94aa..ff7646179a 100644 --- a/drivers/net/bnxt/hsi_struct_def_dpdk.h +++ b/drivers/net/bnxt/hsi_struct_def_dpdk.h @@ -56770,7 +56770,7 @@ struct hwrm_tfc_ident_alloc_output { * Requests the firmware to free a TFC resource identifier. * A resource subtype and session id are passed in. * An identifier (previously allocated) corresponding to all these is - * freed, only after various sanity checks are completed. + * freed, only after various checks are completed. */ /* hwrm_tfc_ident_free_input (size:192b/24B) */ struct hwrm_tfc_ident_free_input { diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c index 06c21ebe6d..804845b3e1 100644 --- a/drivers/net/bonding/rte_eth_bond_8023ad.c +++ b/drivers/net/bonding/rte_eth_bond_8023ad.c @@ -1473,7 +1473,7 @@ bond_8023ad_setup_validate(uint16_t port_id, return -EINVAL; if (conf != NULL) { - /* Basic sanity check */ + /* Basic input check */ if (conf->slow_periodic_ms == 0 || conf->fast_periodic_ms >= conf->slow_periodic_ms || conf->long_timeout_ms == 0 || diff --git a/drivers/net/cnxk/cnxk_ethdev.c b/drivers/net/cnxk/cnxk_ethdev.c index 38746c81c5..c3ff50ec75 100644 --- a/drivers/net/cnxk/cnxk_ethdev.c +++ b/drivers/net/cnxk/cnxk_ethdev.c @@ -643,7 +643,7 @@ cnxk_nix_rx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t qid, struct rte_mempool *lpb_pool = mp; struct rte_mempool *spb_pool = NULL; - /* Sanity checks */ + /* input checks */ if (rx_conf->rx_deferred_start == 1) { plt_err("Deferred Rx start is not supported"); goto fail; @@ -1212,7 +1212,7 @@ cnxk_nix_configure(struct rte_eth_dev *eth_dev) rc = -EINVAL; - /* Sanity checks */ + /* baseline checks */ if (rte_eal_has_hugepages() == 0) { plt_err("Huge page is not configured"); goto fail_configure; diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c index 9b6a3651f9..b87e548ebc 100644 --- a/drivers/net/cxgbe/cxgbe_ethdev.c +++ b/drivers/net/cxgbe/cxgbe_ethdev.c @@ -525,10 +525,7 @@ int cxgbe_dev_tx_queue_setup(struct rte_eth_dev *eth_dev, eth_dev->data->tx_queues[queue_idx] = (void *)txq; - /* Sanity Checking - * - * nb_desc should be > 1023 and <= CXGBE_MAX_RING_DESC_SIZE - */ + /* nb_desc should be > 1023 and <= CXGBE_MAX_RING_DESC_SIZE */ temp_nb_desc = nb_desc; if (nb_desc < CXGBE_MIN_RING_DESC_SIZE) { dev_warn(adapter, "%s: number of descriptors must be >= %d. Using default [%d]\n", @@ -649,10 +646,7 @@ int cxgbe_dev_rx_queue_setup(struct rte_eth_dev *eth_dev, eth_dev->data->rx_queues[queue_idx] = (void *)rxq; - /* Sanity Checking - * - * nb_desc should be > 0 and <= CXGBE_MAX_RING_DESC_SIZE - */ + /* nb_desc should be > 0 and <= CXGBE_MAX_RING_DESC_SIZE */ temp_nb_desc = nb_desc; if (nb_desc < CXGBE_MIN_RING_DESC_SIZE) { dev_warn(adapter, "%s: number of descriptors must be >= %d. Using default [%d]\n", diff --git a/drivers/net/cxgbe/cxgbevf_main.c b/drivers/net/cxgbe/cxgbevf_main.c index d0c93f8ac3..dfb12b4ed5 100644 --- a/drivers/net/cxgbe/cxgbevf_main.c +++ b/drivers/net/cxgbe/cxgbevf_main.c @@ -137,7 +137,7 @@ static int adap_init0vf(struct adapter *adapter) /* * Grab our Virtual Interface resource allocation, extract the - * features that we're interested in and do a bit of sanity testing on + * features that we're interested in and do a bit of testing on * what we discover. */ err = t4vf_get_vfres(adapter); @@ -148,7 +148,7 @@ static int adap_init0vf(struct adapter *adapter) } /* - * Check for various parameter sanity issues. + * Check for various parameter issues. */ if (adapter->params.vfres.pmask == 0) { dev_err(adapter->pdev_dev, "no port access configured\n" diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c index 7b490bea17..334e10d1c6 100644 --- a/drivers/net/fm10k/fm10k_ethdev.c +++ b/drivers/net/fm10k/fm10k_ethdev.c @@ -1758,7 +1758,7 @@ mempool_element_size_valid(struct rte_mempool *mp) /* account for up to 512B of alignment */ min_size -= FM10K_RX_DATABUF_ALIGN; - /* sanity check for overflow */ + /* check for overflow */ if (min_size > mp->elt_size) return 0; diff --git a/drivers/net/fm10k/fm10k_rxtx.c b/drivers/net/fm10k/fm10k_rxtx.c index 690142b357..c2940901fe 100644 --- a/drivers/net/fm10k/fm10k_rxtx.c +++ b/drivers/net/fm10k/fm10k_rxtx.c @@ -646,7 +646,7 @@ fm10k_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, if (q->nb_free < mb->nb_segs) break; - /* sanity check to make sure the mbuf is valid */ + /* check to make sure the mbuf is valid */ if ((mb->nb_segs == 0) || ((mb->nb_segs > 1) && (mb->next == NULL))) break; diff --git a/drivers/net/ixgbe/ixgbe_fdir.c b/drivers/net/ixgbe/ixgbe_fdir.c index 06d6e2126d..51bbf577e3 100644 --- a/drivers/net/ixgbe/ixgbe_fdir.c +++ b/drivers/net/ixgbe/ixgbe_fdir.c @@ -1130,7 +1130,7 @@ ixgbe_fdir_filter_program(struct rte_eth_dev *dev, return -ENOTSUP; /* - * Sanity check for x550. + * Check for x550. * When adding a new filter with flow type set to IPv4, * the flow director mask should be configed before, * and the L4 protocol and ports are masked. diff --git a/drivers/net/ixgbe/ixgbe_ipsec.c b/drivers/net/ixgbe/ixgbe_ipsec.c index d331308556..d4aa3e9ede 100644 --- a/drivers/net/ixgbe/ixgbe_ipsec.c +++ b/drivers/net/ixgbe/ixgbe_ipsec.c @@ -615,7 +615,7 @@ ixgbe_crypto_enable_ipsec(struct rte_eth_dev *dev) rx_offloads = dev->data->dev_conf.rxmode.offloads; tx_offloads = dev->data->dev_conf.txmode.offloads; - /* sanity checks */ + /* input validation */ if (rx_offloads & RTE_ETH_RX_OFFLOAD_TCP_LRO) { PMD_DRV_LOG(ERR, "RSC and IPsec not supported"); return -1; diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c index 0d42fd8a3b..5e6aebe3e9 100644 --- a/drivers/net/ixgbe/ixgbe_rxtx.c +++ b/drivers/net/ixgbe/ixgbe_rxtx.c @@ -4983,7 +4983,7 @@ ixgbe_set_rsc(struct rte_eth_dev *dev) uint32_t rdrxctl; uint32_t rfctl; - /* Sanity check */ + /* Offload check */ dev->dev_ops->dev_infos_get(dev, &dev_info); if (dev_info.rx_offload_capa & RTE_ETH_RX_OFFLOAD_TCP_LRO) rsc_capable = true; diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c index c19db5c0eb..b6f55e5965 100644 --- a/drivers/net/mlx4/mlx4.c +++ b/drivers/net/mlx4/mlx4.c @@ -1216,7 +1216,7 @@ static struct rte_pci_driver mlx4_driver = { /** * Suffix RTE_EAL_PMD_PATH with "-glue". * - * This function performs a sanity check on RTE_EAL_PMD_PATH before + * This function performs a check on RTE_EAL_PMD_PATH before * suffixing its last component. * * @param buf[out] diff --git a/drivers/net/mlx4/mlx4_flow.c b/drivers/net/mlx4/mlx4_flow.c index 8ef9fd2db4..25b185d871 100644 --- a/drivers/net/mlx4/mlx4_flow.c +++ b/drivers/net/mlx4/mlx4_flow.c @@ -514,7 +514,7 @@ mlx4_flow_merge_tcp(struct rte_flow *flow, } /** - * Perform basic sanity checks on a pattern item. + * Perform basic checks on a pattern item. * * @param[in] item * Item specification. @@ -730,7 +730,7 @@ mlx4_flow_prepare(struct mlx4_priv *priv, goto exit_item_not_supported; proc = next; /* - * Perform basic sanity checks only once, while handle is + * Perform basic checks only once, while handle is * not allocated. */ if (flow == &temp) { @@ -799,7 +799,7 @@ mlx4_flow_prepare(struct mlx4_priv *priv, rss_key = mlx4_rss_hash_key_default; rss_key_len = MLX4_RSS_HASH_KEY_SIZE; } - /* Sanity checks. */ + /* Input checks. */ for (i = 0; i < rss->queue_num; ++i) if (rss->queue[i] >= ETH_DEV(priv)->data->nb_rx_queues) diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index 89057edbcf..12969f56f1 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -9212,7 +9212,7 @@ flow_dv_prepare(struct rte_eth_dev *dev, #ifdef RTE_LIBRTE_MLX5_DEBUG /** - * Sanity check for match mask and value. Similar to check_valid_spec() in + * Check for match mask and value. Similar to check_valid_spec() in * kernel driver. If unmasked bit is present in value, it returns failure. * * @param match_mask diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c index d243b59b71..baa8743e2e 100644 --- a/drivers/net/mlx5/mlx5_flow_hw.c +++ b/drivers/net/mlx5/mlx5_flow_hw.c @@ -9536,11 +9536,10 @@ flow_hw_tx_tag_regc_mask(struct rte_eth_dev *dev) struct mlx5_priv *priv = dev->data->dev_private; uint32_t mask = priv->sh->dv_regc0_mask; - /* Mask is verified during device initialization. Sanity checking here. */ + /* Mask is verified during device initialization. */ MLX5_ASSERT(mask != 0); /* * Availability of sufficient number of bits in REG_C_0 is verified on initialization. - * Sanity checking here. */ MLX5_ASSERT(rte_popcount32(mask) >= rte_popcount32(priv->vport_meta_mask)); return mask; @@ -9552,12 +9551,11 @@ flow_hw_tx_tag_regc_value(struct rte_eth_dev *dev) struct mlx5_priv *priv = dev->data->dev_private; uint32_t tag; - /* Mask is verified during device initialization. Sanity checking here. */ + /* Mask is verified during device initialization. */ MLX5_ASSERT(priv->vport_meta_mask != 0); tag = priv->vport_meta_tag >> (rte_bsf32(priv->vport_meta_mask)); /* * Availability of sufficient number of bits in REG_C_0 is verified on initialization. - * Sanity checking here. */ MLX5_ASSERT((tag & priv->sh->dv_regc0_mask) == tag); return tag; diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c index f13fc3b353..697b5c15e3 100644 --- a/drivers/net/mlx5/mlx5_rxq.c +++ b/drivers/net/mlx5/mlx5_rxq.c @@ -1442,7 +1442,7 @@ mlx5_mprq_alloc_mp(struct rte_eth_dev *dev) desc *= 4; obj_num = desc + MLX5_MPRQ_MP_CACHE_SZ * n_ibv; /* - * rte_mempool_create_empty() has sanity check to refuse large cache + * rte_mempool_create_empty() has basic check to refuse large cache * size compared to the number of elements. * CALC_CACHE_FLUSHTHRESH() is defined in a C file, so using a * constant number 2 instead. diff --git a/drivers/net/mlx5/mlx5_rxtx_vec.h b/drivers/net/mlx5/mlx5_rxtx_vec.h index 77c3f4efa0..f8376f2b55 100644 --- a/drivers/net/mlx5/mlx5_rxtx_vec.h +++ b/drivers/net/mlx5/mlx5_rxtx_vec.h @@ -21,7 +21,7 @@ RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM) /* - * Compile time sanity check for vectorized functions. + * Compile time checks for vectorized functions. */ #define S_ASSERT_RTE_MBUF(s) \ diff --git a/drivers/net/mvpp2/mrvl_qos.c b/drivers/net/mvpp2/mrvl_qos.c index f43217bc58..db5052a9ab 100644 --- a/drivers/net/mvpp2/mrvl_qos.c +++ b/drivers/net/mvpp2/mrvl_qos.c @@ -260,7 +260,7 @@ get_entry_values(const char *entry, uint8_t *tab, if (nb_rng_tokens != 2) return -3; - /* Range and sanity checks. */ + /* Range and input checks. */ if (get_val_securely(rng_tokens[0], &token_val) < 0) return -4; beg = (char)token_val; diff --git a/drivers/net/nfp/flower/nfp_flower_flow.c b/drivers/net/nfp/flower/nfp_flower_flow.c index 0078455658..3806d3c3d4 100644 --- a/drivers/net/nfp/flower/nfp_flower_flow.c +++ b/drivers/net/nfp/flower/nfp_flower_flow.c @@ -2732,7 +2732,7 @@ nfp_flow_compile_item_proc(struct nfp_flower_representor *repr, break; } - /* Perform basic sanity checks */ + /* Perform basic checks */ ret = nfp_flow_item_check(item, proc); if (ret != 0) { PMD_DRV_LOG(ERR, "nfp flow item %d check failed", item->type); diff --git a/drivers/net/nfp/nfp_net_flow.c b/drivers/net/nfp/nfp_net_flow.c index 2c7801ed41..5f38dc7bb0 100644 --- a/drivers/net/nfp/nfp_net_flow.c +++ b/drivers/net/nfp/nfp_net_flow.c @@ -527,7 +527,7 @@ nfp_net_flow_compile_items(const struct rte_flow_item items[], break; } - /* Perform basic sanity checks */ + /* Perform basic checks */ ret = nfp_net_flow_item_check(item, proc); if (ret != 0) { PMD_DRV_LOG(ERR, "NFP flow item %d check failed", item->type); diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c index ede5fc83e3..606c144bd0 100644 --- a/drivers/net/qede/qede_rxtx.c +++ b/drivers/net/qede/qede_rxtx.c @@ -1383,7 +1383,7 @@ qede_rx_process_tpa_end_cqe(struct qede_dev *qdev, cqe->len_list[0]); /* Update total length and frags based on end TPA */ rx_mb = rxq->tpa_info[cqe->tpa_agg_index].tpa_head; - /* TODO: Add Sanity Checks */ + /* TODO: Add more checks */ rx_mb->nb_segs = cqe->num_of_bds; rx_mb->pkt_len = cqe->total_packet_len; @@ -2211,7 +2211,7 @@ qede_xmit_prep_pkts(__rte_unused void *p_txq, struct rte_mbuf **tx_pkts, #ifdef RTE_LIBRTE_QEDE_DEBUG_TX static inline void -qede_mpls_tunn_tx_sanity_check(struct rte_mbuf *mbuf, +qede_mpls_tunn_tx_basic_check(struct rte_mbuf *mbuf, struct qede_tx_queue *txq) { if (((mbuf->outer_l2_len + mbuf->outer_l3_len) / 2) > 0xff) @@ -2473,7 +2473,7 @@ qede_xmit_pkts(void *p_txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) RTE_MBUF_F_TX_TUNNEL_MPLSINUDP) { mplsoudp_flg = true; #ifdef RTE_LIBRTE_QEDE_DEBUG_TX - qede_mpls_tunn_tx_sanity_check(mbuf, txq); + qede_mpls_tunn_tx_basic_check(mbuf, txq); #endif /* Outer L4 offset in two byte words */ tunn_l4_hdr_start_offset = diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c index 1346a0dba3..db41864da0 100644 --- a/drivers/net/ring/rte_eth_ring.c +++ b/drivers/net/ring/rte_eth_ring.c @@ -34,7 +34,7 @@ struct ring_internal_args { struct rte_ring * const *tx_queues; const unsigned int nb_tx_queues; const unsigned int numa_node; - void *addr; /* self addr for sanity check */ + void *addr; /* self addr for verification */ }; enum dev_action { @@ -612,10 +612,7 @@ static int parse_kvlist(const char *key __rte_unused, *action = '\0'; action++; - /* - * Need to do some sanity checking here - */ - + /* Check the command argument is valid action */ if (strcmp(action, ETH_RING_ACTION_ATTACH) == 0) info->list[info->count].action = DEV_ATTACH; else if (strcmp(action, ETH_RING_ACTION_CREATE) == 0) diff --git a/drivers/net/sfc/sfc_dp_rx.h b/drivers/net/sfc/sfc_dp_rx.h index ed667c68d1..17ab10616b 100644 --- a/drivers/net/sfc/sfc_dp_rx.h +++ b/drivers/net/sfc/sfc_dp_rx.h @@ -59,7 +59,7 @@ struct sfc_dp_rx_qcreate_info { /** * Maximum number of Rx descriptors completed in one Rx event. - * Just for sanity checks if datapath would like to do. + * Checks if datapath would like to do. */ unsigned int batch_max; diff --git a/drivers/net/txgbe/txgbe_ipsec.c b/drivers/net/txgbe/txgbe_ipsec.c index f9f8108fb8..cadb0943c8 100644 --- a/drivers/net/txgbe/txgbe_ipsec.c +++ b/drivers/net/txgbe/txgbe_ipsec.c @@ -595,7 +595,7 @@ txgbe_crypto_enable_ipsec(struct rte_eth_dev *dev) rx_offloads = dev->data->dev_conf.rxmode.offloads; tx_offloads = dev->data->dev_conf.txmode.offloads; - /* sanity checks */ + /* offload checks */ if (rx_offloads & RTE_ETH_RX_OFFLOAD_TCP_LRO) { PMD_DRV_LOG(ERR, "RSC and IPsec not supported"); return -1; diff --git a/drivers/net/txgbe/txgbe_rxtx.c b/drivers/net/txgbe/txgbe_rxtx.c index 5bc0f8772f..9b1f24bd38 100644 --- a/drivers/net/txgbe/txgbe_rxtx.c +++ b/drivers/net/txgbe/txgbe_rxtx.c @@ -4181,7 +4181,7 @@ txgbe_set_rsc(struct rte_eth_dev *dev) uint32_t rdrxctl; uint32_t rfctl; - /* Sanity check */ + /* Offload check */ dev->dev_ops->dev_infos_get(dev, &dev_info); if (dev_info.rx_offload_capa & RTE_ETH_RX_OFFLOAD_TCP_LRO) rsc_capable = true; -- 2.43.0