Skip to contentSkip to conversation

Replace use of term sanity-check

PATCH Superseded Stephen Hemminger 12 participants 122 messages May 17, 2023 – Dec 7, 2023 Page 1 of 2

Subsystems (5)

v1 of 12 Superseded Latest is v12 →

lore
Share & tools
lore
#0 lore raw

cover Replace use of term sanity-check

This set of patches removes almost all use of the term sanity in DPDK. The term sanity-check and related formats are on the Inclusive Naming Tier 2 (Strongly Consider Replacing) word list.
https://inclusivenaming.org/word-lists/tier-2/sanity-check/

Did not address base drivers which come from vendors. It is up to them to fix that.

Stephen Hemminger (20):
mbuf: replace term sanity check
eal: replace use of sanity check in comments and messages net/ring: replace use of sanity
test: replace use word sanity
examples: remove term sanity
lib: replace use of sanity check in comments and messages net/nfp: remove word sanity doc/eventdev_pipeline: remove sanity
net/fm10k, net/ixgbe: remove word sanity net/mlx[45]: remove word sanity
net/sfc: remove term "sanity check"
net/ark: replace use of term sanity
net/bnxt: replace use of term sanity
net/bnx2x: remove reference to sanity
cnxk: replace term sanity
event/opdl: remove term sanity
net/txgbe: replace term sanity
net/cxgbe: remove use of term sanity crypto/bcmfs: replace term sanity check
Remove use of term sanity check

 app/test/test_bitmap.c                        |  4 +-
 app/test/test_bpf.c                           |  6 +-
 app/test/test_common.c                        |  2 +-
 app/test/test_distributor.c                   | 46 ++++++------
 app/test/test_dmadev.c                        |  2 +-
 app/test/test_eal_flags.c                     | 20 +++---
 app/test/test_hash.c                          |  2 +-
 app/test/test_interrupts.c                    |  9 +--
 app/test/test_link_bonding_mode4.c            |  2 +-
 app/test/test_mbuf.c                          | 32 ++++-----
 app/test/test_rawdev.c                        |  2 +-
 app/test/test_timer.c                         | 10 +--
 doc/guides/gpus/cuda.rst                      |  2 +-
 doc/guides/prog_guide/mbuf_lib.rst            |  4 +-
 .../sample_app_ug/eventdev_pipeline.rst       |  2 +-
 doc/guides/tools/testbbdev.rst                |  8 +--
 drivers/bus/fslmc/qbman/qbman_sys_decl.h      |  2 +-
 drivers/common/cnxk/roc_nix_tm_ops.c          |  2 +-
 drivers/common/cnxk/roc_npa.c                 |  4 +-
 drivers/common/dpaax/caamflib/desc.h          |  2 +-
 drivers/common/mlx5/linux/mlx5_common_os.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/avp/avp_ethdev.c                  | 18 ++---
 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/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/nfp_flow.c                    |  2 +-
 .../net/nfp/nfpcore/nfp-common/nfp_resid.h    | 13 ----
 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/sfc/sfc_ef100_rx.c                |  6 +-
 drivers/net/sfc/sfc_ef10_essb_rx.c            |  4 +-
 drivers/net/sfc/sfc_ef10_rx.c                 |  4 +-
 drivers/net/sfc/sfc_rx.c                      |  2 +-
 drivers/net/txgbe/txgbe_ipsec.c               |  2 +-
 drivers/net/txgbe/txgbe_rxtx.c                |  2 +-
 examples/ipsec-secgw/event_helper.c           |  2 +-
 examples/ipv4_multicast/main.c                |  2 +-
 examples/qos_sched/args.c                     |  2 +-
 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 +-
 lib/graph/graph.c                             |  2 +-
 lib/graph/graph_stats.c                       |  2 +-
 lib/graph/node.c                              |  2 +-
 lib/jobstats/rte_jobstats.c                   |  6 +-
 lib/mbuf/rte_mbuf.c                           | 16 ++---
 lib/mbuf/rte_mbuf.h                           | 71 ++++++++++---------
 lib/mbuf/version.map                          |  2 +-
 lib/metrics/rte_metrics.c                     |  2 +-
 lib/pcapng/rte_pcapng.c                       |  2 +-
 81 files changed, 222 insertions(+), 237 deletions(-)
Signature · 1 line
2.39.2
#1 lore raw

PATCH 1/20 mbuf: replace term sanity check

The term sanity check is on the Tier 2 list of words that should be replaced.

---
 app/test/test_mbuf.c               | 30 ++++++-------
 doc/guides/prog_guide/mbuf_lib.rst |  4 +-
 drivers/net/avp/avp_ethdev.c       | 18 ++++----
 drivers/net/sfc/sfc_ef100_rx.c     |  6 +--
 drivers/net/sfc/sfc_ef10_essb_rx.c |  4 +-
 drivers/net/sfc/sfc_ef10_rx.c      |  4 +-
 drivers/net/sfc/sfc_rx.c           |  2 +-
 examples/ipv4_multicast/main.c     |  2 +-
 lib/mbuf/rte_mbuf.c                | 16 +++----
 lib/mbuf/rte_mbuf.h                | 71 ++++++++++++++++--------------
 lib/mbuf/version.map               |  2 +-
 11 files changed, 83 insertions(+), 76 deletions(-)
app/test/test_mbuf.c +15 -15
index 8d8d3b9386ce..db9bb3caeea2 100644
@@ -261,8 +261,8 @@ test_one_pktmbuf(struct rte_mempool *pktmbuf_pool)
 		GOTO_FAIL("Buffer should be continuous");
 	memset(hdr, 0x55, MBUF_TEST_HDR2_LEN);
 
-	rte_mbuf_sanity_check(m, 1);
-	rte_mbuf_sanity_check(m, 0);
+	rte_mbuf_validate(m, 1);
+	rte_mbuf_validate(m, 0);
 	rte_pktmbuf_dump(stdout, m, 0);
 
 	/* this prepend should fail */
@@ -1161,7 +1161,7 @@ test_refcnt_mbuf(void)
 
 #ifdef RTE_EXEC_ENV_WINDOWS
 static int
-test_failing_mbuf_sanity_check(struct rte_mempool *pktmbuf_pool)
+test_failing_mbuf_validate(struct rte_mempool *pktmbuf_pool)
 {
 	RTE_SET_USED(pktmbuf_pool);
 	return TEST_SKIPPED;
@@ -1188,7 +1188,7 @@ verify_mbuf_check_panics(struct rte_mbuf *buf)
 		/* No need to generate a coredump when panicking. */
 		rl.rlim_cur = rl.rlim_max = 0;
 		setrlimit(RLIMIT_CORE, &rl);
-		rte_mbuf_sanity_check(buf, 1); /* should panic */
+		rte_mbuf_validate(buf, 1); /* should panic */
 		exit(0);  /* return normally if it doesn't panic */
 	} else if (pid < 0) {
 		printf("Fork Failed\n");
@@ -1202,12 +1202,12 @@ verify_mbuf_check_panics(struct rte_mbuf *buf)
 }
 
 static int
-test_failing_mbuf_sanity_check(struct rte_mempool *pktmbuf_pool)
+test_failing_mbuf_validate(struct rte_mempool *pktmbuf_pool)
 {
 	struct rte_mbuf *buf;
 	struct rte_mbuf badbuf;
 
-	printf("Checking rte_mbuf_sanity_check for failure conditions\n");
+	printf("Checking rte_mbuf_validate for failure conditions\n");
 
 	/* get a good mbuf to use to make copies */
 	buf = rte_pktmbuf_alloc(pktmbuf_pool);
@@ -1729,7 +1729,7 @@ test_mbuf_validate_tx_offload(const char *test_name,
 		GOTO_FAIL("%s: mbuf allocation failed!\n", __func__);
 	if (rte_pktmbuf_pkt_len(m) != 0)
 		GOTO_FAIL("%s: Bad packet length\n", __func__);
-	rte_mbuf_sanity_check(m, 0);
+	rte_mbuf_validate(m, 0);
 	m->ol_flags = ol_flags;
 	m->tso_segsz = segsize;
 	ret = rte_validate_tx_offload(m);
@@ -1936,7 +1936,7 @@ test_pktmbuf_read(struct rte_mempool *pktmbuf_pool)
 		GOTO_FAIL("%s: mbuf allocation failed!\n", __func__);
 	if (rte_pktmbuf_pkt_len(m) != 0)
 		GOTO_FAIL("%s: Bad packet length\n", __func__);
-	rte_mbuf_sanity_check(m, 0);
+	rte_mbuf_validate(m, 0);
 
 	data = rte_pktmbuf_append(m, MBUF_TEST_DATA_LEN2);
 	if (data == NULL)
@@ -1985,7 +1985,7 @@ test_pktmbuf_read_from_offset(struct rte_mempool *pktmbuf_pool)
 
 	if (rte_pktmbuf_pkt_len(m) != 0)
 		GOTO_FAIL("%s: Bad packet length\n", __func__);
-	rte_mbuf_sanity_check(m, 0);
+	rte_mbuf_validate(m, 0);
 
 	/* prepend an ethernet header */
 	hdr = (struct ether_hdr *)rte_pktmbuf_prepend(m, hdr_len);
@@ -2130,7 +2130,7 @@ create_packet(struct rte_mempool *pktmbuf_pool,
 			GOTO_FAIL("%s: mbuf allocation failed!\n", __func__);
 		if (rte_pktmbuf_pkt_len(pkt_seg) != 0)
 			GOTO_FAIL("%s: Bad packet length\n", __func__);
-		rte_mbuf_sanity_check(pkt_seg, 0);
+		rte_mbuf_validate(pkt_seg, 0);
 		/* Add header only for the first segment */
 		if (test_data->flags == MBUF_HEADER && seg == 0) {
 			hdr_len = sizeof(struct rte_ether_hdr);
@@ -2342,7 +2342,7 @@ test_pktmbuf_ext_shinfo_init_helper(struct rte_mempool *pktmbuf_pool)
 		GOTO_FAIL("%s: mbuf allocation failed!\n", __func__);
 	if (rte_pktmbuf_pkt_len(m) != 0)
 		GOTO_FAIL("%s: Bad packet length\n", __func__);
-	rte_mbuf_sanity_check(m, 0);
+	rte_mbuf_validate(m, 0);
 
 	ext_buf_addr = rte_malloc("External buffer", buf_len,
 			RTE_CACHE_LINE_SIZE);
@@ -2506,8 +2506,8 @@ test_pktmbuf_ext_pinned_buffer(struct rte_mempool *std_pool)
 		GOTO_FAIL("%s: test_pktmbuf_copy(pinned) failed\n",
 			  __func__);
 
-	if (test_failing_mbuf_sanity_check(pinned_pool) < 0)
-		GOTO_FAIL("%s: test_failing_mbuf_sanity_check(pinned)"
+	if (test_failing_mbuf_validate(pinned_pool) < 0)
+		GOTO_FAIL("%s: test_failing_mbuf_validate(pinned)"
 			  " failed\n", __func__);
 
 	if (test_mbuf_linearize_check(pinned_pool) < 0)
@@ -2881,8 +2881,8 @@ test_mbuf(void)
 		goto err;
 	}
 
-	if (test_failing_mbuf_sanity_check(pktmbuf_pool) < 0) {
-		printf("test_failing_mbuf_sanity_check() failed\n");
+	if (test_failing_mbuf_validate(pktmbuf_pool) < 0) {
+		printf("test_failing_mbuf_validate() failed\n");
 		goto err;
 	}
 
doc/guides/prog_guide/mbuf_lib.rst +2 -2
index 049357c75563..0accb51a98c7 100644
@@ -266,8 +266,8 @@ can be found in several of the sample applications, for example, the IPv4 Multic
 Debug
 -----
 
-In debug mode, the functions of the mbuf library perform sanity checks before any operation (such as, buffer corruption,
-bad type, and so on).
+In debug mode, the functions of the mbuf library perform consistency checks
+before any operation (such as, buffer corruption, bad type, and so on).
 
 Use Cases
 ---------
drivers/net/avp/avp_ethdev.c +9 -9
index b2a08f563542..627b362555e8 100644
@@ -1231,7 +1231,7 @@ _avp_mac_filter(struct avp_dev *avp, struct rte_mbuf *m)
 
 #ifdef RTE_LIBRTE_AVP_DEBUG_BUFFERS
 static inline void
-__avp_dev_buffer_sanity_check(struct avp_dev *avp, struct rte_avp_desc *buf)
+__avp_dev_buffer_check(struct avp_dev *avp, struct rte_avp_desc *buf)
 {
 	struct rte_avp_desc *first_buf;
 	struct rte_avp_desc *pkt_buf;
@@ -1272,12 +1272,12 @@ __avp_dev_buffer_sanity_check(struct avp_dev *avp, struct rte_avp_desc *buf)
 			  first_buf->pkt_len, pkt_len);
 }
 
-#define avp_dev_buffer_sanity_check(a, b) \
-	__avp_dev_buffer_sanity_check((a), (b))
+#define avp_dev_buffer_check(a, b) \
+	__avp_dev_buffer_check((a), (b))
 
 #else /* RTE_LIBRTE_AVP_DEBUG_BUFFERS */
 
-#define avp_dev_buffer_sanity_check(a, b) do {} while (0)
+#define avp_dev_buffer_check(a, b) do {} while (0)
 
 #endif
 
@@ -1302,7 +1302,7 @@ avp_dev_copy_from_buffers(struct avp_dev *avp,
 	void *pkt_data;
 	unsigned int i;
 
-	avp_dev_buffer_sanity_check(avp, buf);
+	avp_dev_buffer_check(avp, buf);
 
 	/* setup the first source buffer */
 	pkt_buf = avp_dev_translate_buffer(avp, buf);
@@ -1370,7 +1370,7 @@ avp_dev_copy_from_buffers(struct avp_dev *avp,
 	rte_pktmbuf_pkt_len(m) = total_length;
 	m->vlan_tci = vlan_tci;
 
-	__rte_mbuf_sanity_check(m, 1);
+	__rte_mbuf_validate(m, 1);
 
 	return m;
 }
@@ -1614,7 +1614,7 @@ avp_dev_copy_to_buffers(struct avp_dev *avp,
 	char *pkt_data;
 	unsigned int i;
 
-	__rte_mbuf_sanity_check(mbuf, 1);
+	__rte_mbuf_validate(mbuf, 1);
 
 	m = mbuf;
 	src_offset = 0;
@@ -1680,7 +1680,7 @@ avp_dev_copy_to_buffers(struct avp_dev *avp,
 		first_buf->vlan_tci = mbuf->vlan_tci;
 	}
 
-	avp_dev_buffer_sanity_check(avp, buffers[0]);
+	avp_dev_buffer_check(avp, buffers[0]);
 
 	return total_length;
 }
@@ -1798,7 +1798,7 @@ avp_xmit_scattered_pkts(void *tx_queue,
 
 #ifdef RTE_LIBRTE_AVP_DEBUG_BUFFERS
 	for (i = 0; i < nb_pkts; i++)
-		avp_dev_buffer_sanity_check(avp, tx_bufs[i]);
+		avp_dev_buffer_check(avp, tx_bufs[i]);
 #endif
 
 	/* send the packets */
drivers/net/sfc/sfc_ef100_rx.c +3 -3
index 16cd8524d32f..fe8920b12590 100644
@@ -178,7 +178,7 @@ sfc_ef100_rx_qrefill(struct sfc_ef100_rxq *rxq)
 			struct sfc_ef100_rx_sw_desc *rxd;
 			rte_iova_t dma_addr;
 
-			__rte_mbuf_raw_sanity_check(m);
+			__rte_mbuf_raw_validate(m);
 
 			dma_addr = rte_mbuf_data_iova_default(m);
 			if (rxq->flags & SFC_EF100_RXQ_NIC_DMA_MAP) {
@@ -541,7 +541,7 @@ sfc_ef100_rx_process_ready_pkts(struct sfc_ef100_rxq *rxq,
 		rxq->ready_pkts--;
 
 		pkt = sfc_ef100_rx_next_mbuf(rxq);
-		__rte_mbuf_raw_sanity_check(pkt);
+		__rte_mbuf_raw_validate(pkt);
 
 		RTE_BUILD_BUG_ON(sizeof(pkt->rearm_data[0]) !=
 				 sizeof(rxq->rearm_data));
@@ -565,7 +565,7 @@ sfc_ef100_rx_process_ready_pkts(struct sfc_ef100_rxq *rxq,
 			struct rte_mbuf *seg;
 
 			seg = sfc_ef100_rx_next_mbuf(rxq);
-			__rte_mbuf_raw_sanity_check(seg);
+			__rte_mbuf_raw_validate(seg);
 
 			seg->data_off = RTE_PKTMBUF_HEADROOM;
 
drivers/net/sfc/sfc_ef10_essb_rx.c +2 -2
index 78bd430363b1..de80be462a0f 100644
@@ -125,7 +125,7 @@ sfc_ef10_essb_next_mbuf(const struct sfc_ef10_essb_rxq *rxq,
 	struct rte_mbuf *m;
 
 	m = (struct rte_mbuf *)((uintptr_t)mbuf + rxq->buf_stride);
-	__rte_mbuf_raw_sanity_check(m);
+	__rte_mbuf_raw_validate(m);
 	return m;
 }
 
@@ -136,7 +136,7 @@ sfc_ef10_essb_mbuf_by_index(const struct sfc_ef10_essb_rxq *rxq,
 	struct rte_mbuf *m;
 
 	m = (struct rte_mbuf *)((uintptr_t)mbuf + idx * rxq->buf_stride);
-	__rte_mbuf_raw_sanity_check(m);
+	__rte_mbuf_raw_validate(m);
 	return m;
 }
 
drivers/net/sfc/sfc_ef10_rx.c +2 -2
index 7be224c9c412..f6c2345d2b74 100644
@@ -148,7 +148,7 @@ sfc_ef10_rx_qrefill(struct sfc_ef10_rxq *rxq)
 			struct sfc_ef10_rx_sw_desc *rxd;
 			rte_iova_t phys_addr;
 
-			__rte_mbuf_raw_sanity_check(m);
+			__rte_mbuf_raw_validate(m);
 
 			SFC_ASSERT((id & ~ptr_mask) == 0);
 			rxd = &rxq->sw_ring[id];
@@ -297,7 +297,7 @@ sfc_ef10_rx_process_event(struct sfc_ef10_rxq *rxq, efx_qword_t rx_ev,
 		rxd = &rxq->sw_ring[pending++ & ptr_mask];
 		m = rxd->mbuf;
 
-		__rte_mbuf_raw_sanity_check(m);
+		__rte_mbuf_raw_validate(m);
 
 		m->data_off = RTE_PKTMBUF_HEADROOM;
 		rte_pktmbuf_data_len(m) = seg_len;
drivers/net/sfc/sfc_rx.c +1 -1
index 5ea98187c3b4..d9f99a9d583d 100644
@@ -120,7 +120,7 @@ sfc_efx_rx_qrefill(struct sfc_efx_rxq *rxq)
 		     ++i, id = (id + 1) & rxq->ptr_mask) {
 			m = objs[i];
 
-			__rte_mbuf_raw_sanity_check(m);
+			__rte_mbuf_raw_validate(m);
 
 			rxd = &rxq->sw_desc[id];
 			rxd->mbuf = m;
examples/ipv4_multicast/main.c +1 -1
index 6d0a8501eff5..4be74e7af55a 100644
@@ -258,7 +258,7 @@ mcast_out_pkt(struct rte_mbuf *pkt, int use_clone)
 	hdr->pkt_len = (uint16_t)(hdr->data_len + pkt->pkt_len);
 	hdr->nb_segs = pkt->nb_segs + 1;
 
-	__rte_mbuf_sanity_check(hdr, 1);
+	__rte_mbuf_validate(hdr, 1);
 	return hdr;
 }
 /* >8 End of mcast_out_kt. */
lib/mbuf/rte_mbuf.c +8 -8
index 686e797c80c4..6afa9de98d4e 100644
@@ -363,9 +363,9 @@ rte_pktmbuf_pool_create_extbuf(const char *name, unsigned int n,
 	return mp;
 }
 
-/* do some sanity checks on a mbuf: panic if it fails */
+/* do some checks on a mbuf: panic if it fails */
 void
-rte_mbuf_sanity_check(const struct rte_mbuf *m, int is_header)
+rte_mbuf_validate(const struct rte_mbuf *m, int is_header)
 {
 	const char *reason;
 
@@ -492,7 +492,7 @@ void rte_pktmbuf_free_bulk(struct rte_mbuf **mbufs, unsigned int count)
 		if (unlikely(m == NULL))
 			continue;
 
-		__rte_mbuf_sanity_check(m, 1);
+		__rte_mbuf_validate(m, 1);
 
 		do {
 			m_next = m->next;
@@ -542,7 +542,7 @@ rte_pktmbuf_clone(struct rte_mbuf *md, struct rte_mempool *mp)
 		return NULL;
 	}
 
-	__rte_mbuf_sanity_check(mc, 1);
+	__rte_mbuf_validate(mc, 1);
 	return mc;
 }
 
@@ -592,7 +592,7 @@ rte_pktmbuf_copy(const struct rte_mbuf *m, struct rte_mempool *mp,
 	struct rte_mbuf *mc, *m_last, **prev;
 
 	/* garbage in check */
-	__rte_mbuf_sanity_check(m, 1);
+	__rte_mbuf_validate(m, 1);
 
 	/* check for request to copy at offset past end of mbuf */
 	if (unlikely(off >= m->pkt_len))
@@ -656,7 +656,7 @@ rte_pktmbuf_copy(const struct rte_mbuf *m, struct rte_mempool *mp,
 	}
 
 	/* garbage out check */
-	__rte_mbuf_sanity_check(mc, 1);
+	__rte_mbuf_validate(mc, 1);
 	return mc;
 }
 
@@ -667,7 +667,7 @@ rte_pktmbuf_dump(FILE *f, const struct rte_mbuf *m, unsigned dump_len)
 	unsigned int len;
 	unsigned int nb_segs;
 
-	__rte_mbuf_sanity_check(m, 1);
+	__rte_mbuf_validate(m, 1);
 
 	fprintf(f, "dump mbuf at %p, iova=%#" PRIx64 ", buf_len=%u\n", m, rte_mbuf_iova_get(m),
 		m->buf_len);
@@ -685,7 +685,7 @@ rte_pktmbuf_dump(FILE *f, const struct rte_mbuf *m, unsigned dump_len)
 	nb_segs = m->nb_segs;
 
 	while (m && nb_segs != 0) {
-		__rte_mbuf_sanity_check(m, 0);
+		__rte_mbuf_validate(m, 0);
 
 		fprintf(f, "  segment at %p, data=%p, len=%u, off=%u, refcnt=%u\n",
 			m, rte_pktmbuf_mtod(m, void *),
lib/mbuf/rte_mbuf.h +39 -32

222 lines not on this page · raw message

lib/mbuf/version.map +1 -1
index ed486ed14ec7..e968c54a0807 100644
@@ -27,7 +27,6 @@ DPDK_23 {
 	rte_mbuf_dynflag_register;
 	rte_mbuf_dynflag_register_bitnum;
 	rte_mbuf_platform_mempool_ops;
-	rte_mbuf_sanity_check;
 	rte_mbuf_set_platform_mempool_ops;
 	rte_mbuf_set_user_mempool_ops;
 	rte_mbuf_user_mempool_ops;
@@ -39,6 +38,7 @@ DPDK_23 {
 	rte_pktmbuf_pool_create;
 	rte_pktmbuf_pool_create_by_ops;
 	rte_pktmbuf_pool_init;
+	rte_mbuf_validate;
 
 	local: *;
 };
Signature · 1 line
2.39.2
#2 lore raw

RE: [PATCH 01/20] mbuf: replace term sanity check

Quoted 8 lines

From: Stephen Hemminger [mailto:[email protected]]
Sent: Wednesday, 17 May 2023 18.16

The term sanity check is on the Tier 2 list of words that should be replaced.

---

Naming is hard... I have shared a bunch of unfiltered thoughts below, mainly about trying to reuse the same terms everywhere. The quality varies, so just disregard the comments you consider silly.

Anyway, thank you for the effort put into this, Stephen!

[...]

app/test/test_mbuf.c test_one_pktmbuf(struct rte_mempool *pktmbuf_pool) · line 265

Quoted 4 lines
app/test/test_mbuf.c +2 -2
-	rte_mbuf_sanity_check(m, 1);
-	rte_mbuf_sanity_check(m, 0);
+	rte_mbuf_validate(m, 1);
+	rte_mbuf_validate(m, 0);

Note: "mbuf_sanity_check()" -> "mbuf_validate()"

[...]

Quoted 11 lines
doc/guides/prog_guide/mbuf_lib.rst +0 -0
@@ -266,8 +266,8 @@ can be found in several of the sample applications,

for example, the IPv4 Multic
Debug
-----

-In debug mode, the functions of the mbuf library perform sanity checks before any operation (such as, buffer corruption,

doc/guides/prog_guide/mbuf_lib.rst +1 -1
-bad type, and so on).
+In debug mode, the functions of the mbuf library perform consistency
Quoted 2 lines

checks
+before any operation (such as, buffer corruption, bad type, and so on).

Note: "sanity checks" -> "consistency checks"

[...]

doc/guides/prog_guide/mbuf_lib.rst

Quoted 9 lines
doc/guides/prog_guide/mbuf_lib.rst +3 -3
-#define avp_dev_buffer_sanity_check(a, b) \
-	__avp_dev_buffer_sanity_check((a), (b))
+#define avp_dev_buffer_check(a, b) \
+	__avp_dev_buffer_check((a), (b))
 
 #else /* RTE_LIBRTE_AVP_DEBUG_BUFFERS */
 
-#define avp_dev_buffer_sanity_check(a, b) do {} while (0)
+#define avp_dev_buffer_check(a, b) do {} while (0)

Note: "buffer_sanity_check()" -> "buffer_check()"

Shouldn't these become "buffer_validate()" instead of "buffer_check()"?

[...]

doc/guides/prog_guide/mbuf_lib.rst rte_pktmbuf_pool_create_extbuf(const char *name, · line 367

Quoted 8 lines

+++ b/lib/mbuf/rte_mbuf.c

doc/guides/prog_guide/mbuf_lib.rst +1 -1
@@ -363,9 +363,9 @@ rte_pktmbuf_pool_create_extbuf(const char *name,
 unsigned int n,
 	return mp;
 }
 
-/* do some sanity checks on a mbuf: panic if it fails */
+/* do some checks on a mbuf: panic if it fails */

Trying to make the description resemble the function name, suggest: "validate mbuf consistency; panic if it fails"

Quoted 3 lines
doc/guides/prog_guide/mbuf_lib.rst +1 -1
 void
-rte_mbuf_sanity_check(const struct rte_mbuf *m, int is_header)
+rte_mbuf_validate(const struct rte_mbuf *m, int is_header)

[...]

doc/guides/prog_guide/mbuf_lib.rst rte_pktmbuf_priv_flags(struct rte_mempool *mp) · line 342

Quoted 8 lines

+++ b/lib/mbuf/rte_mbuf.h

doc/guides/prog_guide/mbuf_lib.rst +1 -2
@@ -339,13 +339,13 @@ rte_pktmbuf_priv_flags(struct rte_mempool *mp)
 
 #ifdef RTE_LIBRTE_MBUF_DEBUG
 
-/**  check mbuf type in debug mode */
-#define __rte_mbuf_sanity_check(m, is_h) rte_mbuf_sanity_check(m, is_h)
+/**  do mbuf type in debug mode */

"do mbuf type" -> "validate mbuf consistency"

doc/guides/prog_guide/mbuf_lib.rst rte_pktmbuf_priv_flags(struct rte_mempool *mp) · line 347

Quoted 7 lines
doc/guides/prog_guide/mbuf_lib.rst +2 -2
+#define __rte_mbuf_validate(m, is_h) rte_mbuf_validate(m, is_h)
 
 #else /*  RTE_LIBRTE_MBUF_DEBUG */
 
-/**  check mbuf type in debug mode */
-#define __rte_mbuf_sanity_check(m, is_h) do { } while (0)
+/**  ignore mbuf checks if not in debug mode */

Good improvement mentioning that they are ignored.

Trying to make the description resemble the function name, suggest: "ignore mbuf consistency validation if not in debug mode"

doc/guides/prog_guide/mbuf_lib.rst rte_mbuf_ext_refcnt_update(struct · line 518

Quoted 11 lines
doc/guides/prog_guide/mbuf_lib.rst +2 -1
+#define __rte_mbuf_validate(m, is_h) do { } while (0)
 
 #endif /*  RTE_LIBRTE_MBUF_DEBUG */
 
@@ -514,7 +514,7 @@ rte_mbuf_ext_refcnt_update(struct
 rte_mbuf_ext_shared_info *shinfo,
 
 
 /**
- * Sanity checks on an mbuf.
+ * Consistency checks on an mbuf.

Trying to make the description resemble the function name, suggest: "Validate mbuf consistency."

Quoted 12 lines
doc/guides/prog_guide/mbuf_lib.rst +0 -0
  *
  * Check the consistency of the given mbuf. The function will cause a

* panic if corruption is detected.

doc/guides/prog_guide/mbuf_lib.rst +2 -1
@@ -526,12 +526,19 @@ rte_mbuf_ext_refcnt_update(struct
 rte_mbuf_ext_shared_info *shinfo,
  *   of a packet (in this case, some fields like nb_segs are not
 checked)
  */
 void
-rte_mbuf_sanity_check(const struct rte_mbuf *m, int is_header);
+rte_mbuf_validate(const struct rte_mbuf *m, int is_header);
+

doc/guides/prog_guide/mbuf_lib.rst rte_mbuf_ext_refcnt_update(struct · line 541

Quoted 10 lines
doc/guides/prog_guide/mbuf_lib.rst +7 -1
+/* Older deprecated name for rte_mbuf_validate() */
+static inline __rte_deprecated
+void rte_mbuf_sanity_check(const struct rte_mbuf *m, int is_header)
+{
+	rte_mbuf_validate(m, is_header);
+}
 
 /**
- * Sanity checks on a mbuf.
+ * Do consistency checks on a mbuf.

Trying to make the description resemble the function name, suggest: "Validate mbuf consistency." Nothing wrong with using the exact same description headline.

Quoted 8 lines
doc/guides/prog_guide/mbuf_lib.rst +0 -1
  *
- * Almost like rte_mbuf_sanity_check(), but this function gives the

reason
+ * Almost like rte_mbuf_validate(), but this function gives the reason
* if corruption is detected rather than panic.
*
* @param m

doc/guides/prog_guide/mbuf_lib.rst int rte_mbuf_check(const struct rte_mbuf *m, int · line 562

Quoted 6 lines
doc/guides/prog_guide/mbuf_lib.rst +1 -1
@@ -551,7 +558,7 @@ int rte_mbuf_check(const struct rte_mbuf *m, int
 is_header,
 		   const char **reason);
 
 /**
- * Sanity checks on a reinitialized mbuf in debug mode.
+ * Do checks on a reinitialized mbuf in debug mode.

Trying to make the description resemble the function name, suggest: "Validate consistency of a reinitialized mbuf in debug mode."

Quoted 3 lines
doc/guides/prog_guide/mbuf_lib.rst +0 -0
  *
  * Check the consistency of the given reinitialized mbuf.

* The function will cause a panic if corruption is detected.

[...]

doc/guides/prog_guide/mbuf_lib.rst

Quoted 3 lines

/** For backwards compatibility. */

doc/guides/prog_guide/mbuf_lib.rst +1 -1
-#define MBUF_RAW_ALLOC_CHECK(m) __rte_mbuf_raw_sanity_check(m)
+#define MBUF_RAW_ALLOC_CHECK(m) __rte_mbuf_raw_validate(m)

This macro is not used in DPDK, and we are renaming the related functions anyway; let's remove this macro while we are at it. (The macro also lacks the RTE_ prefix.)

[...]

Quoted 10 lines

+++ b/lib/mbuf/version.map

doc/guides/prog_guide/mbuf_lib.rst +0 -1
@@ -27,7 +27,6 @@ DPDK_23 {
 	rte_mbuf_dynflag_register;
 	rte_mbuf_dynflag_register_bitnum;
 	rte_mbuf_platform_mempool_ops;
-	rte_mbuf_sanity_check;
 	rte_mbuf_set_platform_mempool_ops;
 	rte_mbuf_set_user_mempool_ops;
 	rte_mbuf_user_mempool_ops;

doc/guides/prog_guide/mbuf_lib.rst DPDK_23 { · line 41

Quoted 4 lines
doc/guides/prog_guide/mbuf_lib.rst +1 -0
@@ -39,6 +38,7 @@ DPDK_23 {
 	rte_pktmbuf_pool_create;
 	rte_pktmbuf_pool_create_by_ops;
 	rte_pktmbuf_pool_init;
+	rte_mbuf_validate;

The public function is renamed, so it belongs in the next API version, not DPDK_23.

Quoted 3 lines
doc/guides/prog_guide/mbuf_lib.rst +0 -0
 	local: *;
 };
#4 lore raw

PATCH 2/20 eal: replace use of sanity check in comments and messages

In reply to Stephen Hemminger

Sanity check is on the Tier 2 non-inclusive list.
Replace or remove it.

---
 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(-)
lib/eal/common/eal_common_memory.c +1 -1
index e21fc7cfaecc..f99c6b43c885 100644
@@ -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",
lib/eal/common/eal_common_proc.c +2 -1
index 1fc1d6c53bd2..972f3269d8ae 100644
@@ -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;
lib/eal/common/eal_common_trace.c +1 -1
index cb980af06d9f..cadb85b94fde 100644
@@ -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;
lib/eal/common/eal_memcfg.h +1 -1
index ea013a9daf17..dc7ef18dc11b 100644
@@ -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. */
 
lib/eal/common/rte_malloc.c +1 -1
index ebafef3f6cf2..e632c395132c 100644
@@ -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);
lib/eal/freebsd/eal.c +1 -1
index 7daf22e31449..d3499dd5906d 100644
@@ -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;
lib/eal/linux/eal.c +1 -1
index ae323cd492d4..251aa533b274 100644
@@ -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;
lib/eal/windows/eal.c +1 -1
index 033825c14c67..17a5f9d1ba30 100644
@@ -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;
Signature · 1 line
2.39.2
#6 lore raw

PATCH 3/20 net/ring: replace use of sanity

In reply to Stephen Hemminger
---
 drivers/net/ring/rte_eth_ring.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/net/ring/rte_eth_ring.c +2 -5
index e8bc9b627102..e36742fda84f 100644
@@ -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 {
@@ -591,10 +591,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)
Signature · 1 line
2.39.2
#7 lore raw

PATCH 4/20 test: replace use word sanity

In reply to Stephen Hemminger

The word "sanity" is on the not-allowed inclusive naming list. Replace the unnecessary usage in tests.

---
 app/test/test_bitmap.c             |  4 +--
 app/test/test_bpf.c                |  6 ++--
 app/test/test_common.c             |  2 +-
 app/test/test_distributor.c        | 46 +++++++++++++++---------------
 app/test/test_dmadev.c             |  2 +-
 app/test/test_eal_flags.c          | 20 ++++++-------
 app/test/test_hash.c               |  2 +-
 app/test/test_interrupts.c         |  9 +++---
 app/test/test_link_bonding_mode4.c |  2 +-
 app/test/test_mbuf.c               |  2 +-
 app/test/test_rawdev.c             |  2 +-
 app/test/test_timer.c              | 10 +++----
 12 files changed, 54 insertions(+), 53 deletions(-)
app/test/test_bitmap.c +2 -2
index e9c61590aef7..8cb5d0954a2b 100644
@@ -33,7 +33,7 @@ test_bitmap_scan_operations(struct rte_bitmap *bmp)
 	}
 
 	if (slab1_magic != out_slab) {
-		printf("Scan operation sanity failed.\n");
+		printf("Scan operation magic number check failed.\n");
 		return TEST_FAILED;
 	}
 
@@ -43,7 +43,7 @@ test_bitmap_scan_operations(struct rte_bitmap *bmp)
 	}
 
 	if (slab2_magic != out_slab) {
-		printf("Scan operation sanity failed.\n");
+		printf("Scan operation magic number check failed.\n");
 		return TEST_FAILED;
 	}
 
app/test/test_bpf.c +3 -3
index f5af5e8a3f4a..347b672ac211 100644
@@ -3329,9 +3329,9 @@ test_bpf_match(pcap_t *pcap, const char *str,
 	return ret;
 }
 
-/* Basic sanity test can we match a IP packet */
+/* Basic test can we match a IP packet */
 static int
-test_bpf_filter_sanity(pcap_t *pcap)
+test_bpf_filter_match(pcap_t *pcap)
 {
 	const uint32_t plen = 100;
 	struct rte_mbuf mb, *m;
@@ -3463,7 +3463,7 @@ test_bpf_convert(void)
 		return -1;
 	}
 
-	rc = test_bpf_filter_sanity(pcap);
+	rc = test_bpf_filter_match(pcap);
 	for (i = 0; i < RTE_DIM(sample_filters); i++)
 		rc |= test_bpf_filter(pcap, sample_filters[i]);
 
app/test/test_common.c +1 -1
index f89e1eb7ee0d..c7ce8ea32a77 100644
@@ -18,7 +18,7 @@
 	{printf(x "() test failed!\n");\
 	return -1;}
 
-/* this is really a sanity check */
+/* this is really a consistency check */
 static int
 test_macros(int __rte_unused unused_parm)
 {
app/test/test_distributor.c +23 -23

177 lines not on this page · raw message

app/test/test_dmadev.c +1 -1
index 0736ff2a1867..b54319f763f4 100644
@@ -927,7 +927,7 @@ test_dma(void)
 {
 	int i;
 
-	/* basic sanity on dmadev infrastructure */
+	/* basic validation on dmadev infrastructure */
 	if (test_apis() < 0)
 		ERR_RETURN("Error performing API tests\n");
 
app/test/test_eal_flags.c +10 -10
index d2b91e20750e..edbe1be50096 100644
@@ -314,7 +314,7 @@ get_number_of_sockets(void)
 
 /*
  * Test that the app doesn't run with invalid allow option.
- * Final tests ensures it does run with valid options as sanity check (one
+ * Final tests ensures it does run with valid options as basic test (one
  * test for with Domain+BDF, second for just with BDF)
  */
 static int
@@ -382,7 +382,7 @@ test_allow_flag(void)
 
 /*
  * Test that the app doesn't run with invalid blocklist option.
- * Final test ensures it does run with valid options as sanity check
+ * Final test ensures it does run with valid options as basic check.
  */
 static int
 test_invalid_b_flag(void)
@@ -429,7 +429,7 @@ test_invalid_b_flag(void)
 
 /*
  *  Test that the app doesn't run with invalid vdev option.
- *  Final test ensures it does run with valid options as sanity check
+ *  Final test ensures it does run with valid options basic check.
  */
 static int
 test_invalid_vdev_flag(void)
@@ -554,7 +554,7 @@ test_missing_c_flag(void)
 	/* bad coremask value */
 	const char *argv3[] = { prgname, prefix, mp_flag,
 				"-c", "error" };
-	/* sanity check of tests - valid coremask value */
+	/* check of tests - valid coremask value */
 	const char *argv4[] = { prgname, prefix, mp_flag,
 				"-c", "1" };
 	/* -l flag but no corelist value */
@@ -581,7 +581,7 @@ test_missing_c_flag(void)
 				"-l", RTE_STR(RTE_MAX_LCORE) };
 	const char * const argv14[] = { prgname, prefix, mp_flag,
 				"-l", "1-"RTE_STR(RTE_MAX_LCORE) };
-	/* sanity check test - valid corelist value */
+	/* check test - valid corelist value */
 	const char * const argv15[] = { prgname, prefix, mp_flag,
 				 "-l", "1-2,3" };
 
@@ -613,7 +613,7 @@ test_missing_c_flag(void)
 				 "--lcores", "(4-7)=(1,3)" };
 	const char * const argv28[] = { prgname, prefix, mp_flag,
 				 "--lcores", "[4-7]@(1,3)" };
-	/* sanity check of tests - valid lcores value */
+	/* more complex valid lcores value */
 	const char * const argv29[] = { prgname, prefix, mp_flag,
 				 "--lcores",
 				 "0-1,2@(5-7),(3-5)@(0,2),(0,6),7"};
@@ -744,7 +744,7 @@ test_main_lcore_flag(void)
 
 /*
  * Test that the app doesn't run with invalid -n flag option.
- * Final test ensures it does run with valid options as sanity check
+ * Final test ensures it does run with valid options as basic check.
  * Since -n is not compulsory for MP, we instead use --no-huge and --no-shconf
  * flags.
  */
@@ -772,10 +772,10 @@ test_invalid_n_flag(void)
 	/* zero is invalid */
 	const char *argv3[] = { prgname, prefix, no_huge, no_shconf,
 				"-n", "0" };
-	/* sanity test - check with good value */
+	/* check with good value */
 	const char *argv4[] = { prgname, prefix, no_huge, no_shconf,
 				"-n", "2" };
-	/* sanity test - check with no -n flag */
+	/* check with no -n flag */
 	const char *argv5[] = { prgname, prefix, no_huge, no_shconf};
 
 	if (launch_proc(argv1) == 0
@@ -977,7 +977,7 @@ test_misc_flags(void)
 	 * All cases, apart from the first, app should run.
 	 * No further testing of output done.
 	 */
-	/* sanity check - failure with invalid option */
+	/* failure with invalid option */
 	const char *argv0[] = {prgname, prefix, mp_flag, "--invalid-opt"};
 
 	/* With --no-pci */
app/test/test_hash.c +1 -1
index 3e45afaa67fc..f521ce7f679a 100644
@@ -1088,7 +1088,7 @@ fbk_hash_unit_test(void)
 		.socket_id = 0,
 	};
 
-	/* this is a sanity check for "same name" test
+	/* this is a check for "same name" test
 	 * creating this hash will check if we are actually able to create
 	 * multiple hashes with different names (instead of having just one).
 	 */
app/test/test_interrupts.c +5 -4
index b59ab426999c..88105b78a455 100644
@@ -48,7 +48,7 @@ static union intr_pipefds pfds;
  * Check if the interrupt handle is valid.
  */
 static inline int
-test_interrupt_handle_sanity_check(struct rte_intr_handle *intr_handle)
+test_interrupt_handle_check(struct rte_intr_handle *intr_handle)
 {
 	if (!intr_handle || rte_intr_fd_get(intr_handle) < 0)
 		return -1;
@@ -164,7 +164,7 @@ test_interrupt_handle_compare(struct rte_intr_handle *intr_handle_l,
 #else
 /* to be implemented for bsd later */
 static inline int
-test_interrupt_handle_sanity_check(struct rte_intr_handle *intr_handle)
+test_interrupt_handle_check(struct rte_intr_handle *intr_handle)
 {
 	RTE_SET_USED(intr_handle);
 
@@ -215,7 +215,7 @@ test_interrupt_callback(void *arg)
 		return;
 	}
 
-	if (test_interrupt_handle_sanity_check(intr_handle) < 0) {
+	if (test_interrupt_handle_check(intr_handle) < 0) {
 		printf("null or invalid intr_handle for %s\n", __func__);
 		flag = -1;
 		return;
@@ -241,7 +241,8 @@ static void
 test_interrupt_callback_1(void *arg)
 {
 	struct rte_intr_handle *intr_handle = arg;
-	if (test_interrupt_handle_sanity_check(intr_handle) < 0) {
+
+	if (test_interrupt_handle_check(intr_handle) < 0) {
 		printf("null or invalid intr_handle for %s\n", __func__);
 		flag = -1;
 		return;
app/test/test_link_bonding_mode4.c +1 -1
index 21c512c94b89..95dd52848fb9 100644
@@ -224,7 +224,7 @@ add_slave(struct slave_conf *slave, uint8_t start)
 	struct rte_ether_addr addr, addr_check;
 	int retval;
 
-	/* Some sanity check */
+	/* Some basic tests. */
 	RTE_VERIFY(test_params.slave_ports <= slave &&
 		slave - test_params.slave_ports < (int)RTE_DIM(test_params.slave_ports));
 	RTE_VERIFY(slave->bonded == 0);
app/test/test_mbuf.c +1 -1
index db9bb3caeea2..3add3d8717de 100644
@@ -1723,7 +1723,7 @@ test_mbuf_validate_tx_offload(const char *test_name,
 	struct rte_mbuf *m = NULL;
 	int ret = 0;
 
-	/* alloc a mbuf and do sanity check */
+	/* alloc a mbuf and do some basic checks */
 	m = rte_pktmbuf_alloc(pktmbuf_pool);
 	if (m == NULL)
 		GOTO_FAIL("%s: mbuf allocation failed!\n", __func__);
app/test/test_rawdev.c +1 -1
index 3c780e3f9e96..c807bf90d9c3 100644
@@ -47,7 +47,7 @@ test_rawdev_selftests(void)
 	int ret = 0;
 	int i;
 
-	/* basic sanity on rawdev infrastructure */
+	/* basic check on rawdev infrastructure */
 	if (test_rawdev_selftest_skeleton() < 0)
 		return -1;
 
app/test/test_timer.c +5 -5
index 0c36dc9010b0..6615ce536443 100644
@@ -491,11 +491,11 @@ timer_basic_main_loop(__rte_unused void *arg)
 }
 
 static int
-timer_sanity_check(void)
+timer_check(void)
 {
 #ifdef RTE_LIBEAL_USE_HPET
 	if (eal_timer_source != EAL_TIMER_HPET) {
-		printf("Not using HPET, can't sanity check timer sources\n");
+		printf("Not using HPET, can't check timer sources\n");
 		return 0;
 	}
 
@@ -539,9 +539,9 @@ test_timer(void)
 		return TEST_SKIPPED;
 	}
 
-	/* sanity check our timer sources and timer config values */
-	if (timer_sanity_check() < 0) {
-		printf("Timer sanity checks failed\n");
+	/* check our timer sources and timer config values */
+	if (timer_check() < 0) {
+		printf("Timer checks failed\n");
 		return TEST_FAILED;
 	}
 
Signature · 1 line
2.39.2
#8 lore raw

PATCH 5/20 examples: remove term sanity

In reply to Stephen Hemminger

Do not use non-inclusive terms.

---
 examples/ipsec-secgw/event_helper.c | 2 +-
 examples/qos_sched/args.c           | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
examples/ipsec-secgw/event_helper.c +1 -1
index 89fb7e62a5a3..f595b4fe01dc 100644
@@ -2100,7 +2100,7 @@ eh_launch_worker(struct eh_conf *conf, struct eh_app_worker_params *app_wrkr,
 		goto clean_and_exit;
 	}
 
-	/* Verify sanity of the matched worker */
+	/* Verify validity of the matched worker */
 	if (eh_verify_match_worker(match_wrkr) != 1) {
 		EH_LOG_ERR("Failed to validate the matched worker");
 		goto clean_and_exit;
examples/qos_sched/args.c +1 -1
index e97273152aa7..1d8ba9522586 100644
@@ -384,7 +384,7 @@ app_parse_args(int argc, char **argv)
 		return -1;
 	}
 
-	/* sanity check for cores assignment */
+	/* check for cores assignment */
 	for(i = 0; i < nb_pfc; i++) {
 		if (qos_conf[i].rx_core >= RTE_MAX_LCORE) {
 			RTE_LOG(ERR, APP, "pfc %u: invalid RX lcore index %u\n", i + 1,
Signature · 1 line
2.39.2
#9 lore raw

PATCH 6/20 lib: replace use of sanity check in comments and messages

In reply to Stephen Hemminger

Sanity check is on the Tier 2 non-inclusive list.
Replace or remove it.

---
 lib/graph/graph.c           | 2 +-
 lib/graph/graph_stats.c     | 2 +-
 lib/graph/node.c            | 2 +-
 lib/jobstats/rte_jobstats.c | 6 +++---
 lib/metrics/rte_metrics.c   | 2 +-
 lib/pcapng/rte_pcapng.c     | 2 +-
 6 files changed, 8 insertions(+), 8 deletions(-)
lib/graph/graph.c +1 -1
index 5582631b5301..597e9e7aa28e 100644
@@ -283,7 +283,7 @@ rte_graph_create(const char *name, struct rte_graph_param *prm)
 
 	graph_spinlock_lock();
 
-	/* Check arguments sanity */
+	/* Check argument validity */
 	if (prm == NULL)
 		SET_ERR_JMP(EINVAL, fail, "Param should not be NULL");
 
lib/graph/graph_stats.c +1 -1
index c0140ba92212..28d5728e5e61 100644
@@ -271,7 +271,7 @@ rte_graph_cluster_stats_create(const struct rte_graph_cluster_stats_param *prm)
 	const char *pattern;
 	rte_graph_t i;
 
-	/* Sanity checks */
+	/* Validate arguments */
 	if (!rte_graph_has_stats_feature())
 		SET_ERR_JMP(EINVAL, fail, "Stats feature is not enabled");
 
lib/graph/node.c +1 -1
index 149414dcd94c..3f0ae0c395db 100644
@@ -68,7 +68,7 @@ __rte_node_register(const struct rte_node_register *reg)
 
 	graph_spinlock_lock();
 
-	/* Check sanity */
+	/* Check argument validity */
 	if (reg == NULL || reg->process == NULL) {
 		rte_errno = EINVAL;
 		goto fail;
lib/jobstats/rte_jobstats.c +3 -3
index af565a14eaf3..1c4b280c952a 100644
@@ -124,7 +124,7 @@ rte_jobstats_start(struct rte_jobstats_context *ctx, struct rte_jobstats *job)
 {
 	uint64_t now;
 
-	/* Some sanity check. */
+	/* Check validity of arguments. */
 	if (unlikely(ctx == NULL || job == NULL || job->context != NULL))
 		return -EINVAL;
 
@@ -144,7 +144,7 @@ rte_jobstats_abort(struct rte_jobstats *job)
 	struct rte_jobstats_context *ctx;
 	uint64_t now, exec_time;
 
-	/* Some sanity check. */
+	/* Check that arguments are valid */
 	if (unlikely(job == NULL || job->context == NULL))
 		return -EINVAL;
 
@@ -165,7 +165,7 @@ rte_jobstats_finish(struct rte_jobstats *job, int64_t job_value)
 	uint64_t now, exec_time;
 	int need_update;
 
-	/* Some sanity check. */
+	/* Check arguments */
 	if (unlikely(job == NULL || job->context == NULL))
 		return -EINVAL;
 
lib/metrics/rte_metrics.c +1 -1
index 0ccdbabc04eb..5c075ae60230 100644
@@ -120,7 +120,7 @@ rte_metrics_reg_names(const char * const *names, uint16_t cnt_names)
 	uint16_t idx_name;
 	uint16_t idx_base;
 
-	/* Some sanity checks */
+	/* Some consitency checks */
 	if (cnt_names < 1 || names == NULL)
 		return -EINVAL;
 	for (idx_name = 0; idx_name < cnt_names; idx_name++)
lib/pcapng/rte_pcapng.c +1 -1
index 3c91fc77644a..fedf4b5b7f11 100644
@@ -669,7 +669,7 @@ rte_pcapng_write_packets(rte_pcapng_t *self,
 		struct rte_mbuf *m = pkts[i];
 		struct pcapng_enhance_packet_block *epb;
 
-		/* sanity check that is really a pcapng mbuf */
+		/* Check that is really a pcapng mbuf */
 		epb = rte_pktmbuf_mtod(m, struct pcapng_enhance_packet_block *);
 		if (unlikely(epb->block_type != PCAPNG_ENHANCED_PACKET_BLOCK ||
 			     epb->block_length != rte_pktmbuf_data_len(m))) {
Signature · 1 line
2.39.2
#10 lore raw

PATCH 7/20 net/nfp: remove word sanity

In reply to Stephen Hemminger

There are two small uses of the non-inclusive term "sanity". One in comment is easily removed, other is in a macro that was defined but never used.

---
 drivers/net/nfp/nfp_flow.c                     |  2 +-
 drivers/net/nfp/nfpcore/nfp-common/nfp_resid.h | 13 -------------
 2 files changed, 1 insertion(+), 14 deletions(-)
drivers/net/nfp/nfp_flow.c +1 -1
index 41b722f4d898..05507bc3a113 100644
@@ -1944,7 +1944,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);
drivers/net/nfp/nfpcore/nfp-common/nfp_resid.h +0 -13
index 394a7628e08a..b7e77d8fa051 100644
@@ -183,19 +183,6 @@ NFP_CPP_ID_ISLAND_of(uint32_t id)
 		(int)(((_a) << 4) | ((_b) + 4)) : -1) \
 	}))
 
-/*
- *  Do a general sanity check on the ME ID.
- * The check is on the highest possible island ID for the chip family and the
- * microengine number must  be a master ID.
- * @param meid      ME ID as created by NFP6000_MEID
- */
-#define NFP6000_MEID_IS_VALID(meid) \
-	(__extension__ ({ \
-		typeof(meid) _a = (meid); \
-		((((_a) >> 4) < 64) && (((_a) >> 4) >= 0) && \
-		 (((_a) & 0xF) >= 4)) \
-	}))
-
 /*
  *  Extract island ID from ME ID.
  * @param meid   ME ID as created by NFP6000_MEID
Signature · 1 line
2.39.2
Reviewed-by on v1 7/20
#11 lore raw

RE: [PATCH 07/20] net/nfp: remove word sanity

That looks good, thanks!

Actually, we also will delete it in an upcoming patch, so it's okay to remove it here.

Quoted 60 lines

-----Original Message-----
From: Stephen Hemminger <[email protected]>
Sent: Thursday, May 18, 2023 12:16 AM
To: [email protected]
Cc: Stephen Hemminger <[email protected]>; Chaoyong He <[email protected]>; Niklas Soderlund <[email protected]>
Subject: [PATCH 07/20] net/nfp: remove word sanity

There are two small uses of the non-inclusive term "sanity". One in comment is easily removed, other is in a macro that was defined but never used.

---
 drivers/net/nfp/nfp_flow.c                     |  2 +-
 drivers/net/nfp/nfpcore/nfp-common/nfp_resid.h | 13 -------------
 2 files changed, 1 insertion(+), 14 deletions(-)
drivers/net/nfp/nfp_flow.c index renamed from drivers/net/nfp/nfp_flow.c +0 -0

41b722f4d898..05507bc3a113 100644

drivers/net/nfp/nfp_flow.c +1 -1
@@ -1944,7 +1944,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/nfpcore/nfp-common/nfp_resid.h b/drivers/net/nfp/nfpcore/nfp-common/nfp_resid.h
index 394a7628e08a..b7e77d8fa051 100644

drivers/net/nfp/nfpcore/nfp-common/nfp_resid.h +0 -14
@@ -183,19 +183,6 @@ NFP_CPP_ID_ISLAND_of(uint32_t id)
 		(int)(((_a) << 4) | ((_b) + 4)) : -1) \
 	}))
 
-/*
- *  Do a general sanity check on the ME ID.
- * The check is on the highest possible island ID for the chip family and the
- * microengine number must  be a master ID.
- * @param meid      ME ID as created by NFP6000_MEID
- */
-#define NFP6000_MEID_IS_VALID(meid) \
-	(__extension__ ({ \
-		typeof(meid) _a = (meid); \
-		((((_a) >> 4) < 64) && (((_a) >> 4) >= 0) && \
-		 (((_a) & 0xF) >= 4)) \
-	}))
-
 /*
  *  Extract island ID from ME ID.
  * @param meid   ME ID as created by NFP6000_MEID
--

2.39.2

#12 lore raw

PATCH 8/20 doc/eventdev_pipeline: remove sanity

In reply to Stephen Hemminger

The word sanity check is unnecessary here.

---
 doc/guides/gpus/cuda.rst                       | 2 +-
 doc/guides/sample_app_ug/eventdev_pipeline.rst | 2 +-
 doc/guides/tools/testbbdev.rst                 | 8 ++++----
 3 files changed, 6 insertions(+), 6 deletions(-)
doc/guides/gpus/cuda.rst +1 -1
index 114e3bc8cb72..75f107095593 100644
@@ -81,7 +81,7 @@ Similarly to CUDA shared library, if the **libgdrapi.so** shared library
 is not installed in default locations (e.g. /usr/local/lib),
 you can use the variable ``GDRCOPY_PATH_L``.
 
-As an example, to enable the CPU map feature sanity check,
+As an example, to enable the CPU map feature check,
 run the ``app/test-gpudev`` application with:
 
 .. code-block:: console
doc/guides/sample_app_ug/eventdev_pipeline.rst +1 -1
index 19ff53803ede..e7787fb26609 100644
@@ -50,7 +50,7 @@ these settings is shown below:
     ./<build_dir>/examples/dpdk-eventdev_pipeline -l 0,2,8-15 --vdev event_sw0 \
     -- -r1 -t1 -e4 -w FF00 -s4 -n0 -c32 -W1000 -D
 
-The application has some sanity checking built-in, so if there is a function
+The application has some internal validation, so if there is a function
 (e.g.; the RX core) which doesn't have a cpu core mask assigned, the application
 will print an error message:
 
doc/guides/tools/testbbdev.rst +4 -4
index 54a9c44dc345..0a4af4ec9bec 100644
@@ -7,7 +7,7 @@ dpdk-test-bbdev Application
 The ``dpdk-test-bbdev`` tool is a Data Plane Development Kit (DPDK) utility that
 allows measuring performance parameters of PMDs available in the bbdev framework.
 Tests available for execution are: latency, throughput, validation,
-bler and sanity tests. Execution of tests can be customized using various
+bler and basic functionality. Execution of tests can be customized using various
 parameters passed to a python running script.
 
 
@@ -95,8 +95,8 @@ Test Cases
 
 There are 7 main test cases that can be executed using testbbdev tool:
 
-* Sanity checks [-c unittest]
-    - Performs sanity checks on BBDEV interface, validating basic functionality
+* Functional checks [-c unittest]
+    - Performs checks on BBDEV interface, validating basic functionality
 
 * Validation tests [-c validation]
     - Performs full operation of enqueue and dequeue
@@ -230,7 +230,7 @@ vector name refer more explicitly processing specificity such as
 is purely read/written for external DDR, lbrm when limited buffer
 rate matching is expected, or crc_fail when a CRC failure is expected.
 They are chosen to have a good coverage across sizes and processing
-parameters while still keeping their number limited as part of sanity
+parameters while still keeping their number limited as part of functional
 regression.
 
 Shortened tree of isg_cid-wireless_dpdk_ae with dpdk compiled and output
Signature · 1 line
2.39.2
#13 lore raw

PATCH 9/20 net/fm10k, net/ixgbe: remove word sanity

In reply to Stephen Hemminger

Remove non-inclusive term sanity from these Intel drivers.

---
 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 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
drivers/net/fm10k/fm10k_ethdev.c +1 -1
index 4d3c4c10cfa4..894cf8c8a6b5 100644
@@ -1757,7 +1757,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;
 
drivers/net/fm10k/fm10k_rxtx.c +1 -1
index c0841ab8cb34..94345299b22a 100644
@@ -647,7 +647,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;
drivers/net/ixgbe/ixgbe_fdir.c +1 -1
index 06d6e2126de5..51bbf577e3fe 100644
@@ -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.
drivers/net/ixgbe/ixgbe_ipsec.c +1 -1
index d3313085560d..d4aa3e9ede8e 100644
@@ -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;
drivers/net/ixgbe/ixgbe_rxtx.c +1 -1
index c9d6ca9efea4..72f89b1b51fd 100644
@@ -4907,7 +4907,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;
Signature · 1 line
2.39.2
#14 lore raw

PATCH 10/20 net/mlx[45]: remove word sanity

In reply to Stephen Hemminger

The term "sanity" is on non-inclusive naming list. Remove it from the Nvidia drivers.

---
 drivers/common/mlx5/linux/mlx5_common_os.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 +-
 7 files changed, 10 insertions(+), 12 deletions(-)
drivers/common/mlx5/linux/mlx5_common_os.c +1 -1
index aafff60eeb38..45fac9be0ae1 100644
@@ -234,7 +234,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]
drivers/net/mlx4/mlx4.c +1 -1
index a54016f4a235..e3048d5b6ec0 100644
@@ -1206,7 +1206,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]
drivers/net/mlx4/mlx4_flow.c +3 -3
index 8ef9fd2db44e..25b185d8710c 100644
@@ -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)
drivers/net/mlx5/mlx5_flow_dv.c +1 -1
index d14661298cf0..52a035588755 100644
@@ -8638,7 +8638,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
drivers/net/mlx5/mlx5_flow_hw.c +2 -4
index 853c94af9cfd..6e805d547c8a 100644
@@ -5576,11 +5576,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(__builtin_popcount(mask) >= __builtin_popcount(priv->vport_meta_mask));
 	return mask;
@@ -5592,12 +5591,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;
drivers/net/mlx5/mlx5_rxq.c +1 -1
index ad8fd13cbe8e..377618926a8d 100644
@@ -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.
 	 * CACHE_FLUSHTHRESH_MULTIPLIER is defined in a C file, so using a
 	 * constant number 2 instead.
drivers/net/mlx5/mlx5_rxtx_vec.h +1 -1
index 77c3f4efa019..f8376f2b55b4 100644
@@ -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) \
Signature · 1 line
2.39.2
#15 lore raw

PATCH 11/20 net/sfc: remove term "sanity check"

In reply to Stephen Hemminger

Remove term sanity check in comment.

---
 drivers/net/sfc/sfc_dp_rx.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/sfc/sfc_dp_rx.h +1 -1
index 246adbd87cde..c64db488f652 100644
@@ -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;
 
Signature · 1 line
2.39.2
#17 lore raw

PATCH 12/20 net/ark: replace use of term sanity

In reply to Stephen Hemminger

Do not use non inclusive terms.

---
 drivers/net/ark/ark_ethdev.c    | 8 ++++----
 drivers/net/ark/ark_ethdev_rx.c | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)
drivers/net/ark/ark_ethdev.c +4 -4
index b2995427c8ca..9cb1c5dea49e 100644
@@ -358,10 +358,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__);
@@ -380,7 +380,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__);
 
@@ -601,7 +601,7 @@ eth_ark_dev_start(struct rte_eth_dev *dev)
 		pthread_t thread;
 
 		/* Delay packet generatpr 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[32];
 		snprintf(tname, sizeof(tname), "ark-delay-pg-%d",
drivers/net/ark/ark_ethdev_rx.c +1 -1
index cbc0416bc2d2..e293d78db353 100644
@@ -275,7 +275,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)) {
Signature · 1 line
2.39.2
#18 lore raw

PATCH 13/20 net/bnxt: replace use of term sanity

In reply to Stephen Hemminger

Do not use non-inclusive terms.

---
 drivers/net/bnxt/bnxt_hwrm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/bnxt/bnxt_hwrm.c +1 -1
index 51e1e2d6b39b..5370293fed8d 100644
@@ -262,7 +262,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 */
Signature · 1 line
2.39.2
#19 lore raw

PATCH 14/20 net/bnx2x: remove reference to sanity

In reply to Stephen Hemminger

Replace "sanity check"

---
 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 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)
drivers/net/bnx2x/bnx2x.c +1 -1
index 29c16bb207c7..0d2dc2d3b3fa 100644
@@ -7821,7 +7821,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,
drivers/net/bnx2x/bnx2x_stats.c +4 -4
index c07b01510a06..86d90679ac0a 100644
@@ -187,7 +187,7 @@ bnx2x_stats_pmf_update(struct bnx2x_softc *sc)
 		 */
 		return;
 	}
-	/* sanity */
+	/* input valid? */
 	if (!sc->port.pmf || !sc->port.port_stx) {
 		PMD_DRV_LOG(ERR, sc, "BUG!");
 		return;
@@ -237,7 +237,7 @@ bnx2x_port_stats_init(struct bnx2x_softc *sc)
     uint32_t mac_addr;
     uint32_t *stats_comp = BNX2X_SP(sc, stats_comp);
 
-    /* sanity */
+    /* input valid? */
     if (!sc->link_vars.link_up || !sc->port.pmf) {
 	PMD_DRV_LOG(ERR, sc, "BUG!");
 	return;
@@ -461,7 +461,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 valid? */
     if (!sc->func_stx) {
 	PMD_DRV_LOG(ERR, sc, "BUG!");
 	return;
@@ -1301,7 +1301,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 valid? */
     if (!sc->port.pmf || !sc->port.port_stx) {
 	PMD_DRV_LOG(ERR, sc, "BUG!");
 	return;
drivers/net/bnx2x/ecore_sp.c +1 -1
index c6c3857778f7..158205266f62 100644
@@ -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;
 
drivers/net/bnx2x/elink.c +2 -2
index 43fbf04ece11..2b0236aac24e 100644
@@ -1087,7 +1087,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;
@@ -1104,7 +1104,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;
Signature · 1 line
2.39.2
#20 lore raw

PATCH 15/20 cnxk: replace term sanity

In reply to Stephen Hemminger

Do not use non-inclusive naming.

---
 drivers/common/cnxk/roc_nix_tm_ops.c | 2 +-
 drivers/common/cnxk/roc_npa.c        | 4 ++--
 drivers/net/cnxk/cnxk_ethdev.c       | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)
drivers/common/cnxk/roc_nix_tm_ops.c +1 -1
index 4e88ad1beb71..d837e2247634 100644
@@ -527,7 +527,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)
drivers/common/cnxk/roc_npa.c +2 -2
index 20637fbf657c..08e193e6118c 100644
@@ -341,7 +341,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;
@@ -769,7 +769,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;
 
drivers/net/cnxk/cnxk_ethdev.c +2 -2
index 1cae3084e184..8fdc3d5a9a96 100644
@@ -633,7 +633,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;
@@ -1195,7 +1195,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;
Signature · 1 line
2.39.2
#21 lore raw

PATCH 16/20 event/opdl: remove term sanity

In reply to Stephen Hemminger

Don't use non-inclusive term.

---
 drivers/event/opdl/opdl_evdev.c      | 2 +-
 drivers/event/opdl/opdl_evdev_init.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/event/opdl/opdl_evdev.c +1 -1
index 9ce8b39b6098..862f3fa9b27a 100644
@@ -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",
drivers/event/opdl/opdl_evdev_init.c +1 -1
index be3437fc2f40..12eb2695f5de 100644
@@ -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));
Signature · 1 line
2.39.2
#22 lore raw

PATCH 17/20 net/txgbe: replace term sanity

In reply to Stephen Hemminger

Don't use term sanity.

---
 drivers/net/txgbe/txgbe_ipsec.c | 2 +-
 drivers/net/txgbe/txgbe_rxtx.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/txgbe/txgbe_ipsec.c +1 -1
index f9f8108fb894..cadb0943c82d 100644
@@ -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;
drivers/net/txgbe/txgbe_rxtx.c +1 -1
index 427f8b82ac80..ef6478b8a5c8 100644
@@ -4115,7 +4115,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;
Signature · 1 line
2.39.2
#23 lore raw

PATCH 18/20 net/cxgbe: remove use of term sanity

In reply to Stephen Hemminger

Remove non-inclusive terminolgy.

---
 drivers/net/cxgbe/cxgbe_ethdev.c | 10 ++--------
 drivers/net/cxgbe/cxgbevf_main.c |  4 ++--
 2 files changed, 4 insertions(+), 10 deletions(-)
drivers/net/cxgbe/cxgbe_ethdev.c +2 -8
index 45bbeaef0ceb..2abb721afda1 100644
@@ -518,10 +518,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",
@@ -642,10 +639,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",
drivers/net/cxgbe/cxgbevf_main.c +2 -2
index d0c93f8ac3a5..dfb12b4ed5c9 100644
@@ -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"
Signature · 1 line
2.39.2
#24 lore raw

PATCH 19/20 crypto/bcmfs: replace term sanity check

In reply to Stephen Hemminger

Do not use non-inclusive naming here.

---
 drivers/crypto/bcmfs/hw/bcmfs4_rm.c | 6 +++---
 drivers/crypto/bcmfs/hw/bcmfs5_rm.c | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)
drivers/crypto/bcmfs/hw/bcmfs4_rm.c +3 -3
index 0ccb111898e4..50280fe14176 100644
@@ -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;
 	}
drivers/crypto/bcmfs/hw/bcmfs5_rm.c +3 -3
index c677c0cd9b52..c45eea82de20 100644
@@ -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;
 	}
Signature · 1 line
2.39.2
#25 lore raw

PATCH 20/20 Remove use of term sanity check

In reply to Stephen Hemminger

Replace non-inclusive language with better comments.

---
 drivers/bus/fslmc/qbman/qbman_sys_decl.h  | 2 +-
 drivers/common/dpaax/caamflib/desc.h      | 2 +-
 drivers/dma/idxd/idxd_pci.c               | 2 +-
 drivers/net/bonding/rte_eth_bond_8023ad.c | 2 +-
 drivers/net/mvpp2/mrvl_qos.c              | 2 +-
 drivers/net/qede/qede_rxtx.c              | 6 +++---
 6 files changed, 8 insertions(+), 8 deletions(-)
drivers/bus/fslmc/qbman/qbman_sys_decl.h +1 -1
index caaae417773c..2b6162d0ceaf 100644
@@ -9,7 +9,7 @@
 #include <compat.h>
 #include <fsl_qbman_base.h>
 
-/* Sanity check */
+/* Byte order check */
 #if (__BYTE_ORDER__ != __ORDER_BIG_ENDIAN__) && \
 	(__BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__)
 #error "Unknown endianness!"
drivers/common/dpaax/caamflib/desc.h +1 -1
index 635d6bad071f..feb6a5d7bb2d 100644
@@ -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)
drivers/dma/idxd/idxd_pci.c +1 -1
index 781fa02db3ca..a1e9b08940d9 100644
@@ -196,7 +196,7 @@ init_pci_device(struct rte_pci_device *dev, struct idxd_dmadev *idxd,
 	pci->portals = dev->mem_resource[2].addr;
 	pci->wq_cfg_sz = (pci->regs->wqcap >> 24) & 0x0F;
 
-	/* 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");
drivers/net/bonding/rte_eth_bond_8023ad.c +1 -1
index 4a266bb2caf1..56972f06c045 100644
@@ -1477,7 +1477,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 ||
drivers/net/mvpp2/mrvl_qos.c +1 -1
index f43217bc589c..db5052a9ab6f 100644
@@ -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;
drivers/net/qede/qede_rxtx.c +3 -3
index c35585f5fdd6..a6da04cf361f 100644
@@ -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_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_check(mbuf, txq);
 #endif
 				/* Outer L4 offset in two byte words */
 				tunn_l4_hdr_start_offset =
Signature · 1 line
2.39.2
#26 lore raw

RE: [EXT] [PATCH 20/20] Remove use of term sanity check

Quoted 134 lines

-----Original Message-----
From: Stephen Hemminger <[email protected]>
Sent: Wednesday, May 17, 2023 9:46 PM
To: [email protected]
Cc: Stephen Hemminger <[email protected]>; Hemant Agrawal <[email protected]>; Sachin Saxena <[email protected]>; Bruce Richardson <[email protected]>; Kevin Laatz <[email protected]>; Chas Williams <[email protected]>; Min Hu (Connor) <[email protected]>; Liron Himi <[email protected]>; Devendra Singh Rawat <[email protected]>; Alok Prasad <[email protected]>
Subject: [EXT] [PATCH 20/20] Remove use of term sanity check

External Email

----------------------------------------------------------------------
Replace non-inclusive language with better comments.

---

drivers/bus/fslmc/qbman/qbman_sys_decl.h  | 2 +-
drivers/common/dpaax/caamflib/desc.h      | 2 +-
drivers/dma/idxd/idxd_pci.c               | 2 +-
drivers/net/bonding/rte_eth_bond_8023ad.c | 2 +-
drivers/net/mvpp2/mrvl_qos.c              | 2 +-
drivers/net/qede/qede_rxtx.c              | 6 +++---
6 files changed, 8 insertions(+), 8 deletions(-)
drivers/bus/fslmc/qbman/qbman_sys_decl.h +1 -1
index caaae417773c..2b6162d0ceaf 100644
@@ -9,7 +9,7 @@
 #include <compat.h>
 #include <fsl_qbman_base.h>
 
-/* Sanity check */
+/* Byte order check */
 #if (__BYTE_ORDER__ != __ORDER_BIG_ENDIAN__) && \
 	(__BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__)  #error "Unknown

endianness!"

drivers/common/dpaax/caamflib/desc.h +1 -1
index 635d6bad071f..feb6a5d7bb2d 100644
@@ -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)
drivers/dma/idxd/idxd_pci.c index renamed from drivers/dma/idxd/idxd_pci.c +0 -0

781fa02db3ca..a1e9b08940d9 100644

drivers/dma/idxd/idxd_pci.c +1 -1
@@ -196,7 +196,7 @@ init_pci_device(struct rte_pci_device *dev, struct
 idxd_dmadev *idxd,
 	pci->portals = dev->mem_resource[2].addr;
 	pci->wq_cfg_sz = (pci->regs->wqcap >> 24) & 0x0F;
 
-	/* 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/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index 4a266bb2caf1..56972f06c045 100644

drivers/net/bonding/rte_eth_bond_8023ad.c +1 -1
@@ -1477,7 +1477,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-
Quoted 1 line

slow_periodic_ms ||

				conf->long_timeout_ms == 0 ||
drivers/net/mvpp2/mrvl_qos.c +1 -1
index f43217bc589c..db5052a9ab6f 100644
@@ -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;
drivers/net/qede/qede_rxtx.c index renamed from drivers/net/qede/qede_rxtx.c +0 -0

c35585f5fdd6..a6da04cf361f 100644

drivers/net/qede/qede_rxtx.c +1 -1
@@ -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

drivers/net/qede/qede_rxtx.c +1 -1
-qede_mpls_tunn_tx_sanity_check(struct rte_mbuf *mbuf,
+qede_mpls_tunn_tx_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

drivers/net/qede/qede_rxtx.c +1 -1
-				qede_mpls_tunn_tx_sanity_check(mbuf, txq);
+				qede_mpls_tunn_tx_check(mbuf, txq);
#endif
				/* Outer L4 offset in two byte words */
				tunn_l4_hdr_start_offset =
Quoted 2 lines

--
2.39.2

For qede, replace 'sanity' with 'basic'.

Acked-by on v1 20/20
#27 lore raw

RE: [PATCH 20/20] Remove use of term sanity check

In reply to Stephen Hemminger
Quoted 36 lines

-----Original Message-----
From: Stephen Hemminger <[email protected]> Replace non-inclusive language with better comments.

---
 drivers/bus/fslmc/qbman/qbman_sys_decl.h  | 2 +-
 drivers/common/dpaax/caamflib/desc.h      | 2 +-
 drivers/dma/idxd/idxd_pci.c               | 2 +-
 drivers/net/bonding/rte_eth_bond_8023ad.c | 2 +-
 drivers/net/mvpp2/mrvl_qos.c              | 2 +-
 drivers/net/qede/qede_rxtx.c              | 6 +++---
 6 files changed, 8 insertions(+), 8 deletions(-)
drivers/bus/fslmc/qbman/qbman_sys_decl.h +1 -1
index caaae417773c..2b6162d0ceaf 100644
@@ -9,7 +9,7 @@
 #include <compat.h>
 #include <fsl_qbman_base.h>
 
-/* Sanity check */
+/* Byte order check */
 #if (__BYTE_ORDER__ != __ORDER_BIG_ENDIAN__) && \
 	(__BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__)  #error "Unknown

endianness!"

drivers/common/dpaax/caamflib/desc.h +0 -0
index 635d6bad071f..feb6a5d7bb2d 100644

drivers/common/dpaax/caamflib/desc.h extern enum rta_sec_era rta_sec_era; · line 113

Quoted 8 lines
drivers/common/dpaax/caamflib/desc.h +1 -1
@@ -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)
#28 lore raw
In reply to Stephen Hemminger
Quoted 104 lines · Stephen Hemminger

This set of patches removes almost all use of the term sanity in DPDK. The term sanity-check and related formats are on the Inclusive Naming Tier 2 (Strongly Consider Replacing) word list.
https://inclusivenaming.org/word-lists/tier-2/sanity-check/

Did not address base drivers which come from vendors. It is up to them to fix that.

Stephen Hemminger (20):
mbuf: replace term sanity check
eal: replace use of sanity check in comments and messages net/ring: replace use of sanity
test: replace use word sanity
examples: remove term sanity
lib: replace use of sanity check in comments and messages net/nfp: remove word sanity doc/eventdev_pipeline: remove sanity
net/fm10k, net/ixgbe: remove word sanity net/mlx[45]: remove word sanity
net/sfc: remove term "sanity check"
net/ark: replace use of term sanity
net/bnxt: replace use of term sanity
net/bnx2x: remove reference to sanity
cnxk: replace term sanity
event/opdl: remove term sanity
net/txgbe: replace term sanity
net/cxgbe: remove use of term sanity crypto/bcmfs: replace term sanity check
Remove use of term sanity check

 app/test/test_bitmap.c                        |  4 +-
 app/test/test_bpf.c                           |  6 +-
 app/test/test_common.c                        |  2 +-
 app/test/test_distributor.c                   | 46 ++++++------
 app/test/test_dmadev.c                        |  2 +-
 app/test/test_eal_flags.c                     | 20 +++---
 app/test/test_hash.c                          |  2 +-
 app/test/test_interrupts.c                    |  9 +--
 app/test/test_link_bonding_mode4.c            |  2 +-
 app/test/test_mbuf.c                          | 32 ++++-----
 app/test/test_rawdev.c                        |  2 +-
 app/test/test_timer.c                         | 10 +--
 doc/guides/gpus/cuda.rst                      |  2 +-
 doc/guides/prog_guide/mbuf_lib.rst            |  4 +-
 .../sample_app_ug/eventdev_pipeline.rst       |  2 +-
 doc/guides/tools/testbbdev.rst                |  8 +--
 drivers/bus/fslmc/qbman/qbman_sys_decl.h      |  2 +-
 drivers/common/cnxk/roc_nix_tm_ops.c          |  2 +-
 drivers/common/cnxk/roc_npa.c                 |  4 +-
 drivers/common/dpaax/caamflib/desc.h          |  2 +-
 drivers/common/mlx5/linux/mlx5_common_os.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/avp/avp_ethdev.c                  | 18 ++---
 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/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/nfp_flow.c                    |  2 +-
 .../net/nfp/nfpcore/nfp-common/nfp_resid.h    | 13 ----
 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/sfc/sfc_ef100_rx.c                |  6 +-
 drivers/net/sfc/sfc_ef10_essb_rx.c            |  4 +-
 drivers/net/sfc/sfc_ef10_rx.c                 |  4 +-
 drivers/net/sfc/sfc_rx.c                      |  2 +-
 drivers/net/txgbe/txgbe_ipsec.c               |  2 +-
 drivers/net/txgbe/txgbe_rxtx.c                |  2 +-
 examples/ipsec-secgw/event_helper.c           |  2 +-
 examples/ipv4_multicast/main.c                |  2 +-
 examples/qos_sched/args.c                     |  2 +-
 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 +-
 lib/graph/graph.c                             |  2 +-
 lib/graph/graph_stats.c                       |  2 +-
Quoted 10 lines
 lib/graph/node.c                              |  2 +-
 lib/jobstats/rte_jobstats.c                   |  6 +-
 lib/mbuf/rte_mbuf.c                           | 16 ++---
 lib/mbuf/rte_mbuf.h                           | 71 ++++++++++---------
 lib/mbuf/version.map                          |  2 +-
 lib/metrics/rte_metrics.c                     |  2 +-
 lib/pcapng/rte_pcapng.c                       |  2 +-
 81 files changed, 222 insertions(+), 237 deletions(-)
#29 lore raw

v2 cover Replace use of the term sanity-check

In reply to Stephen Hemminger

This set of patches removes almost all use of the term sanity check in DPDK. Did not address base drivers which come from vendors. It is up to them to fix that.

The term sanity-check and related formats are on the Inclusive Naming Tier 2 (Strongly Consider Replacing) word list.
https://inclusivenaming.org/word-lists/tier-2/sanity-check/

v2 - review feedback, and checkpatch complaints
replace mbuf_sanity_check with mbuf_verify
drop changes to nfp driver - handled already

Stephen Hemminger (19):
mbuf: replace term sanity check
eal: replace use of sanity check in comments and messages
test: replace use word sanity
examples: remove term sanity
lib: replace use of sanity check in comments and messages doc/eventdev_pipeline: remove sanity
net/ring: replace use of sanity
net/fm10k, net/ixgbe: remove word sanity net/mlx[45]: remove word sanity
net/sfc: remove term "sanity check"
net/ark: replace use of term sanity
net/bnxt: replace use of term sanity
net/bnx2x: remove reference to sanity
cnxk: replace term sanity
event/opdl: remove term sanity
net/txgbe: replace term sanity
net/cxgbe: remove use of term sanity crypto/bcmfs: replace term sanity check
Remove use of term sanity check

 app/test/test_bitmap.c                        |  4 +-
 app/test/test_bpf.c                           |  6 +-
 app/test/test_common.c                        |  2 +-
 app/test/test_distributor.c                   | 46 ++++++------
 app/test/test_dmadev.c                        |  2 +-
 app/test/test_eal_flags.c                     | 20 +++---
 app/test/test_hash.c                          |  2 +-
 app/test/test_interrupts.c                    |  9 +--
 app/test/test_link_bonding_mode4.c            |  2 +-
 app/test/test_mbuf.c                          | 32 ++++-----
 app/test/test_rawdev.c                        |  2 +-
 app/test/test_timer.c                         | 10 +--
 doc/guides/gpus/cuda.rst                      |  2 +-
 doc/guides/prog_guide/mbuf_lib.rst            |  4 +-
 .../sample_app_ug/eventdev_pipeline.rst       |  2 +-
 doc/guides/tools/testbbdev.rst                |  8 +--
 drivers/bus/fslmc/qbman/qbman_sys_decl.h      |  2 +-
 drivers/common/cnxk/roc_nix_tm_ops.c          |  2 +-
 drivers/common/cnxk/roc_npa.c                 |  4 +-
 drivers/common/dpaax/caamflib/desc.h          |  2 +-
 drivers/common/mlx5/linux/mlx5_common_os.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/avp/avp_ethdev.c                  | 18 ++---
 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/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/qede/qede_rxtx.c                  |  6 +-
 drivers/net/ring/rte_eth_ring.c               |  7 +-
 drivers/net/sfc/sfc_dp_rx.h                   |  2 +-
 drivers/net/sfc/sfc_ef100_rx.c                |  6 +-
 drivers/net/sfc/sfc_ef10_essb_rx.c            |  4 +-
 drivers/net/sfc/sfc_ef10_rx.c                 |  4 +-
 drivers/net/sfc/sfc_rx.c                      |  2 +-
 drivers/net/txgbe/txgbe_ipsec.c               |  2 +-
 drivers/net/txgbe/txgbe_rxtx.c                |  2 +-
 examples/ipsec-secgw/event_helper.c           |  2 +-
 examples/ipv4_multicast/main.c                |  2 +-
 examples/qos_sched/args.c                     |  2 +-
 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 +-
 lib/graph/graph.c                             |  2 +-
 lib/graph/graph_stats.c                       |  2 +-
 lib/graph/node.c                              |  2 +-
 lib/jobstats/rte_jobstats.c                   |  6 +-
 lib/mbuf/rte_mbuf.c                           | 23 +++---
 lib/mbuf/rte_mbuf.h                           | 71 ++++++++++---------
 lib/mbuf/version.map                          |  1 +
 lib/metrics/rte_metrics.c                     |  2 +-
 lib/pcapng/rte_pcapng.c                       |  2 +-
 79 files changed, 226 insertions(+), 224 deletions(-)
Signature · 1 line
2.39.2
#30 lore raw

PATCH v2 1/19 mbuf: replace term sanity check

Replace rte_mbuf_sanity_check() with rte_mbuf_verify() to match the similar macro RTE_VERIFY() in rte_debug.h

The term sanity check is on the Tier 2 list of words that should be replaced.

---
 app/test/test_mbuf.c               | 30 ++++++-------
 doc/guides/prog_guide/mbuf_lib.rst |  4 +-
 drivers/net/avp/avp_ethdev.c       | 18 ++++----
 drivers/net/sfc/sfc_ef100_rx.c     |  6 +--
 drivers/net/sfc/sfc_ef10_essb_rx.c |  4 +-
 drivers/net/sfc/sfc_ef10_rx.c      |  4 +-
 drivers/net/sfc/sfc_rx.c           |  2 +-
 examples/ipv4_multicast/main.c     |  2 +-
 lib/mbuf/rte_mbuf.c                | 23 ++++++----
 lib/mbuf/rte_mbuf.h                | 71 ++++++++++++++++--------------
 lib/mbuf/version.map               |  1 +
 11 files changed, 88 insertions(+), 77 deletions(-)
app/test/test_mbuf.c +15 -15
index 8d8d3b9386ce..c2716dc4e5fe 100644
@@ -261,8 +261,8 @@ test_one_pktmbuf(struct rte_mempool *pktmbuf_pool)
 		GOTO_FAIL("Buffer should be continuous");
 	memset(hdr, 0x55, MBUF_TEST_HDR2_LEN);
 
-	rte_mbuf_sanity_check(m, 1);
-	rte_mbuf_sanity_check(m, 0);
+	rte_mbuf_verify(m, 1);
+	rte_mbuf_verify(m, 0);
 	rte_pktmbuf_dump(stdout, m, 0);
 
 	/* this prepend should fail */
@@ -1161,7 +1161,7 @@ test_refcnt_mbuf(void)
 
 #ifdef RTE_EXEC_ENV_WINDOWS
 static int
-test_failing_mbuf_sanity_check(struct rte_mempool *pktmbuf_pool)
+test_failing_mbuf_verify(struct rte_mempool *pktmbuf_pool)
 {
 	RTE_SET_USED(pktmbuf_pool);
 	return TEST_SKIPPED;
@@ -1188,7 +1188,7 @@ verify_mbuf_check_panics(struct rte_mbuf *buf)
 		/* No need to generate a coredump when panicking. */
 		rl.rlim_cur = rl.rlim_max = 0;
 		setrlimit(RLIMIT_CORE, &rl);
-		rte_mbuf_sanity_check(buf, 1); /* should panic */
+		rte_mbuf_verify(buf, 1); /* should panic */
 		exit(0);  /* return normally if it doesn't panic */
 	} else if (pid < 0) {
 		printf("Fork Failed\n");
@@ -1202,12 +1202,12 @@ verify_mbuf_check_panics(struct rte_mbuf *buf)
 }
 
 static int
-test_failing_mbuf_sanity_check(struct rte_mempool *pktmbuf_pool)
+test_failing_mbuf_verify(struct rte_mempool *pktmbuf_pool)
 {
 	struct rte_mbuf *buf;
 	struct rte_mbuf badbuf;
 
-	printf("Checking rte_mbuf_sanity_check for failure conditions\n");
+	printf("Checking rte_mbuf_verify for failure conditions\n");
 
 	/* get a good mbuf to use to make copies */
 	buf = rte_pktmbuf_alloc(pktmbuf_pool);
@@ -1729,7 +1729,7 @@ test_mbuf_validate_tx_offload(const char *test_name,
 		GOTO_FAIL("%s: mbuf allocation failed!\n", __func__);
 	if (rte_pktmbuf_pkt_len(m) != 0)
 		GOTO_FAIL("%s: Bad packet length\n", __func__);
-	rte_mbuf_sanity_check(m, 0);
+	rte_mbuf_verify(m, 0);
 	m->ol_flags = ol_flags;
 	m->tso_segsz = segsize;
 	ret = rte_validate_tx_offload(m);
@@ -1936,7 +1936,7 @@ test_pktmbuf_read(struct rte_mempool *pktmbuf_pool)
 		GOTO_FAIL("%s: mbuf allocation failed!\n", __func__);
 	if (rte_pktmbuf_pkt_len(m) != 0)
 		GOTO_FAIL("%s: Bad packet length\n", __func__);
-	rte_mbuf_sanity_check(m, 0);
+	rte_mbuf_verify(m, 0);
 
 	data = rte_pktmbuf_append(m, MBUF_TEST_DATA_LEN2);
 	if (data == NULL)
@@ -1985,7 +1985,7 @@ test_pktmbuf_read_from_offset(struct rte_mempool *pktmbuf_pool)
 
 	if (rte_pktmbuf_pkt_len(m) != 0)
 		GOTO_FAIL("%s: Bad packet length\n", __func__);
-	rte_mbuf_sanity_check(m, 0);
+	rte_mbuf_verify(m, 0);
 
 	/* prepend an ethernet header */
 	hdr = (struct ether_hdr *)rte_pktmbuf_prepend(m, hdr_len);
@@ -2130,7 +2130,7 @@ create_packet(struct rte_mempool *pktmbuf_pool,
 			GOTO_FAIL("%s: mbuf allocation failed!\n", __func__);
 		if (rte_pktmbuf_pkt_len(pkt_seg) != 0)
 			GOTO_FAIL("%s: Bad packet length\n", __func__);
-		rte_mbuf_sanity_check(pkt_seg, 0);
+		rte_mbuf_verify(pkt_seg, 0);
 		/* Add header only for the first segment */
 		if (test_data->flags == MBUF_HEADER && seg == 0) {
 			hdr_len = sizeof(struct rte_ether_hdr);
@@ -2342,7 +2342,7 @@ test_pktmbuf_ext_shinfo_init_helper(struct rte_mempool *pktmbuf_pool)
 		GOTO_FAIL("%s: mbuf allocation failed!\n", __func__);
 	if (rte_pktmbuf_pkt_len(m) != 0)
 		GOTO_FAIL("%s: Bad packet length\n", __func__);
-	rte_mbuf_sanity_check(m, 0);
+	rte_mbuf_verify(m, 0);
 
 	ext_buf_addr = rte_malloc("External buffer", buf_len,
 			RTE_CACHE_LINE_SIZE);
@@ -2506,8 +2506,8 @@ test_pktmbuf_ext_pinned_buffer(struct rte_mempool *std_pool)
 		GOTO_FAIL("%s: test_pktmbuf_copy(pinned) failed\n",
 			  __func__);
 
-	if (test_failing_mbuf_sanity_check(pinned_pool) < 0)
-		GOTO_FAIL("%s: test_failing_mbuf_sanity_check(pinned)"
+	if (test_failing_mbuf_verify(pinned_pool) < 0)
+		GOTO_FAIL("%s: test_failing_mbuf_verify(pinned)"
 			  " failed\n", __func__);
 
 	if (test_mbuf_linearize_check(pinned_pool) < 0)
@@ -2881,8 +2881,8 @@ test_mbuf(void)
 		goto err;
 	}
 
-	if (test_failing_mbuf_sanity_check(pktmbuf_pool) < 0) {
-		printf("test_failing_mbuf_sanity_check() failed\n");
+	if (test_failing_mbuf_verify(pktmbuf_pool) < 0) {
+		printf("test_failing_mbuf_verify() failed\n");
 		goto err;
 	}
 
doc/guides/prog_guide/mbuf_lib.rst +2 -2
index 049357c75563..0accb51a98c7 100644
@@ -266,8 +266,8 @@ can be found in several of the sample applications, for example, the IPv4 Multic
 Debug
 -----
 
-In debug mode, the functions of the mbuf library perform sanity checks before any operation (such as, buffer corruption,
-bad type, and so on).
+In debug mode, the functions of the mbuf library perform consistency checks
+before any operation (such as, buffer corruption, bad type, and so on).
 
 Use Cases
 ---------
drivers/net/avp/avp_ethdev.c +9 -9
index b2a08f563542..b402c7a2ad16 100644
@@ -1231,7 +1231,7 @@ _avp_mac_filter(struct avp_dev *avp, struct rte_mbuf *m)
 
 #ifdef RTE_LIBRTE_AVP_DEBUG_BUFFERS
 static inline void
-__avp_dev_buffer_sanity_check(struct avp_dev *avp, struct rte_avp_desc *buf)
+__avp_dev_buffer_check(struct avp_dev *avp, struct rte_avp_desc *buf)
 {
 	struct rte_avp_desc *first_buf;
 	struct rte_avp_desc *pkt_buf;
@@ -1272,12 +1272,12 @@ __avp_dev_buffer_sanity_check(struct avp_dev *avp, struct rte_avp_desc *buf)
 			  first_buf->pkt_len, pkt_len);
 }
 
-#define avp_dev_buffer_sanity_check(a, b) \
-	__avp_dev_buffer_sanity_check((a), (b))
+#define avp_dev_buffer_check(a, b) \
+	__avp_dev_buffer_check((a), (b))
 
 #else /* RTE_LIBRTE_AVP_DEBUG_BUFFERS */
 
-#define avp_dev_buffer_sanity_check(a, b) do {} while (0)
+#define avp_dev_buffer_check(a, b) do {} while (0)
 
 #endif
 
@@ -1302,7 +1302,7 @@ avp_dev_copy_from_buffers(struct avp_dev *avp,
 	void *pkt_data;
 	unsigned int i;
 
-	avp_dev_buffer_sanity_check(avp, buf);
+	avp_dev_buffer_check(avp, buf);
 
 	/* setup the first source buffer */
 	pkt_buf = avp_dev_translate_buffer(avp, buf);
@@ -1370,7 +1370,7 @@ avp_dev_copy_from_buffers(struct avp_dev *avp,
 	rte_pktmbuf_pkt_len(m) = total_length;
 	m->vlan_tci = vlan_tci;
 
-	__rte_mbuf_sanity_check(m, 1);
+	__rte_mbuf_verify(m, 1);
 
 	return m;
 }
@@ -1614,7 +1614,7 @@ avp_dev_copy_to_buffers(struct avp_dev *avp,
 	char *pkt_data;
 	unsigned int i;
 
-	__rte_mbuf_sanity_check(mbuf, 1);
+	__rte_mbuf_verify(mbuf, 1);
 
 	m = mbuf;
 	src_offset = 0;
@@ -1680,7 +1680,7 @@ avp_dev_copy_to_buffers(struct avp_dev *avp,
 		first_buf->vlan_tci = mbuf->vlan_tci;
 	}
 
-	avp_dev_buffer_sanity_check(avp, buffers[0]);
+	avp_dev_buffer_check(avp, buffers[0]);
 
 	return total_length;
 }
@@ -1798,7 +1798,7 @@ avp_xmit_scattered_pkts(void *tx_queue,
 
 #ifdef RTE_LIBRTE_AVP_DEBUG_BUFFERS
 	for (i = 0; i < nb_pkts; i++)
-		avp_dev_buffer_sanity_check(avp, tx_bufs[i]);
+		avp_dev_buffer_check(avp, tx_bufs[i]);
 #endif
 
 	/* send the packets */
drivers/net/sfc/sfc_ef100_rx.c +3 -3
index 16cd8524d32f..fe8920b12590 100644
@@ -178,7 +178,7 @@ sfc_ef100_rx_qrefill(struct sfc_ef100_rxq *rxq)
 			struct sfc_ef100_rx_sw_desc *rxd;
 			rte_iova_t dma_addr;
 
-			__rte_mbuf_raw_sanity_check(m);
+			__rte_mbuf_raw_validate(m);
 
 			dma_addr = rte_mbuf_data_iova_default(m);
 			if (rxq->flags & SFC_EF100_RXQ_NIC_DMA_MAP) {
@@ -541,7 +541,7 @@ sfc_ef100_rx_process_ready_pkts(struct sfc_ef100_rxq *rxq,
 		rxq->ready_pkts--;
 
 		pkt = sfc_ef100_rx_next_mbuf(rxq);
-		__rte_mbuf_raw_sanity_check(pkt);
+		__rte_mbuf_raw_validate(pkt);
 
 		RTE_BUILD_BUG_ON(sizeof(pkt->rearm_data[0]) !=
 				 sizeof(rxq->rearm_data));
@@ -565,7 +565,7 @@ sfc_ef100_rx_process_ready_pkts(struct sfc_ef100_rxq *rxq,
 			struct rte_mbuf *seg;
 
 			seg = sfc_ef100_rx_next_mbuf(rxq);
-			__rte_mbuf_raw_sanity_check(seg);
+			__rte_mbuf_raw_validate(seg);
 
 			seg->data_off = RTE_PKTMBUF_HEADROOM;
 
drivers/net/sfc/sfc_ef10_essb_rx.c +2 -2
index 78bd430363b1..de80be462a0f 100644
@@ -125,7 +125,7 @@ sfc_ef10_essb_next_mbuf(const struct sfc_ef10_essb_rxq *rxq,
 	struct rte_mbuf *m;
 
 	m = (struct rte_mbuf *)((uintptr_t)mbuf + rxq->buf_stride);
-	__rte_mbuf_raw_sanity_check(m);
+	__rte_mbuf_raw_validate(m);
 	return m;
 }
 
@@ -136,7 +136,7 @@ sfc_ef10_essb_mbuf_by_index(const struct sfc_ef10_essb_rxq *rxq,
 	struct rte_mbuf *m;
 
 	m = (struct rte_mbuf *)((uintptr_t)mbuf + idx * rxq->buf_stride);
-	__rte_mbuf_raw_sanity_check(m);
+	__rte_mbuf_raw_validate(m);
 	return m;
 }
 
drivers/net/sfc/sfc_ef10_rx.c +2 -2
index 7be224c9c412..f6c2345d2b74 100644
@@ -148,7 +148,7 @@ sfc_ef10_rx_qrefill(struct sfc_ef10_rxq *rxq)
 			struct sfc_ef10_rx_sw_desc *rxd;
 			rte_iova_t phys_addr;
 
-			__rte_mbuf_raw_sanity_check(m);
+			__rte_mbuf_raw_validate(m);
 
 			SFC_ASSERT((id & ~ptr_mask) == 0);
 			rxd = &rxq->sw_ring[id];
@@ -297,7 +297,7 @@ sfc_ef10_rx_process_event(struct sfc_ef10_rxq *rxq, efx_qword_t rx_ev,
 		rxd = &rxq->sw_ring[pending++ & ptr_mask];
 		m = rxd->mbuf;
 
-		__rte_mbuf_raw_sanity_check(m);
+		__rte_mbuf_raw_validate(m);
 
 		m->data_off = RTE_PKTMBUF_HEADROOM;
 		rte_pktmbuf_data_len(m) = seg_len;
drivers/net/sfc/sfc_rx.c +1 -1
index 5ea98187c3b4..d9f99a9d583d 100644
@@ -120,7 +120,7 @@ sfc_efx_rx_qrefill(struct sfc_efx_rxq *rxq)
 		     ++i, id = (id + 1) & rxq->ptr_mask) {
 			m = objs[i];
 
-			__rte_mbuf_raw_sanity_check(m);
+			__rte_mbuf_raw_validate(m);
 
 			rxd = &rxq->sw_desc[id];
 			rxd->mbuf = m;
examples/ipv4_multicast/main.c +1 -1
index 6d0a8501eff5..f39658f4e249 100644
@@ -258,7 +258,7 @@ mcast_out_pkt(struct rte_mbuf *pkt, int use_clone)
 	hdr->pkt_len = (uint16_t)(hdr->data_len + pkt->pkt_len);
 	hdr->nb_segs = pkt->nb_segs + 1;
 
-	__rte_mbuf_sanity_check(hdr, 1);
+	__rte_mbuf_verify(hdr, 1);
 	return hdr;
 }
 /* >8 End of mcast_out_kt. */
lib/mbuf/rte_mbuf.c +15 -8
index 686e797c80c4..56fb6c846df6 100644
@@ -363,9 +363,9 @@ rte_pktmbuf_pool_create_extbuf(const char *name, unsigned int n,
 	return mp;
 }
 
-/* do some sanity checks on a mbuf: panic if it fails */
+/* do some checks on a mbuf: panic if it fails */
 void
-rte_mbuf_sanity_check(const struct rte_mbuf *m, int is_header)
+rte_mbuf_verify(const struct rte_mbuf *m, int is_header)
 {
 	const char *reason;
 
@@ -373,6 +373,13 @@ rte_mbuf_sanity_check(const struct rte_mbuf *m, int is_header)
 		rte_panic("%s\n", reason);
 }
 
+/* For ABI compatabilty, to be removed in next release */
+void
+rte_mbuf_sanity_check(const struct rte_mbuf *m, int is_header)
+{
+	rte_mbuf_verify(m, is_header);
+}
+
 int rte_mbuf_check(const struct rte_mbuf *m, int is_header,
 		   const char **reason)
 {
@@ -492,7 +499,7 @@ void rte_pktmbuf_free_bulk(struct rte_mbuf **mbufs, unsigned int count)
 		if (unlikely(m == NULL))
 			continue;
 
-		__rte_mbuf_sanity_check(m, 1);
+		__rte_mbuf_verify(m, 1);
 
 		do {
 			m_next = m->next;
@@ -542,7 +549,7 @@ rte_pktmbuf_clone(struct rte_mbuf *md, struct rte_mempool *mp)
 		return NULL;
 	}
 
-	__rte_mbuf_sanity_check(mc, 1);
+	__rte_mbuf_verify(mc, 1);
 	return mc;
 }
 
@@ -592,7 +599,7 @@ rte_pktmbuf_copy(const struct rte_mbuf *m, struct rte_mempool *mp,
 	struct rte_mbuf *mc, *m_last, **prev;
 
 	/* garbage in check */
-	__rte_mbuf_sanity_check(m, 1);
+	__rte_mbuf_verify(m, 1);
 
 	/* check for request to copy at offset past end of mbuf */
 	if (unlikely(off >= m->pkt_len))
@@ -656,7 +663,7 @@ rte_pktmbuf_copy(const struct rte_mbuf *m, struct rte_mempool *mp,
 	}
 
 	/* garbage out check */
-	__rte_mbuf_sanity_check(mc, 1);
+	__rte_mbuf_verify(mc, 1);
 	return mc;
 }
 
@@ -667,7 +674,7 @@ rte_pktmbuf_dump(FILE *f, const struct rte_mbuf *m, unsigned dump_len)
 	unsigned int len;
 	unsigned int nb_segs;
 
-	__rte_mbuf_sanity_check(m, 1);
+	__rte_mbuf_verify(m, 1);
 
 	fprintf(f, "dump mbuf at %p, iova=%#" PRIx64 ", buf_len=%u\n", m, rte_mbuf_iova_get(m),
 		m->buf_len);
@@ -685,7 +692,7 @@ rte_pktmbuf_dump(FILE *f, const struct rte_mbuf *m, unsigned dump_len)
 	nb_segs = m->nb_segs;
 
 	while (m && nb_segs != 0) {
-		__rte_mbuf_sanity_check(m, 0);
+		__rte_mbuf_verify(m, 0);
 
 		fprintf(f, "  segment at %p, data=%p, len=%u, off=%u, refcnt=%u\n",
 			m, rte_pktmbuf_mtod(m, void *),
lib/mbuf/rte_mbuf.h +37 -34

224 lines not on this page · raw message

lib/mbuf/version.map +1 -0
index ed486ed14ec7..f134946f3d8d 100644
@@ -31,6 +31,7 @@ DPDK_23 {
 	rte_mbuf_set_platform_mempool_ops;
 	rte_mbuf_set_user_mempool_ops;
 	rte_mbuf_user_mempool_ops;
+	rte_mbuf_verify;
 	rte_pktmbuf_clone;
 	rte_pktmbuf_copy;
 	rte_pktmbuf_dump;
Signature · 1 line
2.39.2
#31 lore raw

Re: [PATCH v2 01/19] mbuf: replace term sanity check

Quoted 7 lines · On Thu, 18 May 2023 09:45:28 -0700 Stephen Hemminger…

Replace rte_mbuf_sanity_check() with rte_mbuf_verify() to match the similar macro RTE_VERIFY() in rte_debug.h

The term sanity check is on the Tier 2 list of words that should be replaced.

Didn't catch all of the changes to mbuf_verify().
Will address in next version

#32 lore raw

PATCH v2 2/19 eal: replace use of sanity check in comments and messages

In reply to Stephen Hemminger

Sanity check is on the Tier 2 non-inclusive list.
Replace or remove it.

---
 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(-)
lib/eal/common/eal_common_memory.c +1 -1
index e21fc7cfaecc..f99c6b43c885 100644
@@ -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",
lib/eal/common/eal_common_proc.c +2 -1
index 1fc1d6c53bd2..972f3269d8ae 100644
@@ -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;
lib/eal/common/eal_common_trace.c +1 -1
index cb980af06d9f..cadb85b94fde 100644
@@ -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;
lib/eal/common/eal_memcfg.h +1 -1
index ea013a9daf17..dc7ef18dc11b 100644
@@ -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. */
 
lib/eal/common/rte_malloc.c +1 -1
index ebafef3f6cf2..e632c395132c 100644
@@ -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);
lib/eal/freebsd/eal.c +1 -1
index 7daf22e31449..d3499dd5906d 100644
@@ -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;
lib/eal/linux/eal.c +1 -1
index ae323cd492d4..251aa533b274 100644
@@ -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;
lib/eal/windows/eal.c +1 -1
index 033825c14c67..17a5f9d1ba30 100644
@@ -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;
Signature · 1 line
2.39.2
#33 lore raw

PATCH v2 3/19 test: replace use word sanity

In reply to Stephen Hemminger

The word "sanity" is on the not-allowed inclusive naming list. Replace the unnecessary usage in tests.

---
 app/test/test_bitmap.c             |  4 +--
 app/test/test_bpf.c                |  6 ++--
 app/test/test_common.c             |  2 +-
 app/test/test_distributor.c        | 46 +++++++++++++++---------------
 app/test/test_dmadev.c             |  2 +-
 app/test/test_eal_flags.c          | 20 ++++++-------
 app/test/test_hash.c               |  2 +-
 app/test/test_interrupts.c         |  9 +++---
 app/test/test_link_bonding_mode4.c |  2 +-
 app/test/test_mbuf.c               |  2 +-
 app/test/test_rawdev.c             |  2 +-
 app/test/test_timer.c              | 10 +++----
 12 files changed, 54 insertions(+), 53 deletions(-)
app/test/test_bitmap.c +2 -2
index e9c61590aef7..8cb5d0954a2b 100644
@@ -33,7 +33,7 @@ test_bitmap_scan_operations(struct rte_bitmap *bmp)
 	}
 
 	if (slab1_magic != out_slab) {
-		printf("Scan operation sanity failed.\n");
+		printf("Scan operation magic number check failed.\n");
 		return TEST_FAILED;
 	}
 
@@ -43,7 +43,7 @@ test_bitmap_scan_operations(struct rte_bitmap *bmp)
 	}
 
 	if (slab2_magic != out_slab) {
-		printf("Scan operation sanity failed.\n");
+		printf("Scan operation magic number check failed.\n");
 		return TEST_FAILED;
 	}
 
app/test/test_bpf.c +3 -3
index f5af5e8a3f4a..347b672ac211 100644
@@ -3329,9 +3329,9 @@ test_bpf_match(pcap_t *pcap, const char *str,
 	return ret;
 }
 
-/* Basic sanity test can we match a IP packet */
+/* Basic test can we match a IP packet */
 static int
-test_bpf_filter_sanity(pcap_t *pcap)
+test_bpf_filter_match(pcap_t *pcap)
 {
 	const uint32_t plen = 100;
 	struct rte_mbuf mb, *m;
@@ -3463,7 +3463,7 @@ test_bpf_convert(void)
 		return -1;
 	}
 
-	rc = test_bpf_filter_sanity(pcap);
+	rc = test_bpf_filter_match(pcap);
 	for (i = 0; i < RTE_DIM(sample_filters); i++)
 		rc |= test_bpf_filter(pcap, sample_filters[i]);
 
app/test/test_common.c +1 -1
index f89e1eb7ee0d..c7ce8ea32a77 100644
@@ -18,7 +18,7 @@
 	{printf(x "() test failed!\n");\
 	return -1;}
 
-/* this is really a sanity check */
+/* this is really a consistency check */
 static int
 test_macros(int __rte_unused unused_parm)
 {
app/test/test_distributor.c +23 -23

177 lines not on this page · raw message

app/test/test_dmadev.c +1 -1
index 0736ff2a1867..b54319f763f4 100644
@@ -927,7 +927,7 @@ test_dma(void)
 {
 	int i;
 
-	/* basic sanity on dmadev infrastructure */
+	/* basic validation on dmadev infrastructure */
 	if (test_apis() < 0)
 		ERR_RETURN("Error performing API tests\n");
 
app/test/test_eal_flags.c +10 -10
index d2b91e20750e..edbe1be50096 100644
@@ -314,7 +314,7 @@ get_number_of_sockets(void)
 
 /*
  * Test that the app doesn't run with invalid allow option.
- * Final tests ensures it does run with valid options as sanity check (one
+ * Final tests ensures it does run with valid options as basic test (one
  * test for with Domain+BDF, second for just with BDF)
  */
 static int
@@ -382,7 +382,7 @@ test_allow_flag(void)
 
 /*
  * Test that the app doesn't run with invalid blocklist option.
- * Final test ensures it does run with valid options as sanity check
+ * Final test ensures it does run with valid options as basic check.
  */
 static int
 test_invalid_b_flag(void)
@@ -429,7 +429,7 @@ test_invalid_b_flag(void)
 
 /*
  *  Test that the app doesn't run with invalid vdev option.
- *  Final test ensures it does run with valid options as sanity check
+ *  Final test ensures it does run with valid options basic check.
  */
 static int
 test_invalid_vdev_flag(void)
@@ -554,7 +554,7 @@ test_missing_c_flag(void)
 	/* bad coremask value */
 	const char *argv3[] = { prgname, prefix, mp_flag,
 				"-c", "error" };
-	/* sanity check of tests - valid coremask value */
+	/* check of tests - valid coremask value */
 	const char *argv4[] = { prgname, prefix, mp_flag,
 				"-c", "1" };
 	/* -l flag but no corelist value */
@@ -581,7 +581,7 @@ test_missing_c_flag(void)
 				"-l", RTE_STR(RTE_MAX_LCORE) };
 	const char * const argv14[] = { prgname, prefix, mp_flag,
 				"-l", "1-"RTE_STR(RTE_MAX_LCORE) };
-	/* sanity check test - valid corelist value */
+	/* check test - valid corelist value */
 	const char * const argv15[] = { prgname, prefix, mp_flag,
 				 "-l", "1-2,3" };
 
@@ -613,7 +613,7 @@ test_missing_c_flag(void)
 				 "--lcores", "(4-7)=(1,3)" };
 	const char * const argv28[] = { prgname, prefix, mp_flag,
 				 "--lcores", "[4-7]@(1,3)" };
-	/* sanity check of tests - valid lcores value */
+	/* more complex valid lcores value */
 	const char * const argv29[] = { prgname, prefix, mp_flag,
 				 "--lcores",
 				 "0-1,2@(5-7),(3-5)@(0,2),(0,6),7"};
@@ -744,7 +744,7 @@ test_main_lcore_flag(void)
 
 /*
  * Test that the app doesn't run with invalid -n flag option.
- * Final test ensures it does run with valid options as sanity check
+ * Final test ensures it does run with valid options as basic check.
  * Since -n is not compulsory for MP, we instead use --no-huge and --no-shconf
  * flags.
  */
@@ -772,10 +772,10 @@ test_invalid_n_flag(void)
 	/* zero is invalid */
 	const char *argv3[] = { prgname, prefix, no_huge, no_shconf,
 				"-n", "0" };
-	/* sanity test - check with good value */
+	/* check with good value */
 	const char *argv4[] = { prgname, prefix, no_huge, no_shconf,
 				"-n", "2" };
-	/* sanity test - check with no -n flag */
+	/* check with no -n flag */
 	const char *argv5[] = { prgname, prefix, no_huge, no_shconf};
 
 	if (launch_proc(argv1) == 0
@@ -977,7 +977,7 @@ test_misc_flags(void)
 	 * All cases, apart from the first, app should run.
 	 * No further testing of output done.
 	 */
-	/* sanity check - failure with invalid option */
+	/* failure with invalid option */
 	const char *argv0[] = {prgname, prefix, mp_flag, "--invalid-opt"};
 
 	/* With --no-pci */
app/test/test_hash.c +1 -1
index 3e45afaa67fc..f521ce7f679a 100644
@@ -1088,7 +1088,7 @@ fbk_hash_unit_test(void)
 		.socket_id = 0,
 	};
 
-	/* this is a sanity check for "same name" test
+	/* this is a check for "same name" test
 	 * creating this hash will check if we are actually able to create
 	 * multiple hashes with different names (instead of having just one).
 	 */
app/test/test_interrupts.c +5 -4
index b59ab426999c..88105b78a455 100644
@@ -48,7 +48,7 @@ static union intr_pipefds pfds;
  * Check if the interrupt handle is valid.
  */
 static inline int
-test_interrupt_handle_sanity_check(struct rte_intr_handle *intr_handle)
+test_interrupt_handle_check(struct rte_intr_handle *intr_handle)
 {
 	if (!intr_handle || rte_intr_fd_get(intr_handle) < 0)
 		return -1;
@@ -164,7 +164,7 @@ test_interrupt_handle_compare(struct rte_intr_handle *intr_handle_l,
 #else
 /* to be implemented for bsd later */
 static inline int
-test_interrupt_handle_sanity_check(struct rte_intr_handle *intr_handle)
+test_interrupt_handle_check(struct rte_intr_handle *intr_handle)
 {
 	RTE_SET_USED(intr_handle);
 
@@ -215,7 +215,7 @@ test_interrupt_callback(void *arg)
 		return;
 	}
 
-	if (test_interrupt_handle_sanity_check(intr_handle) < 0) {
+	if (test_interrupt_handle_check(intr_handle) < 0) {
 		printf("null or invalid intr_handle for %s\n", __func__);
 		flag = -1;
 		return;
@@ -241,7 +241,8 @@ static void
 test_interrupt_callback_1(void *arg)
 {
 	struct rte_intr_handle *intr_handle = arg;
-	if (test_interrupt_handle_sanity_check(intr_handle) < 0) {
+
+	if (test_interrupt_handle_check(intr_handle) < 0) {
 		printf("null or invalid intr_handle for %s\n", __func__);
 		flag = -1;
 		return;
app/test/test_link_bonding_mode4.c +1 -1
index 21c512c94b89..95dd52848fb9 100644
@@ -224,7 +224,7 @@ add_slave(struct slave_conf *slave, uint8_t start)
 	struct rte_ether_addr addr, addr_check;
 	int retval;
 
-	/* Some sanity check */
+	/* Some basic tests. */
 	RTE_VERIFY(test_params.slave_ports <= slave &&
 		slave - test_params.slave_ports < (int)RTE_DIM(test_params.slave_ports));
 	RTE_VERIFY(slave->bonded == 0);
app/test/test_mbuf.c +1 -1
index c2716dc4e5fe..7c86323be772 100644
@@ -1723,7 +1723,7 @@ test_mbuf_validate_tx_offload(const char *test_name,
 	struct rte_mbuf *m = NULL;
 	int ret = 0;
 
-	/* alloc a mbuf and do sanity check */
+	/* alloc a mbuf and do some basic checks */
 	m = rte_pktmbuf_alloc(pktmbuf_pool);
 	if (m == NULL)
 		GOTO_FAIL("%s: mbuf allocation failed!\n", __func__);
app/test/test_rawdev.c +1 -1
index 3c780e3f9e96..c807bf90d9c3 100644
@@ -47,7 +47,7 @@ test_rawdev_selftests(void)
 	int ret = 0;
 	int i;
 
-	/* basic sanity on rawdev infrastructure */
+	/* basic check on rawdev infrastructure */
 	if (test_rawdev_selftest_skeleton() < 0)
 		return -1;
 
app/test/test_timer.c +5 -5
index 0c36dc9010b0..6615ce536443 100644
@@ -491,11 +491,11 @@ timer_basic_main_loop(__rte_unused void *arg)
 }
 
 static int
-timer_sanity_check(void)
+timer_check(void)
 {
 #ifdef RTE_LIBEAL_USE_HPET
 	if (eal_timer_source != EAL_TIMER_HPET) {
-		printf("Not using HPET, can't sanity check timer sources\n");
+		printf("Not using HPET, can't check timer sources\n");
 		return 0;
 	}
 
@@ -539,9 +539,9 @@ test_timer(void)
 		return TEST_SKIPPED;
 	}
 
-	/* sanity check our timer sources and timer config values */
-	if (timer_sanity_check() < 0) {
-		printf("Timer sanity checks failed\n");
+	/* check our timer sources and timer config values */
+	if (timer_check() < 0) {
+		printf("Timer checks failed\n");
 		return TEST_FAILED;
 	}
 
Signature · 1 line
2.39.2
#34 lore raw

PATCH v2 4/19 examples: remove term sanity

In reply to Stephen Hemminger

Do not use non-inclusive terms.

---
 examples/ipsec-secgw/event_helper.c | 2 +-
 examples/qos_sched/args.c           | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
examples/ipsec-secgw/event_helper.c +1 -1
index 89fb7e62a5a3..f595b4fe01dc 100644
@@ -2100,7 +2100,7 @@ eh_launch_worker(struct eh_conf *conf, struct eh_app_worker_params *app_wrkr,
 		goto clean_and_exit;
 	}
 
-	/* Verify sanity of the matched worker */
+	/* Verify validity of the matched worker */
 	if (eh_verify_match_worker(match_wrkr) != 1) {
 		EH_LOG_ERR("Failed to validate the matched worker");
 		goto clean_and_exit;
examples/qos_sched/args.c +1 -1
index e97273152aa7..1d8ba9522586 100644
@@ -384,7 +384,7 @@ app_parse_args(int argc, char **argv)
 		return -1;
 	}
 
-	/* sanity check for cores assignment */
+	/* check for cores assignment */
 	for(i = 0; i < nb_pfc; i++) {
 		if (qos_conf[i].rx_core >= RTE_MAX_LCORE) {
 			RTE_LOG(ERR, APP, "pfc %u: invalid RX lcore index %u\n", i + 1,
Signature · 1 line
2.39.2
#35 lore raw

PATCH v2 5/19 lib: replace use of sanity check in comments and messages

In reply to Stephen Hemminger

Sanity check is on the Tier 2 non-inclusive list.
Replace or remove it.

---
 lib/graph/graph.c           | 2 +-
 lib/graph/graph_stats.c     | 2 +-
 lib/graph/node.c            | 2 +-
 lib/jobstats/rte_jobstats.c | 6 +++---
 lib/metrics/rte_metrics.c   | 2 +-
 lib/pcapng/rte_pcapng.c     | 2 +-
 6 files changed, 8 insertions(+), 8 deletions(-)
lib/graph/graph.c +1 -1
index 5582631b5301..597e9e7aa28e 100644
@@ -283,7 +283,7 @@ rte_graph_create(const char *name, struct rte_graph_param *prm)
 
 	graph_spinlock_lock();
 
-	/* Check arguments sanity */
+	/* Check argument validity */
 	if (prm == NULL)
 		SET_ERR_JMP(EINVAL, fail, "Param should not be NULL");
 
lib/graph/graph_stats.c +1 -1
index c0140ba92212..28d5728e5e61 100644
@@ -271,7 +271,7 @@ rte_graph_cluster_stats_create(const struct rte_graph_cluster_stats_param *prm)
 	const char *pattern;
 	rte_graph_t i;
 
-	/* Sanity checks */
+	/* Validate arguments */
 	if (!rte_graph_has_stats_feature())
 		SET_ERR_JMP(EINVAL, fail, "Stats feature is not enabled");
 
lib/graph/node.c +1 -1
index 149414dcd94c..3f0ae0c395db 100644
@@ -68,7 +68,7 @@ __rte_node_register(const struct rte_node_register *reg)
 
 	graph_spinlock_lock();
 
-	/* Check sanity */
+	/* Check argument validity */
 	if (reg == NULL || reg->process == NULL) {
 		rte_errno = EINVAL;
 		goto fail;
lib/jobstats/rte_jobstats.c +3 -3
index af565a14eaf3..1c4b280c952a 100644
@@ -124,7 +124,7 @@ rte_jobstats_start(struct rte_jobstats_context *ctx, struct rte_jobstats *job)
 {
 	uint64_t now;
 
-	/* Some sanity check. */
+	/* Check validity of arguments. */
 	if (unlikely(ctx == NULL || job == NULL || job->context != NULL))
 		return -EINVAL;
 
@@ -144,7 +144,7 @@ rte_jobstats_abort(struct rte_jobstats *job)
 	struct rte_jobstats_context *ctx;
 	uint64_t now, exec_time;
 
-	/* Some sanity check. */
+	/* Check that arguments are valid */
 	if (unlikely(job == NULL || job->context == NULL))
 		return -EINVAL;
 
@@ -165,7 +165,7 @@ rte_jobstats_finish(struct rte_jobstats *job, int64_t job_value)
 	uint64_t now, exec_time;
 	int need_update;
 
-	/* Some sanity check. */
+	/* Check arguments */
 	if (unlikely(job == NULL || job->context == NULL))
 		return -EINVAL;
 
lib/metrics/rte_metrics.c +1 -1
index 0ccdbabc04eb..f60d4f3f6e25 100644
@@ -120,7 +120,7 @@ rte_metrics_reg_names(const char * const *names, uint16_t cnt_names)
 	uint16_t idx_name;
 	uint16_t idx_base;
 
-	/* Some sanity checks */
+	/* Some consistency checks */
 	if (cnt_names < 1 || names == NULL)
 		return -EINVAL;
 	for (idx_name = 0; idx_name < cnt_names; idx_name++)
lib/pcapng/rte_pcapng.c +1 -1
index 3c91fc77644a..fedf4b5b7f11 100644
@@ -669,7 +669,7 @@ rte_pcapng_write_packets(rte_pcapng_t *self,
 		struct rte_mbuf *m = pkts[i];
 		struct pcapng_enhance_packet_block *epb;
 
-		/* sanity check that is really a pcapng mbuf */
+		/* Check that is really a pcapng mbuf */
 		epb = rte_pktmbuf_mtod(m, struct pcapng_enhance_packet_block *);
 		if (unlikely(epb->block_type != PCAPNG_ENHANCED_PACKET_BLOCK ||
 			     epb->block_length != rte_pktmbuf_data_len(m))) {
Signature · 1 line
2.39.2
#36 lore raw

PATCH v2 6/19 doc/eventdev_pipeline: remove sanity

In reply to Stephen Hemminger

The word sanity check is unnecessary here.

---
 doc/guides/gpus/cuda.rst                       | 2 +-
 doc/guides/sample_app_ug/eventdev_pipeline.rst | 2 +-
 doc/guides/tools/testbbdev.rst                 | 8 ++++----
 3 files changed, 6 insertions(+), 6 deletions(-)
doc/guides/gpus/cuda.rst +1 -1
index 114e3bc8cb72..75f107095593 100644
@@ -81,7 +81,7 @@ Similarly to CUDA shared library, if the **libgdrapi.so** shared library
 is not installed in default locations (e.g. /usr/local/lib),
 you can use the variable ``GDRCOPY_PATH_L``.
 
-As an example, to enable the CPU map feature sanity check,
+As an example, to enable the CPU map feature check,
 run the ``app/test-gpudev`` application with:
 
 .. code-block:: console
doc/guides/sample_app_ug/eventdev_pipeline.rst +1 -1
index 19ff53803ede..e7787fb26609 100644
@@ -50,7 +50,7 @@ these settings is shown below:
     ./<build_dir>/examples/dpdk-eventdev_pipeline -l 0,2,8-15 --vdev event_sw0 \
     -- -r1 -t1 -e4 -w FF00 -s4 -n0 -c32 -W1000 -D
 
-The application has some sanity checking built-in, so if there is a function
+The application has some internal validation, so if there is a function
 (e.g.; the RX core) which doesn't have a cpu core mask assigned, the application
 will print an error message:
 
doc/guides/tools/testbbdev.rst +4 -4
index 54a9c44dc345..0a4af4ec9bec 100644
@@ -7,7 +7,7 @@ dpdk-test-bbdev Application
 The ``dpdk-test-bbdev`` tool is a Data Plane Development Kit (DPDK) utility that
 allows measuring performance parameters of PMDs available in the bbdev framework.
 Tests available for execution are: latency, throughput, validation,
-bler and sanity tests. Execution of tests can be customized using various
+bler and basic functionality. Execution of tests can be customized using various
 parameters passed to a python running script.
 
 
@@ -95,8 +95,8 @@ Test Cases
 
 There are 7 main test cases that can be executed using testbbdev tool:
 
-* Sanity checks [-c unittest]
-    - Performs sanity checks on BBDEV interface, validating basic functionality
+* Functional checks [-c unittest]
+    - Performs checks on BBDEV interface, validating basic functionality
 
 * Validation tests [-c validation]
     - Performs full operation of enqueue and dequeue
@@ -230,7 +230,7 @@ vector name refer more explicitly processing specificity such as
 is purely read/written for external DDR, lbrm when limited buffer
 rate matching is expected, or crc_fail when a CRC failure is expected.
 They are chosen to have a good coverage across sizes and processing
-parameters while still keeping their number limited as part of sanity
+parameters while still keeping their number limited as part of functional
 regression.
 
 Shortened tree of isg_cid-wireless_dpdk_ae with dpdk compiled and output
Signature · 1 line
2.39.2
#37 lore raw

PATCH v2 7/19 net/ring: replace use of sanity

In reply to Stephen Hemminger

Don't use term sanity check

---
 drivers/net/ring/rte_eth_ring.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/net/ring/rte_eth_ring.c +2 -5
index e8bc9b627102..e36742fda84f 100644
@@ -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 {
@@ -591,10 +591,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)
Signature · 1 line
2.39.2
#38 lore raw

PATCH v2 8/19 net/fm10k, net/ixgbe: remove word sanity

In reply to Stephen Hemminger

Remove non-inclusive term sanity from these Intel drivers.

---
 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 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
drivers/net/fm10k/fm10k_ethdev.c +1 -1
index 4d3c4c10cfa4..894cf8c8a6b5 100644
@@ -1757,7 +1757,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;
 
drivers/net/fm10k/fm10k_rxtx.c +1 -1
index c0841ab8cb34..94345299b22a 100644
@@ -647,7 +647,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;
drivers/net/ixgbe/ixgbe_fdir.c +1 -1
index 06d6e2126de5..51bbf577e3fe 100644
@@ -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.
drivers/net/ixgbe/ixgbe_ipsec.c +1 -1
index d3313085560d..d4aa3e9ede8e 100644
@@ -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;
drivers/net/ixgbe/ixgbe_rxtx.c +1 -1
index c9d6ca9efea4..72f89b1b51fd 100644
@@ -4907,7 +4907,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;
Signature · 1 line
2.39.2
#39 lore raw

PATCH v2 9/19 net/mlx[45]: remove word sanity

In reply to Stephen Hemminger

The term "sanity" is on non-inclusive naming list. Remove it from the Nvidia drivers.

---
 drivers/common/mlx5/linux/mlx5_common_os.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 +-
 7 files changed, 10 insertions(+), 12 deletions(-)
drivers/common/mlx5/linux/mlx5_common_os.c +1 -1
index aafff60eeb38..45fac9be0ae1 100644
@@ -234,7 +234,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]
drivers/net/mlx4/mlx4.c +1 -1
index a54016f4a235..e3048d5b6ec0 100644
@@ -1206,7 +1206,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]
drivers/net/mlx4/mlx4_flow.c +3 -3
index 8ef9fd2db44e..25b185d8710c 100644
@@ -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)
drivers/net/mlx5/mlx5_flow_dv.c +1 -1
index d14661298cf0..52a035588755 100644
@@ -8638,7 +8638,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
drivers/net/mlx5/mlx5_flow_hw.c +2 -4
index 853c94af9cfd..6e805d547c8a 100644
@@ -5576,11 +5576,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(__builtin_popcount(mask) >= __builtin_popcount(priv->vport_meta_mask));
 	return mask;
@@ -5592,12 +5591,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;
drivers/net/mlx5/mlx5_rxq.c +1 -1
index ad8fd13cbe8e..377618926a8d 100644
@@ -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.
 	 * CACHE_FLUSHTHRESH_MULTIPLIER is defined in a C file, so using a
 	 * constant number 2 instead.
drivers/net/mlx5/mlx5_rxtx_vec.h +1 -1
index 77c3f4efa019..f8376f2b55b4 100644
@@ -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) \
Signature · 1 line
2.39.2
#40 lore raw

PATCH v2 10/19 net/sfc: remove term "sanity check"

In reply to Stephen Hemminger

Remove term sanity check in comment.

---
 drivers/net/sfc/sfc_dp_rx.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/sfc/sfc_dp_rx.h +1 -1
index 246adbd87cde..c64db488f652 100644
@@ -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;
 
Signature · 1 line
2.39.2
#41 lore raw

PATCH v2 11/19 net/ark: replace use of term sanity

In reply to Stephen Hemminger

Do not use non inclusive terms.

---
 drivers/net/ark/ark_ethdev.c    | 8 ++++----
 drivers/net/ark/ark_ethdev_rx.c | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)
drivers/net/ark/ark_ethdev.c +4 -4
index b2995427c8ca..9cb1c5dea49e 100644
@@ -358,10 +358,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__);
@@ -380,7 +380,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__);
 
@@ -601,7 +601,7 @@ eth_ark_dev_start(struct rte_eth_dev *dev)
 		pthread_t thread;
 
 		/* Delay packet generatpr 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[32];
 		snprintf(tname, sizeof(tname), "ark-delay-pg-%d",
drivers/net/ark/ark_ethdev_rx.c +1 -1
index cbc0416bc2d2..e293d78db353 100644
@@ -275,7 +275,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)) {
Signature · 1 line
2.39.2
#42 lore raw

PATCH v2 12/19 net/bnxt: replace use of term sanity

In reply to Stephen Hemminger

Do not use non-inclusive terms.

---
 drivers/net/bnxt/bnxt_hwrm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/bnxt/bnxt_hwrm.c +1 -1
index 51e1e2d6b39b..5370293fed8d 100644
@@ -262,7 +262,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 */
Signature · 1 line
2.39.2
#43 lore raw

PATCH v2 13/19 net/bnx2x: remove reference to sanity

In reply to Stephen Hemminger

Replace "sanity check"

---
 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 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)
drivers/net/bnx2x/bnx2x.c +1 -1
index 29c16bb207c7..0d2dc2d3b3fa 100644
@@ -7821,7 +7821,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,
drivers/net/bnx2x/bnx2x_stats.c +4 -4
index c07b01510a06..86d90679ac0a 100644
@@ -187,7 +187,7 @@ bnx2x_stats_pmf_update(struct bnx2x_softc *sc)
 		 */
 		return;
 	}
-	/* sanity */
+	/* input valid? */
 	if (!sc->port.pmf || !sc->port.port_stx) {
 		PMD_DRV_LOG(ERR, sc, "BUG!");
 		return;
@@ -237,7 +237,7 @@ bnx2x_port_stats_init(struct bnx2x_softc *sc)
     uint32_t mac_addr;
     uint32_t *stats_comp = BNX2X_SP(sc, stats_comp);
 
-    /* sanity */
+    /* input valid? */
     if (!sc->link_vars.link_up || !sc->port.pmf) {
 	PMD_DRV_LOG(ERR, sc, "BUG!");
 	return;
@@ -461,7 +461,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 valid? */
     if (!sc->func_stx) {
 	PMD_DRV_LOG(ERR, sc, "BUG!");
 	return;
@@ -1301,7 +1301,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 valid? */
     if (!sc->port.pmf || !sc->port.port_stx) {
 	PMD_DRV_LOG(ERR, sc, "BUG!");
 	return;
drivers/net/bnx2x/ecore_sp.c +1 -1
index c6c3857778f7..158205266f62 100644
@@ -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;
 
drivers/net/bnx2x/elink.c +2 -2
index 43fbf04ece11..2b0236aac24e 100644
@@ -1087,7 +1087,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;
@@ -1104,7 +1104,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;
Signature · 1 line
2.39.2
#44 lore raw

PATCH v2 14/19 cnxk: replace term sanity

In reply to Stephen Hemminger

Do not use non-inclusive naming.

---
 drivers/common/cnxk/roc_nix_tm_ops.c | 2 +-
 drivers/common/cnxk/roc_npa.c        | 4 ++--
 drivers/net/cnxk/cnxk_ethdev.c       | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)
drivers/common/cnxk/roc_nix_tm_ops.c +1 -1
index 4e88ad1beb71..d837e2247634 100644
@@ -527,7 +527,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)
drivers/common/cnxk/roc_npa.c +2 -2
index 20637fbf657c..08e193e6118c 100644
@@ -341,7 +341,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;
@@ -769,7 +769,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;
 
drivers/net/cnxk/cnxk_ethdev.c +2 -2
index 1cae3084e184..8fdc3d5a9a96 100644
@@ -633,7 +633,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;
@@ -1195,7 +1195,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;
Signature · 1 line
2.39.2
#45 lore raw

PATCH v2 15/19 event/opdl: remove term sanity

In reply to Stephen Hemminger

Don't use non-inclusive term.

---
 drivers/event/opdl/opdl_evdev.c      | 2 +-
 drivers/event/opdl/opdl_evdev_init.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/event/opdl/opdl_evdev.c +1 -1
index 9ce8b39b6098..862f3fa9b27a 100644
@@ -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",
drivers/event/opdl/opdl_evdev_init.c +1 -1
index be3437fc2f40..12eb2695f5de 100644
@@ -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));
Signature · 1 line
2.39.2
#46 lore raw

PATCH v2 16/19 net/txgbe: replace term sanity

In reply to Stephen Hemminger

Don't use term sanity.

---
 drivers/net/txgbe/txgbe_ipsec.c | 2 +-
 drivers/net/txgbe/txgbe_rxtx.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/txgbe/txgbe_ipsec.c +1 -1
index f9f8108fb894..cadb0943c82d 100644
@@ -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;
drivers/net/txgbe/txgbe_rxtx.c +1 -1
index 427f8b82ac80..ef6478b8a5c8 100644
@@ -4115,7 +4115,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;
Signature · 1 line
2.39.2
#47 lore raw

PATCH v2 17/19 net/cxgbe: remove use of term sanity

In reply to Stephen Hemminger

Remove non-inclusive terminolgy.

---
 drivers/net/cxgbe/cxgbe_ethdev.c | 10 ++--------
 drivers/net/cxgbe/cxgbevf_main.c |  4 ++--
 2 files changed, 4 insertions(+), 10 deletions(-)
drivers/net/cxgbe/cxgbe_ethdev.c +2 -8
index 45bbeaef0ceb..2abb721afda1 100644
@@ -518,10 +518,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",
@@ -642,10 +639,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",
drivers/net/cxgbe/cxgbevf_main.c +2 -2
index d0c93f8ac3a5..dfb12b4ed5c9 100644
@@ -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"
Signature · 1 line
2.39.2
#48 lore raw

PATCH v2 18/19 crypto/bcmfs: replace term sanity check

In reply to Stephen Hemminger

Do not use non-inclusive naming here.

---
 drivers/crypto/bcmfs/hw/bcmfs4_rm.c | 6 +++---
 drivers/crypto/bcmfs/hw/bcmfs5_rm.c | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)
drivers/crypto/bcmfs/hw/bcmfs4_rm.c +3 -3
index 0ccb111898e4..50280fe14176 100644
@@ -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;
 	}
drivers/crypto/bcmfs/hw/bcmfs5_rm.c +3 -3
index c677c0cd9b52..c45eea82de20 100644
@@ -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;
 	}
Signature · 1 line
2.39.2
#49 lore raw

PATCH v2 19/19 Remove use of term sanity check

In reply to Stephen Hemminger

Replace non-inclusive language with better comments.

---
 drivers/bus/fslmc/qbman/qbman_sys_decl.h  | 2 +-
 drivers/common/dpaax/caamflib/desc.h      | 2 +-
 drivers/dma/idxd/idxd_pci.c               | 2 +-
 drivers/net/bonding/rte_eth_bond_8023ad.c | 2 +-
 drivers/net/mvpp2/mrvl_qos.c              | 2 +-
 drivers/net/qede/qede_rxtx.c              | 6 +++---
 6 files changed, 8 insertions(+), 8 deletions(-)
drivers/bus/fslmc/qbman/qbman_sys_decl.h +1 -1
index caaae417773c..2b6162d0ceaf 100644
@@ -9,7 +9,7 @@
 #include <compat.h>
 #include <fsl_qbman_base.h>
 
-/* Sanity check */
+/* Byte order check */
 #if (__BYTE_ORDER__ != __ORDER_BIG_ENDIAN__) && \
 	(__BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__)
 #error "Unknown endianness!"
drivers/common/dpaax/caamflib/desc.h +1 -1
index 635d6bad071f..feb6a5d7bb2d 100644
@@ -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)
drivers/dma/idxd/idxd_pci.c +1 -1
index 781fa02db3ca..a1e9b08940d9 100644
@@ -196,7 +196,7 @@ init_pci_device(struct rte_pci_device *dev, struct idxd_dmadev *idxd,
 	pci->portals = dev->mem_resource[2].addr;
 	pci->wq_cfg_sz = (pci->regs->wqcap >> 24) & 0x0F;
 
-	/* 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");
drivers/net/bonding/rte_eth_bond_8023ad.c +1 -1
index 4a266bb2caf1..56972f06c045 100644
@@ -1477,7 +1477,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 ||
drivers/net/mvpp2/mrvl_qos.c +1 -1
index f43217bc589c..db5052a9ab6f 100644
@@ -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;
drivers/net/qede/qede_rxtx.c +3 -3
index c35585f5fdd6..8b89841e03b1 100644
@@ -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 =
Signature · 1 line
2.39.2
#50 lore raw

v3 cover Replace use "sanity check"

In reply to Stephen Hemminger

This set of patches removes almost all use of the term sanity check. It does not address fixing the base driver code from vendors.

The term sanity-check and related formats are on the Inclusive Naming Tier 2 (Strongly Consider Replacing) word list.
https://inclusivenaming.org/word-lists/tier-2/sanity-check/

v3 - fix mbuf_raw_verify
add deprecation notice

Stephen Hemminger (19):
mbuf: replace term sanity check
eal: replace use of sanity check in comments and messages
test: replace use word sanity
examples: remove term sanity
lib: replace use of sanity check in comments and messages doc/eventdev_pipeline: remove sanity
net/ring: replace use of sanity
net/fm10k, net/ixgbe: remove word sanity net/mlx[45]: remove word sanity
net/sfc: remove term "sanity check"
net/ark: replace use of term sanity
net/bnxt: replace use of term sanity
net/bnx2x: remove reference to sanity
cnxk: replace term sanity
event/opdl: remove term sanity
net/txgbe: replace term sanity
net/cxgbe: remove use of term sanity crypto/bcmfs: replace term sanity check
Remove use of term sanity check

 app/test/test_bitmap.c                        |  4 +-
 app/test/test_bpf.c                           |  6 +-
 app/test/test_common.c                        |  2 +-
 app/test/test_distributor.c                   | 46 ++++++------
 app/test/test_dmadev.c                        |  2 +-
 app/test/test_eal_flags.c                     | 20 +++---
 app/test/test_hash.c                          |  2 +-
 app/test/test_interrupts.c                    |  9 +--
 app/test/test_link_bonding_mode4.c            |  2 +-
 app/test/test_mbuf.c                          | 32 ++++-----
 app/test/test_rawdev.c                        |  2 +-
 app/test/test_timer.c                         | 10 +--
 doc/guides/gpus/cuda.rst                      |  2 +-
 doc/guides/prog_guide/mbuf_lib.rst            |  4 +-
 doc/guides/rel_notes/deprecation.rst          |  3 +
 .../sample_app_ug/eventdev_pipeline.rst       |  2 +-
 doc/guides/tools/testbbdev.rst                |  8 +--
 drivers/bus/fslmc/qbman/qbman_sys_decl.h      |  2 +-
 drivers/common/cnxk/roc_nix_tm_ops.c          |  2 +-
 drivers/common/cnxk/roc_npa.c                 |  4 +-
 drivers/common/dpaax/caamflib/desc.h          |  2 +-
 drivers/common/mlx5/linux/mlx5_common_os.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/avp/avp_ethdev.c                  | 18 ++---
 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/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/qede/qede_rxtx.c                  |  6 +-
 drivers/net/ring/rte_eth_ring.c               |  7 +-
 drivers/net/sfc/sfc_dp_rx.h                   |  2 +-
 drivers/net/sfc/sfc_ef100_rx.c                |  6 +-
 drivers/net/sfc/sfc_ef10_essb_rx.c            |  4 +-
 drivers/net/sfc/sfc_ef10_rx.c                 |  4 +-
 drivers/net/sfc/sfc_rx.c                      |  2 +-
 drivers/net/txgbe/txgbe_ipsec.c               |  2 +-
 drivers/net/txgbe/txgbe_rxtx.c                |  2 +-
 examples/ipsec-secgw/event_helper.c           |  2 +-
 examples/ipv4_multicast/main.c                |  2 +-
 examples/qos_sched/args.c                     |  2 +-
 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 +-
 lib/graph/graph.c                             |  2 +-
 lib/graph/graph_stats.c                       |  2 +-
 lib/graph/node.c                              |  2 +-
 lib/jobstats/rte_jobstats.c                   |  6 +-
 lib/mbuf/rte_mbuf.c                           | 23 +++---
 lib/mbuf/rte_mbuf.h                           | 71 ++++++++++---------
 lib/mbuf/version.map                          |  1 +
 lib/metrics/rte_metrics.c                     |  2 +-
 lib/pcapng/rte_pcapng.c                       |  2 +-
 80 files changed, 229 insertions(+), 224 deletions(-)
Signature · 1 line
2.39.2
#51 lore raw

PATCH v3 1/19 mbuf: replace term sanity check

Replace rte_mbuf_sanity_check() with rte_mbuf_verify() to match the similar macro RTE_VERIFY() in rte_debug.h

The term sanity check is on the Tier 2 list of words that should be replaced.

---
 app/test/test_mbuf.c                 | 30 ++++++------
 doc/guides/prog_guide/mbuf_lib.rst   |  4 +-
 doc/guides/rel_notes/deprecation.rst |  3 ++
 drivers/net/avp/avp_ethdev.c         | 18 +++----
 drivers/net/sfc/sfc_ef100_rx.c       |  6 +--
 drivers/net/sfc/sfc_ef10_essb_rx.c   |  4 +-
 drivers/net/sfc/sfc_ef10_rx.c        |  4 +-
 drivers/net/sfc/sfc_rx.c             |  2 +-
 examples/ipv4_multicast/main.c       |  2 +-
 lib/mbuf/rte_mbuf.c                  | 23 +++++----
 lib/mbuf/rte_mbuf.h                  | 71 +++++++++++++++-------------
 lib/mbuf/version.map                 |  1 +
 12 files changed, 91 insertions(+), 77 deletions(-)
app/test/test_mbuf.c +15 -15
index 8d8d3b9386ce..c2716dc4e5fe 100644
@@ -261,8 +261,8 @@ test_one_pktmbuf(struct rte_mempool *pktmbuf_pool)
 		GOTO_FAIL("Buffer should be continuous");
 	memset(hdr, 0x55, MBUF_TEST_HDR2_LEN);
 
-	rte_mbuf_sanity_check(m, 1);
-	rte_mbuf_sanity_check(m, 0);
+	rte_mbuf_verify(m, 1);
+	rte_mbuf_verify(m, 0);
 	rte_pktmbuf_dump(stdout, m, 0);
 
 	/* this prepend should fail */
@@ -1161,7 +1161,7 @@ test_refcnt_mbuf(void)
 
 #ifdef RTE_EXEC_ENV_WINDOWS
 static int
-test_failing_mbuf_sanity_check(struct rte_mempool *pktmbuf_pool)
+test_failing_mbuf_verify(struct rte_mempool *pktmbuf_pool)
 {
 	RTE_SET_USED(pktmbuf_pool);
 	return TEST_SKIPPED;
@@ -1188,7 +1188,7 @@ verify_mbuf_check_panics(struct rte_mbuf *buf)
 		/* No need to generate a coredump when panicking. */
 		rl.rlim_cur = rl.rlim_max = 0;
 		setrlimit(RLIMIT_CORE, &rl);
-		rte_mbuf_sanity_check(buf, 1); /* should panic */
+		rte_mbuf_verify(buf, 1); /* should panic */
 		exit(0);  /* return normally if it doesn't panic */
 	} else if (pid < 0) {
 		printf("Fork Failed\n");
@@ -1202,12 +1202,12 @@ verify_mbuf_check_panics(struct rte_mbuf *buf)
 }
 
 static int
-test_failing_mbuf_sanity_check(struct rte_mempool *pktmbuf_pool)
+test_failing_mbuf_verify(struct rte_mempool *pktmbuf_pool)
 {
 	struct rte_mbuf *buf;
 	struct rte_mbuf badbuf;
 
-	printf("Checking rte_mbuf_sanity_check for failure conditions\n");
+	printf("Checking rte_mbuf_verify for failure conditions\n");
 
 	/* get a good mbuf to use to make copies */
 	buf = rte_pktmbuf_alloc(pktmbuf_pool);
@@ -1729,7 +1729,7 @@ test_mbuf_validate_tx_offload(const char *test_name,
 		GOTO_FAIL("%s: mbuf allocation failed!\n", __func__);
 	if (rte_pktmbuf_pkt_len(m) != 0)
 		GOTO_FAIL("%s: Bad packet length\n", __func__);
-	rte_mbuf_sanity_check(m, 0);
+	rte_mbuf_verify(m, 0);
 	m->ol_flags = ol_flags;
 	m->tso_segsz = segsize;
 	ret = rte_validate_tx_offload(m);
@@ -1936,7 +1936,7 @@ test_pktmbuf_read(struct rte_mempool *pktmbuf_pool)
 		GOTO_FAIL("%s: mbuf allocation failed!\n", __func__);
 	if (rte_pktmbuf_pkt_len(m) != 0)
 		GOTO_FAIL("%s: Bad packet length\n", __func__);
-	rte_mbuf_sanity_check(m, 0);
+	rte_mbuf_verify(m, 0);
 
 	data = rte_pktmbuf_append(m, MBUF_TEST_DATA_LEN2);
 	if (data == NULL)
@@ -1985,7 +1985,7 @@ test_pktmbuf_read_from_offset(struct rte_mempool *pktmbuf_pool)
 
 	if (rte_pktmbuf_pkt_len(m) != 0)
 		GOTO_FAIL("%s: Bad packet length\n", __func__);
-	rte_mbuf_sanity_check(m, 0);
+	rte_mbuf_verify(m, 0);
 
 	/* prepend an ethernet header */
 	hdr = (struct ether_hdr *)rte_pktmbuf_prepend(m, hdr_len);
@@ -2130,7 +2130,7 @@ create_packet(struct rte_mempool *pktmbuf_pool,
 			GOTO_FAIL("%s: mbuf allocation failed!\n", __func__);
 		if (rte_pktmbuf_pkt_len(pkt_seg) != 0)
 			GOTO_FAIL("%s: Bad packet length\n", __func__);
-		rte_mbuf_sanity_check(pkt_seg, 0);
+		rte_mbuf_verify(pkt_seg, 0);
 		/* Add header only for the first segment */
 		if (test_data->flags == MBUF_HEADER && seg == 0) {
 			hdr_len = sizeof(struct rte_ether_hdr);
@@ -2342,7 +2342,7 @@ test_pktmbuf_ext_shinfo_init_helper(struct rte_mempool *pktmbuf_pool)
 		GOTO_FAIL("%s: mbuf allocation failed!\n", __func__);
 	if (rte_pktmbuf_pkt_len(m) != 0)
 		GOTO_FAIL("%s: Bad packet length\n", __func__);
-	rte_mbuf_sanity_check(m, 0);
+	rte_mbuf_verify(m, 0);
 
 	ext_buf_addr = rte_malloc("External buffer", buf_len,
 			RTE_CACHE_LINE_SIZE);
@@ -2506,8 +2506,8 @@ test_pktmbuf_ext_pinned_buffer(struct rte_mempool *std_pool)
 		GOTO_FAIL("%s: test_pktmbuf_copy(pinned) failed\n",
 			  __func__);
 
-	if (test_failing_mbuf_sanity_check(pinned_pool) < 0)
-		GOTO_FAIL("%s: test_failing_mbuf_sanity_check(pinned)"
+	if (test_failing_mbuf_verify(pinned_pool) < 0)
+		GOTO_FAIL("%s: test_failing_mbuf_verify(pinned)"
 			  " failed\n", __func__);
 
 	if (test_mbuf_linearize_check(pinned_pool) < 0)
@@ -2881,8 +2881,8 @@ test_mbuf(void)
 		goto err;
 	}
 
-	if (test_failing_mbuf_sanity_check(pktmbuf_pool) < 0) {
-		printf("test_failing_mbuf_sanity_check() failed\n");
+	if (test_failing_mbuf_verify(pktmbuf_pool) < 0) {
+		printf("test_failing_mbuf_verify() failed\n");
 		goto err;
 	}
 
doc/guides/prog_guide/mbuf_lib.rst +2 -2
index 049357c75563..0accb51a98c7 100644
@@ -266,8 +266,8 @@ can be found in several of the sample applications, for example, the IPv4 Multic
 Debug
 -----
 
-In debug mode, the functions of the mbuf library perform sanity checks before any operation (such as, buffer corruption,
-bad type, and so on).
+In debug mode, the functions of the mbuf library perform consistency checks
+before any operation (such as, buffer corruption, bad type, and so on).
 
 Use Cases
 ---------
doc/guides/rel_notes/deprecation.rst +3 -0
index dcc1ca169668..186cc13eea60 100644
@@ -163,3 +163,6 @@ Deprecation Notices
   The new port library API (functions rte_swx_port_*)
   will gradually transition from experimental to stable status
   starting with DPDK 23.07 release.
+
+* mbuf: The function ``rte_mbuf_sanity_check`` will be deprecated in DPDK 23.07
+  and removed in DPDK 23.11. The new function will be ``rte_mbuf_verify``.
drivers/net/avp/avp_ethdev.c +9 -9
index b2a08f563542..b402c7a2ad16 100644
@@ -1231,7 +1231,7 @@ _avp_mac_filter(struct avp_dev *avp, struct rte_mbuf *m)
 
 #ifdef RTE_LIBRTE_AVP_DEBUG_BUFFERS
 static inline void
-__avp_dev_buffer_sanity_check(struct avp_dev *avp, struct rte_avp_desc *buf)
+__avp_dev_buffer_check(struct avp_dev *avp, struct rte_avp_desc *buf)
 {
 	struct rte_avp_desc *first_buf;
 	struct rte_avp_desc *pkt_buf;
@@ -1272,12 +1272,12 @@ __avp_dev_buffer_sanity_check(struct avp_dev *avp, struct rte_avp_desc *buf)
 			  first_buf->pkt_len, pkt_len);
 }
 
-#define avp_dev_buffer_sanity_check(a, b) \
-	__avp_dev_buffer_sanity_check((a), (b))
+#define avp_dev_buffer_check(a, b) \
+	__avp_dev_buffer_check((a), (b))
 
 #else /* RTE_LIBRTE_AVP_DEBUG_BUFFERS */
 
-#define avp_dev_buffer_sanity_check(a, b) do {} while (0)
+#define avp_dev_buffer_check(a, b) do {} while (0)
 
 #endif
 
@@ -1302,7 +1302,7 @@ avp_dev_copy_from_buffers(struct avp_dev *avp,
 	void *pkt_data;
 	unsigned int i;
 
-	avp_dev_buffer_sanity_check(avp, buf);
+	avp_dev_buffer_check(avp, buf);
 
 	/* setup the first source buffer */
 	pkt_buf = avp_dev_translate_buffer(avp, buf);
@@ -1370,7 +1370,7 @@ avp_dev_copy_from_buffers(struct avp_dev *avp,
 	rte_pktmbuf_pkt_len(m) = total_length;
 	m->vlan_tci = vlan_tci;
 
-	__rte_mbuf_sanity_check(m, 1);
+	__rte_mbuf_verify(m, 1);
 
 	return m;
 }
@@ -1614,7 +1614,7 @@ avp_dev_copy_to_buffers(struct avp_dev *avp,
 	char *pkt_data;
 	unsigned int i;
 
-	__rte_mbuf_sanity_check(mbuf, 1);
+	__rte_mbuf_verify(mbuf, 1);
 
 	m = mbuf;
 	src_offset = 0;
@@ -1680,7 +1680,7 @@ avp_dev_copy_to_buffers(struct avp_dev *avp,
 		first_buf->vlan_tci = mbuf->vlan_tci;
 	}
 
-	avp_dev_buffer_sanity_check(avp, buffers[0]);
+	avp_dev_buffer_check(avp, buffers[0]);
 
 	return total_length;
 }
@@ -1798,7 +1798,7 @@ avp_xmit_scattered_pkts(void *tx_queue,
 
 #ifdef RTE_LIBRTE_AVP_DEBUG_BUFFERS
 	for (i = 0; i < nb_pkts; i++)
-		avp_dev_buffer_sanity_check(avp, tx_bufs[i]);
+		avp_dev_buffer_check(avp, tx_bufs[i]);
 #endif
 
 	/* send the packets */
drivers/net/sfc/sfc_ef100_rx.c +3 -3
index 16cd8524d32f..dcd3b3316752 100644
@@ -178,7 +178,7 @@ sfc_ef100_rx_qrefill(struct sfc_ef100_rxq *rxq)
 			struct sfc_ef100_rx_sw_desc *rxd;
 			rte_iova_t dma_addr;
 
-			__rte_mbuf_raw_sanity_check(m);
+			__rte_mbuf_raw_verify(m);
 
 			dma_addr = rte_mbuf_data_iova_default(m);
 			if (rxq->flags & SFC_EF100_RXQ_NIC_DMA_MAP) {
@@ -541,7 +541,7 @@ sfc_ef100_rx_process_ready_pkts(struct sfc_ef100_rxq *rxq,
 		rxq->ready_pkts--;
 
 		pkt = sfc_ef100_rx_next_mbuf(rxq);
-		__rte_mbuf_raw_sanity_check(pkt);
+		__rte_mbuf_raw_verify(pkt);
 
 		RTE_BUILD_BUG_ON(sizeof(pkt->rearm_data[0]) !=
 				 sizeof(rxq->rearm_data));
@@ -565,7 +565,7 @@ sfc_ef100_rx_process_ready_pkts(struct sfc_ef100_rxq *rxq,
 			struct rte_mbuf *seg;
 
 			seg = sfc_ef100_rx_next_mbuf(rxq);
-			__rte_mbuf_raw_sanity_check(seg);
+			__rte_mbuf_raw_verify(seg);
 
 			seg->data_off = RTE_PKTMBUF_HEADROOM;
 
drivers/net/sfc/sfc_ef10_essb_rx.c +2 -2
index 78bd430363b1..74647e2792b1 100644
@@ -125,7 +125,7 @@ sfc_ef10_essb_next_mbuf(const struct sfc_ef10_essb_rxq *rxq,
 	struct rte_mbuf *m;
 
 	m = (struct rte_mbuf *)((uintptr_t)mbuf + rxq->buf_stride);
-	__rte_mbuf_raw_sanity_check(m);
+	__rte_mbuf_raw_verify(m);
 	return m;
 }
 
@@ -136,7 +136,7 @@ sfc_ef10_essb_mbuf_by_index(const struct sfc_ef10_essb_rxq *rxq,
 	struct rte_mbuf *m;
 
 	m = (struct rte_mbuf *)((uintptr_t)mbuf + idx * rxq->buf_stride);
-	__rte_mbuf_raw_sanity_check(m);
+	__rte_mbuf_raw_verify(m);
 	return m;
 }
 
drivers/net/sfc/sfc_ef10_rx.c +2 -2
index 7be224c9c412..0fdd0d84c17c 100644
@@ -148,7 +148,7 @@ sfc_ef10_rx_qrefill(struct sfc_ef10_rxq *rxq)
 			struct sfc_ef10_rx_sw_desc *rxd;
 			rte_iova_t phys_addr;
 
-			__rte_mbuf_raw_sanity_check(m);
+			__rte_mbuf_raw_verify(m);
 
 			SFC_ASSERT((id & ~ptr_mask) == 0);
 			rxd = &rxq->sw_ring[id];
@@ -297,7 +297,7 @@ sfc_ef10_rx_process_event(struct sfc_ef10_rxq *rxq, efx_qword_t rx_ev,
 		rxd = &rxq->sw_ring[pending++ & ptr_mask];
 		m = rxd->mbuf;
 
-		__rte_mbuf_raw_sanity_check(m);
+		__rte_mbuf_raw_verify(m);
 
 		m->data_off = RTE_PKTMBUF_HEADROOM;
 		rte_pktmbuf_data_len(m) = seg_len;
drivers/net/sfc/sfc_rx.c +1 -1
index 5ea98187c3b4..5d5df52b269a 100644
@@ -120,7 +120,7 @@ sfc_efx_rx_qrefill(struct sfc_efx_rxq *rxq)
 		     ++i, id = (id + 1) & rxq->ptr_mask) {
 			m = objs[i];
 
-			__rte_mbuf_raw_sanity_check(m);
+			__rte_mbuf_raw_verify(m);
 
 			rxd = &rxq->sw_desc[id];
 			rxd->mbuf = m;
examples/ipv4_multicast/main.c +1 -1
index 6d0a8501eff5..f39658f4e249 100644
@@ -258,7 +258,7 @@ mcast_out_pkt(struct rte_mbuf *pkt, int use_clone)
 	hdr->pkt_len = (uint16_t)(hdr->data_len + pkt->pkt_len);
 	hdr->nb_segs = pkt->nb_segs + 1;
 
-	__rte_mbuf_sanity_check(hdr, 1);
+	__rte_mbuf_verify(hdr, 1);
 	return hdr;
 }
 /* >8 End of mcast_out_kt. */
lib/mbuf/rte_mbuf.c +15 -8
index 686e797c80c4..56fb6c846df6 100644
@@ -363,9 +363,9 @@ rte_pktmbuf_pool_create_extbuf(const char *name, unsigned int n,
 	return mp;
 }
 
-/* do some sanity checks on a mbuf: panic if it fails */
+/* do some checks on a mbuf: panic if it fails */
 void
-rte_mbuf_sanity_check(const struct rte_mbuf *m, int is_header)
+rte_mbuf_verify(const struct rte_mbuf *m, int is_header)
 {
 	const char *reason;
 
@@ -373,6 +373,13 @@ rte_mbuf_sanity_check(const struct rte_mbuf *m, int is_header)
 		rte_panic("%s\n", reason);
 }
 
+/* For ABI compatabilty, to be removed in next release */
+void
+rte_mbuf_sanity_check(const struct rte_mbuf *m, int is_header)
+{
+	rte_mbuf_verify(m, is_header);
+}
+
 int rte_mbuf_check(const struct rte_mbuf *m, int is_header,
 		   const char **reason)
 {
@@ -492,7 +499,7 @@ void rte_pktmbuf_free_bulk(struct rte_mbuf **mbufs, unsigned int count)
 		if (unlikely(m == NULL))
 			continue;
 
-		__rte_mbuf_sanity_check(m, 1);
+		__rte_mbuf_verify(m, 1);
 
 		do {
 			m_next = m->next;
@@ -542,7 +549,7 @@ rte_pktmbuf_clone(struct rte_mbuf *md, struct rte_mempool *mp)
 		return NULL;
 	}
 
-	__rte_mbuf_sanity_check(mc, 1);
+	__rte_mbuf_verify(mc, 1);
 	return mc;
 }
 
@@ -592,7 +599,7 @@ rte_pktmbuf_copy(const struct rte_mbuf *m, struct rte_mempool *mp,
 	struct rte_mbuf *mc, *m_last, **prev;
 
 	/* garbage in check */
-	__rte_mbuf_sanity_check(m, 1);
+	__rte_mbuf_verify(m, 1);
 
 	/* check for request to copy at offset past end of mbuf */
 	if (unlikely(off >= m->pkt_len))
@@ -656,7 +663,7 @@ rte_pktmbuf_copy(const struct rte_mbuf *m, struct rte_mempool *mp,
 	}
 
 	/* garbage out check */
-	__rte_mbuf_sanity_check(mc, 1);
+	__rte_mbuf_verify(mc, 1);
 	return mc;
 }
 
@@ -667,7 +674,7 @@ rte_pktmbuf_dump(FILE *f, const struct rte_mbuf *m, unsigned dump_len)
 	unsigned int len;
 	unsigned int nb_segs;
 
-	__rte_mbuf_sanity_check(m, 1);
+	__rte_mbuf_verify(m, 1);
 
 	fprintf(f, "dump mbuf at %p, iova=%#" PRIx64 ", buf_len=%u\n", m, rte_mbuf_iova_get(m),
 		m->buf_len);
@@ -685,7 +692,7 @@ rte_pktmbuf_dump(FILE *f, const struct rte_mbuf *m, unsigned dump_len)
 	nb_segs = m->nb_segs;
 
 	while (m && nb_segs != 0) {
-		__rte_mbuf_sanity_check(m, 0);
+		__rte_mbuf_verify(m, 0);
 
 		fprintf(f, "  segment at %p, data=%p, len=%u, off=%u, refcnt=%u\n",
 			m, rte_pktmbuf_mtod(m, void *),
lib/mbuf/rte_mbuf.h +37 -34

224 lines not on this page · raw message

lib/mbuf/version.map +1 -0
index ed486ed14ec7..f134946f3d8d 100644
@@ -31,6 +31,7 @@ DPDK_23 {
 	rte_mbuf_set_platform_mempool_ops;
 	rte_mbuf_set_user_mempool_ops;
 	rte_mbuf_user_mempool_ops;
+	rte_mbuf_verify;
 	rte_pktmbuf_clone;
 	rte_pktmbuf_copy;
 	rte_pktmbuf_dump;
Signature · 1 line
2.39.2
Acked-by on v3 1/19
#52 lore raw

RE: [PATCH v3 01/19] mbuf: replace term sanity check

Quoted 10 lines

From: Stephen Hemminger [mailto:[email protected]]
Sent: Friday, 19 May 2023 19.46

Replace rte_mbuf_sanity_check() with rte_mbuf_verify() to match the similar macro RTE_VERIFY() in rte_debug.h

The term sanity check is on the Tier 2 list of words that should be replaced.

#54 lore raw

PATCH v3 2/19 eal: replace use of sanity check in comments and messages

In reply to Stephen Hemminger

Sanity check is on the Tier 2 non-inclusive list.
Replace or remove it.

---
 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(-)
lib/eal/common/eal_common_memory.c +1 -1
index e21fc7cfaecc..f99c6b43c885 100644
@@ -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",
lib/eal/common/eal_common_proc.c +2 -1
index 1fc1d6c53bd2..972f3269d8ae 100644
@@ -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;
lib/eal/common/eal_common_trace.c +1 -1
index cb980af06d9f..cadb85b94fde 100644
@@ -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;
lib/eal/common/eal_memcfg.h +1 -1
index ea013a9daf17..dc7ef18dc11b 100644
@@ -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. */
 
lib/eal/common/rte_malloc.c +1 -1
index ebafef3f6cf2..e632c395132c 100644
@@ -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);
lib/eal/freebsd/eal.c +1 -1
index 7daf22e31449..d3499dd5906d 100644
@@ -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;
lib/eal/linux/eal.c +1 -1
index ae323cd492d4..251aa533b274 100644
@@ -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;
lib/eal/windows/eal.c +1 -1
index 033825c14c67..17a5f9d1ba30 100644
@@ -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;
Signature · 1 line
2.39.2
#55 lore raw

PATCH v3 3/19 test: replace use word sanity

In reply to Stephen Hemminger

The word "sanity" is on the not-allowed inclusive naming list. Replace the unnecessary usage in tests.

---
 app/test/test_bitmap.c             |  4 +--
 app/test/test_bpf.c                |  6 ++--
 app/test/test_common.c             |  2 +-
 app/test/test_distributor.c        | 46 +++++++++++++++---------------
 app/test/test_dmadev.c             |  2 +-
 app/test/test_eal_flags.c          | 20 ++++++-------
 app/test/test_hash.c               |  2 +-
 app/test/test_interrupts.c         |  9 +++---
 app/test/test_link_bonding_mode4.c |  2 +-
 app/test/test_mbuf.c               |  2 +-
 app/test/test_rawdev.c             |  2 +-
 app/test/test_timer.c              | 10 +++----
 12 files changed, 54 insertions(+), 53 deletions(-)
app/test/test_bitmap.c +2 -2
index e9c61590aef7..8cb5d0954a2b 100644
@@ -33,7 +33,7 @@ test_bitmap_scan_operations(struct rte_bitmap *bmp)
 	}
 
 	if (slab1_magic != out_slab) {
-		printf("Scan operation sanity failed.\n");
+		printf("Scan operation magic number check failed.\n");
 		return TEST_FAILED;
 	}
 
@@ -43,7 +43,7 @@ test_bitmap_scan_operations(struct rte_bitmap *bmp)
 	}
 
 	if (slab2_magic != out_slab) {
-		printf("Scan operation sanity failed.\n");
+		printf("Scan operation magic number check failed.\n");
 		return TEST_FAILED;
 	}
 
app/test/test_bpf.c +3 -3
index f5af5e8a3f4a..347b672ac211 100644
@@ -3329,9 +3329,9 @@ test_bpf_match(pcap_t *pcap, const char *str,
 	return ret;
 }
 
-/* Basic sanity test can we match a IP packet */
+/* Basic test can we match a IP packet */
 static int
-test_bpf_filter_sanity(pcap_t *pcap)
+test_bpf_filter_match(pcap_t *pcap)
 {
 	const uint32_t plen = 100;
 	struct rte_mbuf mb, *m;
@@ -3463,7 +3463,7 @@ test_bpf_convert(void)
 		return -1;
 	}
 
-	rc = test_bpf_filter_sanity(pcap);
+	rc = test_bpf_filter_match(pcap);
 	for (i = 0; i < RTE_DIM(sample_filters); i++)
 		rc |= test_bpf_filter(pcap, sample_filters[i]);
 
app/test/test_common.c +1 -1
index f89e1eb7ee0d..c7ce8ea32a77 100644
@@ -18,7 +18,7 @@
 	{printf(x "() test failed!\n");\
 	return -1;}
 
-/* this is really a sanity check */
+/* this is really a consistency check */
 static int
 test_macros(int __rte_unused unused_parm)
 {
app/test/test_distributor.c +23 -23

177 lines not on this page · raw message

app/test/test_dmadev.c +1 -1
index 0736ff2a1867..b54319f763f4 100644
@@ -927,7 +927,7 @@ test_dma(void)
 {
 	int i;
 
-	/* basic sanity on dmadev infrastructure */
+	/* basic validation on dmadev infrastructure */
 	if (test_apis() < 0)
 		ERR_RETURN("Error performing API tests\n");
 
app/test/test_eal_flags.c +10 -10
index d2b91e20750e..edbe1be50096 100644
@@ -314,7 +314,7 @@ get_number_of_sockets(void)
 
 /*
  * Test that the app doesn't run with invalid allow option.
- * Final tests ensures it does run with valid options as sanity check (one
+ * Final tests ensures it does run with valid options as basic test (one
  * test for with Domain+BDF, second for just with BDF)
  */
 static int
@@ -382,7 +382,7 @@ test_allow_flag(void)
 
 /*
  * Test that the app doesn't run with invalid blocklist option.
- * Final test ensures it does run with valid options as sanity check
+ * Final test ensures it does run with valid options as basic check.
  */
 static int
 test_invalid_b_flag(void)
@@ -429,7 +429,7 @@ test_invalid_b_flag(void)
 
 /*
  *  Test that the app doesn't run with invalid vdev option.
- *  Final test ensures it does run with valid options as sanity check
+ *  Final test ensures it does run with valid options basic check.
  */
 static int
 test_invalid_vdev_flag(void)
@@ -554,7 +554,7 @@ test_missing_c_flag(void)
 	/* bad coremask value */
 	const char *argv3[] = { prgname, prefix, mp_flag,
 				"-c", "error" };
-	/* sanity check of tests - valid coremask value */
+	/* check of tests - valid coremask value */
 	const char *argv4[] = { prgname, prefix, mp_flag,
 				"-c", "1" };
 	/* -l flag but no corelist value */
@@ -581,7 +581,7 @@ test_missing_c_flag(void)
 				"-l", RTE_STR(RTE_MAX_LCORE) };
 	const char * const argv14[] = { prgname, prefix, mp_flag,
 				"-l", "1-"RTE_STR(RTE_MAX_LCORE) };
-	/* sanity check test - valid corelist value */
+	/* check test - valid corelist value */
 	const char * const argv15[] = { prgname, prefix, mp_flag,
 				 "-l", "1-2,3" };
 
@@ -613,7 +613,7 @@ test_missing_c_flag(void)
 				 "--lcores", "(4-7)=(1,3)" };
 	const char * const argv28[] = { prgname, prefix, mp_flag,
 				 "--lcores", "[4-7]@(1,3)" };
-	/* sanity check of tests - valid lcores value */
+	/* more complex valid lcores value */
 	const char * const argv29[] = { prgname, prefix, mp_flag,
 				 "--lcores",
 				 "0-1,2@(5-7),(3-5)@(0,2),(0,6),7"};
@@ -744,7 +744,7 @@ test_main_lcore_flag(void)
 
 /*
  * Test that the app doesn't run with invalid -n flag option.
- * Final test ensures it does run with valid options as sanity check
+ * Final test ensures it does run with valid options as basic check.
  * Since -n is not compulsory for MP, we instead use --no-huge and --no-shconf
  * flags.
  */
@@ -772,10 +772,10 @@ test_invalid_n_flag(void)
 	/* zero is invalid */
 	const char *argv3[] = { prgname, prefix, no_huge, no_shconf,
 				"-n", "0" };
-	/* sanity test - check with good value */
+	/* check with good value */
 	const char *argv4[] = { prgname, prefix, no_huge, no_shconf,
 				"-n", "2" };
-	/* sanity test - check with no -n flag */
+	/* check with no -n flag */
 	const char *argv5[] = { prgname, prefix, no_huge, no_shconf};
 
 	if (launch_proc(argv1) == 0
@@ -977,7 +977,7 @@ test_misc_flags(void)
 	 * All cases, apart from the first, app should run.
 	 * No further testing of output done.
 	 */
-	/* sanity check - failure with invalid option */
+	/* failure with invalid option */
 	const char *argv0[] = {prgname, prefix, mp_flag, "--invalid-opt"};
 
 	/* With --no-pci */
app/test/test_hash.c +1 -1
index 3e45afaa67fc..f521ce7f679a 100644
@@ -1088,7 +1088,7 @@ fbk_hash_unit_test(void)
 		.socket_id = 0,
 	};
 
-	/* this is a sanity check for "same name" test
+	/* this is a check for "same name" test
 	 * creating this hash will check if we are actually able to create
 	 * multiple hashes with different names (instead of having just one).
 	 */
app/test/test_interrupts.c +5 -4
index b59ab426999c..88105b78a455 100644
@@ -48,7 +48,7 @@ static union intr_pipefds pfds;
  * Check if the interrupt handle is valid.
  */
 static inline int
-test_interrupt_handle_sanity_check(struct rte_intr_handle *intr_handle)
+test_interrupt_handle_check(struct rte_intr_handle *intr_handle)
 {
 	if (!intr_handle || rte_intr_fd_get(intr_handle) < 0)
 		return -1;
@@ -164,7 +164,7 @@ test_interrupt_handle_compare(struct rte_intr_handle *intr_handle_l,
 #else
 /* to be implemented for bsd later */
 static inline int
-test_interrupt_handle_sanity_check(struct rte_intr_handle *intr_handle)
+test_interrupt_handle_check(struct rte_intr_handle *intr_handle)
 {
 	RTE_SET_USED(intr_handle);
 
@@ -215,7 +215,7 @@ test_interrupt_callback(void *arg)
 		return;
 	}
 
-	if (test_interrupt_handle_sanity_check(intr_handle) < 0) {
+	if (test_interrupt_handle_check(intr_handle) < 0) {
 		printf("null or invalid intr_handle for %s\n", __func__);
 		flag = -1;
 		return;
@@ -241,7 +241,8 @@ static void
 test_interrupt_callback_1(void *arg)
 {
 	struct rte_intr_handle *intr_handle = arg;
-	if (test_interrupt_handle_sanity_check(intr_handle) < 0) {
+
+	if (test_interrupt_handle_check(intr_handle) < 0) {
 		printf("null or invalid intr_handle for %s\n", __func__);
 		flag = -1;
 		return;
app/test/test_link_bonding_mode4.c +1 -1
index 21c512c94b89..95dd52848fb9 100644
@@ -224,7 +224,7 @@ add_slave(struct slave_conf *slave, uint8_t start)
 	struct rte_ether_addr addr, addr_check;
 	int retval;
 
-	/* Some sanity check */
+	/* Some basic tests. */
 	RTE_VERIFY(test_params.slave_ports <= slave &&
 		slave - test_params.slave_ports < (int)RTE_DIM(test_params.slave_ports));
 	RTE_VERIFY(slave->bonded == 0);
app/test/test_mbuf.c +1 -1
index c2716dc4e5fe..7c86323be772 100644
@@ -1723,7 +1723,7 @@ test_mbuf_validate_tx_offload(const char *test_name,
 	struct rte_mbuf *m = NULL;
 	int ret = 0;
 
-	/* alloc a mbuf and do sanity check */
+	/* alloc a mbuf and do some basic checks */
 	m = rte_pktmbuf_alloc(pktmbuf_pool);
 	if (m == NULL)
 		GOTO_FAIL("%s: mbuf allocation failed!\n", __func__);
app/test/test_rawdev.c +1 -1
index 3c780e3f9e96..c807bf90d9c3 100644
@@ -47,7 +47,7 @@ test_rawdev_selftests(void)
 	int ret = 0;
 	int i;
 
-	/* basic sanity on rawdev infrastructure */
+	/* basic check on rawdev infrastructure */
 	if (test_rawdev_selftest_skeleton() < 0)
 		return -1;
 
app/test/test_timer.c +5 -5
index 0c36dc9010b0..6615ce536443 100644
@@ -491,11 +491,11 @@ timer_basic_main_loop(__rte_unused void *arg)
 }
 
 static int
-timer_sanity_check(void)
+timer_check(void)
 {
 #ifdef RTE_LIBEAL_USE_HPET
 	if (eal_timer_source != EAL_TIMER_HPET) {
-		printf("Not using HPET, can't sanity check timer sources\n");
+		printf("Not using HPET, can't check timer sources\n");
 		return 0;
 	}
 
@@ -539,9 +539,9 @@ test_timer(void)
 		return TEST_SKIPPED;
 	}
 
-	/* sanity check our timer sources and timer config values */
-	if (timer_sanity_check() < 0) {
-		printf("Timer sanity checks failed\n");
+	/* check our timer sources and timer config values */
+	if (timer_check() < 0) {
+		printf("Timer checks failed\n");
 		return TEST_FAILED;
 	}
 
Signature · 1 line
2.39.2
#56 lore raw

PATCH v3 4/19 examples: remove term sanity

In reply to Stephen Hemminger

Do not use non-inclusive terms.

---
 examples/ipsec-secgw/event_helper.c | 2 +-
 examples/qos_sched/args.c           | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
examples/ipsec-secgw/event_helper.c +1 -1
index 89fb7e62a5a3..f595b4fe01dc 100644
@@ -2100,7 +2100,7 @@ eh_launch_worker(struct eh_conf *conf, struct eh_app_worker_params *app_wrkr,
 		goto clean_and_exit;
 	}
 
-	/* Verify sanity of the matched worker */
+	/* Verify validity of the matched worker */
 	if (eh_verify_match_worker(match_wrkr) != 1) {
 		EH_LOG_ERR("Failed to validate the matched worker");
 		goto clean_and_exit;
examples/qos_sched/args.c +1 -1
index e97273152aa7..1d8ba9522586 100644
@@ -384,7 +384,7 @@ app_parse_args(int argc, char **argv)
 		return -1;
 	}
 
-	/* sanity check for cores assignment */
+	/* check for cores assignment */
 	for(i = 0; i < nb_pfc; i++) {
 		if (qos_conf[i].rx_core >= RTE_MAX_LCORE) {
 			RTE_LOG(ERR, APP, "pfc %u: invalid RX lcore index %u\n", i + 1,
Signature · 1 line
2.39.2
#57 lore raw

PATCH v3 5/19 lib: replace use of sanity check in comments and messages

In reply to Stephen Hemminger

Sanity check is on the Tier 2 non-inclusive list.
Replace or remove it.

---
 lib/graph/graph.c           | 2 +-
 lib/graph/graph_stats.c     | 2 +-
 lib/graph/node.c            | 2 +-
 lib/jobstats/rte_jobstats.c | 6 +++---
 lib/metrics/rte_metrics.c   | 2 +-
 lib/pcapng/rte_pcapng.c     | 2 +-
 6 files changed, 8 insertions(+), 8 deletions(-)
lib/graph/graph.c +1 -1
index 5582631b5301..597e9e7aa28e 100644
@@ -283,7 +283,7 @@ rte_graph_create(const char *name, struct rte_graph_param *prm)
 
 	graph_spinlock_lock();
 
-	/* Check arguments sanity */
+	/* Check argument validity */
 	if (prm == NULL)
 		SET_ERR_JMP(EINVAL, fail, "Param should not be NULL");
 
lib/graph/graph_stats.c +1 -1
index c0140ba92212..28d5728e5e61 100644
@@ -271,7 +271,7 @@ rte_graph_cluster_stats_create(const struct rte_graph_cluster_stats_param *prm)
 	const char *pattern;
 	rte_graph_t i;
 
-	/* Sanity checks */
+	/* Validate arguments */
 	if (!rte_graph_has_stats_feature())
 		SET_ERR_JMP(EINVAL, fail, "Stats feature is not enabled");
 
lib/graph/node.c +1 -1
index 149414dcd94c..3f0ae0c395db 100644
@@ -68,7 +68,7 @@ __rte_node_register(const struct rte_node_register *reg)
 
 	graph_spinlock_lock();
 
-	/* Check sanity */
+	/* Check argument validity */
 	if (reg == NULL || reg->process == NULL) {
 		rte_errno = EINVAL;
 		goto fail;
lib/jobstats/rte_jobstats.c +3 -3
index af565a14eaf3..1c4b280c952a 100644
@@ -124,7 +124,7 @@ rte_jobstats_start(struct rte_jobstats_context *ctx, struct rte_jobstats *job)
 {
 	uint64_t now;
 
-	/* Some sanity check. */
+	/* Check validity of arguments. */
 	if (unlikely(ctx == NULL || job == NULL || job->context != NULL))
 		return -EINVAL;
 
@@ -144,7 +144,7 @@ rte_jobstats_abort(struct rte_jobstats *job)
 	struct rte_jobstats_context *ctx;
 	uint64_t now, exec_time;
 
-	/* Some sanity check. */
+	/* Check that arguments are valid */
 	if (unlikely(job == NULL || job->context == NULL))
 		return -EINVAL;
 
@@ -165,7 +165,7 @@ rte_jobstats_finish(struct rte_jobstats *job, int64_t job_value)
 	uint64_t now, exec_time;
 	int need_update;
 
-	/* Some sanity check. */
+	/* Check arguments */
 	if (unlikely(job == NULL || job->context == NULL))
 		return -EINVAL;
 
lib/metrics/rte_metrics.c +1 -1
index 0ccdbabc04eb..f60d4f3f6e25 100644
@@ -120,7 +120,7 @@ rte_metrics_reg_names(const char * const *names, uint16_t cnt_names)
 	uint16_t idx_name;
 	uint16_t idx_base;
 
-	/* Some sanity checks */
+	/* Some consistency checks */
 	if (cnt_names < 1 || names == NULL)
 		return -EINVAL;
 	for (idx_name = 0; idx_name < cnt_names; idx_name++)
lib/pcapng/rte_pcapng.c +1 -1
index 3c91fc77644a..fedf4b5b7f11 100644
@@ -669,7 +669,7 @@ rte_pcapng_write_packets(rte_pcapng_t *self,
 		struct rte_mbuf *m = pkts[i];
 		struct pcapng_enhance_packet_block *epb;
 
-		/* sanity check that is really a pcapng mbuf */
+		/* Check that is really a pcapng mbuf */
 		epb = rte_pktmbuf_mtod(m, struct pcapng_enhance_packet_block *);
 		if (unlikely(epb->block_type != PCAPNG_ENHANCED_PACKET_BLOCK ||
 			     epb->block_length != rte_pktmbuf_data_len(m))) {
Signature · 1 line
2.39.2
#58 lore raw

PATCH v3 6/19 doc/eventdev_pipeline: remove sanity

In reply to Stephen Hemminger

The word sanity check is unnecessary here.

---
 doc/guides/gpus/cuda.rst                       | 2 +-
 doc/guides/sample_app_ug/eventdev_pipeline.rst | 2 +-
 doc/guides/tools/testbbdev.rst                 | 8 ++++----
 3 files changed, 6 insertions(+), 6 deletions(-)
doc/guides/gpus/cuda.rst +1 -1
index 114e3bc8cb72..75f107095593 100644
@@ -81,7 +81,7 @@ Similarly to CUDA shared library, if the **libgdrapi.so** shared library
 is not installed in default locations (e.g. /usr/local/lib),
 you can use the variable ``GDRCOPY_PATH_L``.
 
-As an example, to enable the CPU map feature sanity check,
+As an example, to enable the CPU map feature check,
 run the ``app/test-gpudev`` application with:
 
 .. code-block:: console
doc/guides/sample_app_ug/eventdev_pipeline.rst +1 -1
index 19ff53803ede..e7787fb26609 100644
@@ -50,7 +50,7 @@ these settings is shown below:
     ./<build_dir>/examples/dpdk-eventdev_pipeline -l 0,2,8-15 --vdev event_sw0 \
     -- -r1 -t1 -e4 -w FF00 -s4 -n0 -c32 -W1000 -D
 
-The application has some sanity checking built-in, so if there is a function
+The application has some internal validation, so if there is a function
 (e.g.; the RX core) which doesn't have a cpu core mask assigned, the application
 will print an error message:
 
doc/guides/tools/testbbdev.rst +4 -4
index 54a9c44dc345..0a4af4ec9bec 100644
@@ -7,7 +7,7 @@ dpdk-test-bbdev Application
 The ``dpdk-test-bbdev`` tool is a Data Plane Development Kit (DPDK) utility that
 allows measuring performance parameters of PMDs available in the bbdev framework.
 Tests available for execution are: latency, throughput, validation,
-bler and sanity tests. Execution of tests can be customized using various
+bler and basic functionality. Execution of tests can be customized using various
 parameters passed to a python running script.
 
 
@@ -95,8 +95,8 @@ Test Cases
 
 There are 7 main test cases that can be executed using testbbdev tool:
 
-* Sanity checks [-c unittest]
-    - Performs sanity checks on BBDEV interface, validating basic functionality
+* Functional checks [-c unittest]
+    - Performs checks on BBDEV interface, validating basic functionality
 
 * Validation tests [-c validation]
     - Performs full operation of enqueue and dequeue
@@ -230,7 +230,7 @@ vector name refer more explicitly processing specificity such as
 is purely read/written for external DDR, lbrm when limited buffer
 rate matching is expected, or crc_fail when a CRC failure is expected.
 They are chosen to have a good coverage across sizes and processing
-parameters while still keeping their number limited as part of sanity
+parameters while still keeping their number limited as part of functional
 regression.
 
 Shortened tree of isg_cid-wireless_dpdk_ae with dpdk compiled and output
Signature · 1 line
2.39.2
#59 lore raw

PATCH v3 7/19 net/ring: replace use of sanity

In reply to Stephen Hemminger

Don't use term sanity check

---
 drivers/net/ring/rte_eth_ring.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/net/ring/rte_eth_ring.c +2 -5
index e8bc9b627102..e36742fda84f 100644
@@ -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 {
@@ -591,10 +591,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)
Signature · 1 line
2.39.2
#60 lore raw

PATCH v3 8/19 net/fm10k, net/ixgbe: remove word sanity

In reply to Stephen Hemminger

Remove non-inclusive term sanity from these Intel drivers.

---
 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 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
drivers/net/fm10k/fm10k_ethdev.c +1 -1
index 4d3c4c10cfa4..894cf8c8a6b5 100644
@@ -1757,7 +1757,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;
 
drivers/net/fm10k/fm10k_rxtx.c +1 -1
index c0841ab8cb34..94345299b22a 100644
@@ -647,7 +647,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;
drivers/net/ixgbe/ixgbe_fdir.c +1 -1
index 06d6e2126de5..51bbf577e3fe 100644
@@ -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.
drivers/net/ixgbe/ixgbe_ipsec.c +1 -1
index d3313085560d..d4aa3e9ede8e 100644
@@ -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;
drivers/net/ixgbe/ixgbe_rxtx.c +1 -1
index c9d6ca9efea4..72f89b1b51fd 100644
@@ -4907,7 +4907,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;
Signature · 1 line
2.39.2
#61 lore raw

PATCH v3 9/19 net/mlx[45]: remove word sanity

In reply to Stephen Hemminger

The term "sanity" is on non-inclusive naming list. Remove it from the Nvidia drivers.

---
 drivers/common/mlx5/linux/mlx5_common_os.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 +-
 7 files changed, 10 insertions(+), 12 deletions(-)
drivers/common/mlx5/linux/mlx5_common_os.c +1 -1
index aafff60eeb38..45fac9be0ae1 100644
@@ -234,7 +234,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]
drivers/net/mlx4/mlx4.c +1 -1
index a54016f4a235..e3048d5b6ec0 100644
@@ -1206,7 +1206,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]
drivers/net/mlx4/mlx4_flow.c +3 -3
index 8ef9fd2db44e..25b185d8710c 100644
@@ -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)
drivers/net/mlx5/mlx5_flow_dv.c +1 -1
index d14661298cf0..52a035588755 100644
@@ -8638,7 +8638,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
drivers/net/mlx5/mlx5_flow_hw.c +2 -4
index 853c94af9cfd..6e805d547c8a 100644
@@ -5576,11 +5576,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(__builtin_popcount(mask) >= __builtin_popcount(priv->vport_meta_mask));
 	return mask;
@@ -5592,12 +5591,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;
drivers/net/mlx5/mlx5_rxq.c +1 -1
index ad8fd13cbe8e..377618926a8d 100644
@@ -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.
 	 * CACHE_FLUSHTHRESH_MULTIPLIER is defined in a C file, so using a
 	 * constant number 2 instead.
drivers/net/mlx5/mlx5_rxtx_vec.h +1 -1
index 77c3f4efa019..f8376f2b55b4 100644
@@ -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) \
Signature · 1 line
2.39.2
#62 lore raw

PATCH v3 10/19 net/sfc: remove term "sanity check"

In reply to Stephen Hemminger

Remove term sanity check in comment.

---
 drivers/net/sfc/sfc_dp_rx.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/sfc/sfc_dp_rx.h +1 -1
index 246adbd87cde..c64db488f652 100644
@@ -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;
 
Signature · 1 line
2.39.2
#64 lore raw

PATCH v3 11/19 net/ark: replace use of term sanity

In reply to Stephen Hemminger

Do not use non inclusive terms.

---
 drivers/net/ark/ark_ethdev.c    | 8 ++++----
 drivers/net/ark/ark_ethdev_rx.c | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)
drivers/net/ark/ark_ethdev.c +4 -4
index b2995427c8ca..9cb1c5dea49e 100644
@@ -358,10 +358,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__);
@@ -380,7 +380,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__);
 
@@ -601,7 +601,7 @@ eth_ark_dev_start(struct rte_eth_dev *dev)
 		pthread_t thread;
 
 		/* Delay packet generatpr 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[32];
 		snprintf(tname, sizeof(tname), "ark-delay-pg-%d",
drivers/net/ark/ark_ethdev_rx.c +1 -1
index cbc0416bc2d2..e293d78db353 100644
@@ -275,7 +275,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)) {
Signature · 1 line
2.39.2
#65 lore raw

PATCH v3 12/19 net/bnxt: replace use of term sanity

In reply to Stephen Hemminger

Do not use non-inclusive terms.

---
 drivers/net/bnxt/bnxt_hwrm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/bnxt/bnxt_hwrm.c +1 -1
index 51e1e2d6b39b..5370293fed8d 100644
@@ -262,7 +262,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 */
Signature · 1 line
2.39.2
#66 lore raw

PATCH v3 13/19 net/bnx2x: remove reference to sanity

In reply to Stephen Hemminger

Replace "sanity check"

---
 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 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)
drivers/net/bnx2x/bnx2x.c +1 -1
index 29c16bb207c7..0d2dc2d3b3fa 100644
@@ -7821,7 +7821,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,
drivers/net/bnx2x/bnx2x_stats.c +4 -4
index c07b01510a06..86d90679ac0a 100644
@@ -187,7 +187,7 @@ bnx2x_stats_pmf_update(struct bnx2x_softc *sc)
 		 */
 		return;
 	}
-	/* sanity */
+	/* input valid? */
 	if (!sc->port.pmf || !sc->port.port_stx) {
 		PMD_DRV_LOG(ERR, sc, "BUG!");
 		return;
@@ -237,7 +237,7 @@ bnx2x_port_stats_init(struct bnx2x_softc *sc)
     uint32_t mac_addr;
     uint32_t *stats_comp = BNX2X_SP(sc, stats_comp);
 
-    /* sanity */
+    /* input valid? */
     if (!sc->link_vars.link_up || !sc->port.pmf) {
 	PMD_DRV_LOG(ERR, sc, "BUG!");
 	return;
@@ -461,7 +461,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 valid? */
     if (!sc->func_stx) {
 	PMD_DRV_LOG(ERR, sc, "BUG!");
 	return;
@@ -1301,7 +1301,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 valid? */
     if (!sc->port.pmf || !sc->port.port_stx) {
 	PMD_DRV_LOG(ERR, sc, "BUG!");
 	return;
drivers/net/bnx2x/ecore_sp.c +1 -1
index c6c3857778f7..158205266f62 100644
@@ -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;
 
drivers/net/bnx2x/elink.c +2 -2
index 43fbf04ece11..2b0236aac24e 100644
@@ -1087,7 +1087,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;
@@ -1104,7 +1104,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;
Signature · 1 line
2.39.2
#67 lore raw

PATCH v3 14/19 cnxk: replace term sanity

In reply to Stephen Hemminger

Do not use non-inclusive naming.

---
 drivers/common/cnxk/roc_nix_tm_ops.c | 2 +-
 drivers/common/cnxk/roc_npa.c        | 4 ++--
 drivers/net/cnxk/cnxk_ethdev.c       | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)
drivers/common/cnxk/roc_nix_tm_ops.c +1 -1
index 4e88ad1beb71..d837e2247634 100644
@@ -527,7 +527,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)
drivers/common/cnxk/roc_npa.c +2 -2
index 20637fbf657c..08e193e6118c 100644
@@ -341,7 +341,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;
@@ -769,7 +769,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;
 
drivers/net/cnxk/cnxk_ethdev.c +2 -2
index 1cae3084e184..8fdc3d5a9a96 100644
@@ -633,7 +633,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;
@@ -1195,7 +1195,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;
Signature · 1 line
2.39.2
#68 lore raw

PATCH v3 15/19 event/opdl: remove term sanity

In reply to Stephen Hemminger

Don't use non-inclusive term.

---
 drivers/event/opdl/opdl_evdev.c      | 2 +-
 drivers/event/opdl/opdl_evdev_init.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/event/opdl/opdl_evdev.c +1 -1
index 9ce8b39b6098..862f3fa9b27a 100644
@@ -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",
drivers/event/opdl/opdl_evdev_init.c +1 -1
index be3437fc2f40..12eb2695f5de 100644
@@ -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));
Signature · 1 line
2.39.2
#69 lore raw

PATCH v3 16/19 net/txgbe: replace term sanity

In reply to Stephen Hemminger

Don't use term sanity.

---
 drivers/net/txgbe/txgbe_ipsec.c | 2 +-
 drivers/net/txgbe/txgbe_rxtx.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/txgbe/txgbe_ipsec.c +1 -1
index f9f8108fb894..cadb0943c82d 100644
@@ -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;
drivers/net/txgbe/txgbe_rxtx.c +1 -1
index 427f8b82ac80..ef6478b8a5c8 100644
@@ -4115,7 +4115,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;
Signature · 1 line
2.39.2
#70 lore raw

PATCH v3 17/19 net/cxgbe: remove use of term sanity

In reply to Stephen Hemminger

Remove non-inclusive terminolgy.

---
 drivers/net/cxgbe/cxgbe_ethdev.c | 10 ++--------
 drivers/net/cxgbe/cxgbevf_main.c |  4 ++--
 2 files changed, 4 insertions(+), 10 deletions(-)
drivers/net/cxgbe/cxgbe_ethdev.c +2 -8
index 45bbeaef0ceb..2abb721afda1 100644
@@ -518,10 +518,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",
@@ -642,10 +639,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",
drivers/net/cxgbe/cxgbevf_main.c +2 -2
index d0c93f8ac3a5..dfb12b4ed5c9 100644
@@ -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"
Signature · 1 line
2.39.2
#71 lore raw

PATCH v3 18/19 crypto/bcmfs: replace term sanity check

In reply to Stephen Hemminger

Do not use non-inclusive naming here.

---
 drivers/crypto/bcmfs/hw/bcmfs4_rm.c | 6 +++---
 drivers/crypto/bcmfs/hw/bcmfs5_rm.c | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)
drivers/crypto/bcmfs/hw/bcmfs4_rm.c +3 -3
index 0ccb111898e4..50280fe14176 100644
@@ -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;
 	}
drivers/crypto/bcmfs/hw/bcmfs5_rm.c +3 -3
index c677c0cd9b52..c45eea82de20 100644
@@ -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;
 	}
Signature · 1 line
2.39.2
#72 lore raw

PATCH v3 19/19 Remove use of term sanity check

In reply to Stephen Hemminger

Replace non-inclusive language with better comments.

---
 drivers/bus/fslmc/qbman/qbman_sys_decl.h  | 2 +-
 drivers/common/dpaax/caamflib/desc.h      | 2 +-
 drivers/dma/idxd/idxd_pci.c               | 2 +-
 drivers/net/bonding/rte_eth_bond_8023ad.c | 2 +-
 drivers/net/mvpp2/mrvl_qos.c              | 2 +-
 drivers/net/qede/qede_rxtx.c              | 6 +++---
 6 files changed, 8 insertions(+), 8 deletions(-)
drivers/bus/fslmc/qbman/qbman_sys_decl.h +1 -1
index caaae417773c..2b6162d0ceaf 100644
@@ -9,7 +9,7 @@
 #include <compat.h>
 #include <fsl_qbman_base.h>
 
-/* Sanity check */
+/* Byte order check */
 #if (__BYTE_ORDER__ != __ORDER_BIG_ENDIAN__) && \
 	(__BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__)
 #error "Unknown endianness!"
drivers/common/dpaax/caamflib/desc.h +1 -1
index 635d6bad071f..feb6a5d7bb2d 100644
@@ -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)
drivers/dma/idxd/idxd_pci.c +1 -1
index 781fa02db3ca..a1e9b08940d9 100644
@@ -196,7 +196,7 @@ init_pci_device(struct rte_pci_device *dev, struct idxd_dmadev *idxd,
 	pci->portals = dev->mem_resource[2].addr;
 	pci->wq_cfg_sz = (pci->regs->wqcap >> 24) & 0x0F;
 
-	/* 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");
drivers/net/bonding/rte_eth_bond_8023ad.c +1 -1
index 4a266bb2caf1..56972f06c045 100644
@@ -1477,7 +1477,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 ||
drivers/net/mvpp2/mrvl_qos.c +1 -1
index f43217bc589c..db5052a9ab6f 100644
@@ -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;
drivers/net/qede/qede_rxtx.c +3 -3
index c35585f5fdd6..8b89841e03b1 100644
@@ -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 =
Signature · 1 line
2.39.2
Acked-by on the v3 series
#73 lore raw

Re: [PATCH v3 00/19] Replace use "sanity check"

In reply to Stephen Hemminger
Quoted 9 lines · Stephen Hemminger

This set of patches removes almost all use of the term sanity check. It does not address fixing the base driver code from vendors.

The term sanity-check and related formats are on the Inclusive Naming Tier 2 (Strongly Consider Replacing) word list.
https://inclusivenaming.org/word-lists/tier-2/sanity-check/

Quoted 110 lines

v3 - fix mbuf_raw_verify
add deprecation notice

Stephen Hemminger (19):
mbuf: replace term sanity check
eal: replace use of sanity check in comments and messages
test: replace use word sanity
examples: remove term sanity
lib: replace use of sanity check in comments and messages doc/eventdev_pipeline: remove sanity
net/ring: replace use of sanity
net/fm10k, net/ixgbe: remove word sanity net/mlx[45]: remove word sanity
net/sfc: remove term "sanity check"
net/ark: replace use of term sanity
net/bnxt: replace use of term sanity
net/bnx2x: remove reference to sanity
cnxk: replace term sanity
event/opdl: remove term sanity
net/txgbe: replace term sanity
net/cxgbe: remove use of term sanity crypto/bcmfs: replace term sanity check
Remove use of term sanity check

 app/test/test_bitmap.c                        |  4 +-
 app/test/test_bpf.c                           |  6 +-
 app/test/test_common.c                        |  2 +-
 app/test/test_distributor.c                   | 46 ++++++------
 app/test/test_dmadev.c                        |  2 +-
 app/test/test_eal_flags.c                     | 20 +++---
 app/test/test_hash.c                          |  2 +-
 app/test/test_interrupts.c                    |  9 +--
 app/test/test_link_bonding_mode4.c            |  2 +-
 app/test/test_mbuf.c                          | 32 ++++-----
 app/test/test_rawdev.c                        |  2 +-
 app/test/test_timer.c                         | 10 +--
 doc/guides/gpus/cuda.rst                      |  2 +-
 doc/guides/prog_guide/mbuf_lib.rst            |  4 +-
 doc/guides/rel_notes/deprecation.rst          |  3 +
 .../sample_app_ug/eventdev_pipeline.rst       |  2 +-
 doc/guides/tools/testbbdev.rst                |  8 +--
 drivers/bus/fslmc/qbman/qbman_sys_decl.h      |  2 +-
 drivers/common/cnxk/roc_nix_tm_ops.c          |  2 +-
 drivers/common/cnxk/roc_npa.c                 |  4 +-
 drivers/common/dpaax/caamflib/desc.h          |  2 +-
 drivers/common/mlx5/linux/mlx5_common_os.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/avp/avp_ethdev.c                  | 18 ++---
 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/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/qede/qede_rxtx.c                  |  6 +-
 drivers/net/ring/rte_eth_ring.c               |  7 +-
 drivers/net/sfc/sfc_dp_rx.h                   |  2 +-
 drivers/net/sfc/sfc_ef100_rx.c                |  6 +-
 drivers/net/sfc/sfc_ef10_essb_rx.c            |  4 +-
 drivers/net/sfc/sfc_ef10_rx.c                 |  4 +-
 drivers/net/sfc/sfc_rx.c                      |  2 +-
 drivers/net/txgbe/txgbe_ipsec.c               |  2 +-
 drivers/net/txgbe/txgbe_rxtx.c                |  2 +-
 examples/ipsec-secgw/event_helper.c           |  2 +-
 examples/ipv4_multicast/main.c                |  2 +-
 examples/qos_sched/args.c                     |  2 +-
 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 +-
 lib/graph/graph.c                             |  2 +-
 lib/graph/graph_stats.c                       |  2 +-
 lib/graph/node.c                              |  2 +-
 lib/jobstats/rte_jobstats.c                   |  6 +-
 lib/mbuf/rte_mbuf.c                           | 23 +++---
 lib/mbuf/rte_mbuf.h                           | 71 ++++++++++---------
 lib/mbuf/version.map                          |  1 +
 lib/metrics/rte_metrics.c                     |  2 +-
 lib/pcapng/rte_pcapng.c                       |  2 +-
 80 files changed, 229 insertions(+), 224 deletions(-)

--
2.39.2

#74 lore raw

v4 cover replace use of term "sanity check"

In reply to Stephen Hemminger

This set of patches removes almost all use of the term sanity check in DPDK. Did not address base drivers which come from vendors. It is up to them to fix that.

The term sanity-check and related formats are on the Inclusive Naming Tier 2 (Strongly Consider Replacing) word list.
https://inclusivenaming.org/word-lists/tier-2/sanity-check/

v4 - rebase for 23.11 and catch some new comments

Stephen Hemminger (19):
mbuf: replace term sanity check
eal: replace use of sanity check in comments and messages
test: replace use word sanity
examples: remove term sanity
lib: replace use of sanity check in comments and messages doc/eventdev_pipeline: remove sanity
net/ring: replace use of sanity
net/fm10k, net/ixgbe: remove word sanity net/mlx[45]: remove word sanity
net/sfc: remove term "sanity check"
net/ark: replace use of term sanity
net/bnxt: replace use of term sanity
net/bnx2x: remove reference to sanity
cnxk: replace term sanity
event/opdl: remove term sanity
net/txgbe: replace term sanity
net/cxgbe: remove use of term sanity crypto/bcmfs: replace term sanity check
drivers: remove use of term sanity check

 app/test/test_bitmap.c                        |  4 +-
 app/test/test_bpf.c                           |  6 +-
 app/test/test_common.c                        |  2 +-
 app/test/test_distributor.c                   | 46 ++++++------
 app/test/test_dmadev.c                        |  2 +-
 app/test/test_eal_flags.c                     | 20 +++---
 app/test/test_hash.c                          |  2 +-
 app/test/test_interrupts.c                    |  9 +--
 app/test/test_link_bonding_mode4.c            |  2 +-
 app/test/test_mbuf.c                          | 30 ++++----
 app/test/test_rawdev.c                        |  2 +-
 app/test/test_timer.c                         | 10 +--
 doc/guides/gpus/cuda.rst                      |  2 +-
 doc/guides/prog_guide/mbuf_lib.rst            |  4 +-
 doc/guides/rel_notes/deprecation.rst          |  3 +
 doc/guides/rel_notes/release_23_11.rst        |  4 ++
 .../sample_app_ug/eventdev_pipeline.rst       |  2 +-
 doc/guides/tools/testbbdev.rst                |  8 +--
 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/avp/avp_ethdev.c                  | 18 ++---
 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/nfp_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/sfc/sfc_ef100_rx.c                |  6 +-
 drivers/net/sfc/sfc_ef10_essb_rx.c            |  4 +-
 drivers/net/sfc/sfc_ef10_rx.c                 |  4 +-
 drivers/net/sfc/sfc_rx.c                      |  2 +-
 drivers/net/txgbe/txgbe_ipsec.c               |  2 +-
 drivers/net/txgbe/txgbe_rxtx.c                |  2 +-
 examples/ipsec-secgw/event_helper.c           |  2 +-
 examples/ipv4_multicast/main.c                |  2 +-
 examples/qos_sched/args.c                     |  2 +-
 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 +-
 lib/graph/graph.c                             |  2 +-
 lib/graph/graph_stats.c                       |  2 +-
 lib/graph/node.c                              |  2 +-
 lib/jobstats/rte_jobstats.c                   |  6 +-
 lib/mbuf/rte_mbuf.c                           | 23 +++---
 lib/mbuf/rte_mbuf.h                           | 71 ++++++++++---------
 lib/mbuf/version.map                          |  1 +
 lib/metrics/rte_metrics.c                     |  2 +-
 lib/pcapng/rte_pcapng.c                       |  2 +-
 85 files changed, 238 insertions(+), 229 deletions(-)
Signature · 1 line
2.39.2
#75 lore raw

PATCH v4 1/19 mbuf: replace term sanity check

Replace rte_mbuf_sanity_check() with rte_mbuf_verify() to match the similar macro RTE_VERIFY() in rte_debug.h

The term sanity check is on the Tier 2 list of words that should be replaced.

---
 app/test/test_mbuf.c                   | 28 +++++-----
 doc/guides/prog_guide/mbuf_lib.rst     |  4 +-
 doc/guides/rel_notes/deprecation.rst   |  3 ++
 doc/guides/rel_notes/release_23_11.rst |  4 ++
 drivers/net/avp/avp_ethdev.c           | 18 +++----
 drivers/net/sfc/sfc_ef100_rx.c         |  6 +--
 drivers/net/sfc/sfc_ef10_essb_rx.c     |  4 +-
 drivers/net/sfc/sfc_ef10_rx.c          |  4 +-
 drivers/net/sfc/sfc_rx.c               |  2 +-
 examples/ipv4_multicast/main.c         |  2 +-
 lib/mbuf/rte_mbuf.c                    | 23 ++++++---
 lib/mbuf/rte_mbuf.h                    | 71 ++++++++++++++------------
 lib/mbuf/version.map                   |  1 +
 13 files changed, 94 insertions(+), 76 deletions(-)
app/test/test_mbuf.c +14 -14
index efac01806bee..f3f5400e2eca 100644
@@ -261,8 +261,8 @@ test_one_pktmbuf(struct rte_mempool *pktmbuf_pool)
 		GOTO_FAIL("Buffer should be continuous");
 	memset(hdr, 0x55, MBUF_TEST_HDR2_LEN);
 
-	rte_mbuf_sanity_check(m, 1);
-	rte_mbuf_sanity_check(m, 0);
+	rte_mbuf_verify(m, 1);
+	rte_mbuf_verify(m, 0);
 	rte_pktmbuf_dump(stdout, m, 0);
 
 	/* this prepend should fail */
@@ -1161,7 +1161,7 @@ test_refcnt_mbuf(void)
 
 #ifdef RTE_EXEC_ENV_WINDOWS
 static int
-test_failing_mbuf_sanity_check(struct rte_mempool *pktmbuf_pool)
+test_failing_mbuf_verify(struct rte_mempool *pktmbuf_pool)
 {
 	RTE_SET_USED(pktmbuf_pool);
 	return TEST_SKIPPED;
@@ -1180,12 +1180,12 @@ mbuf_check_pass(struct rte_mbuf *buf)
 }
 
 static int
-test_failing_mbuf_sanity_check(struct rte_mempool *pktmbuf_pool)
+test_failing_mbuf_verify(struct rte_mempool *pktmbuf_pool)
 {
 	struct rte_mbuf *buf;
 	struct rte_mbuf badbuf;
 
-	printf("Checking rte_mbuf_sanity_check for failure conditions\n");
+	printf("Checking rte_mbuf_verify for failure conditions\n");
 
 	/* get a good mbuf to use to make copies */
 	buf = rte_pktmbuf_alloc(pktmbuf_pool);
@@ -1707,7 +1707,7 @@ test_mbuf_validate_tx_offload(const char *test_name,
 		GOTO_FAIL("%s: mbuf allocation failed!\n", __func__);
 	if (rte_pktmbuf_pkt_len(m) != 0)
 		GOTO_FAIL("%s: Bad packet length\n", __func__);
-	rte_mbuf_sanity_check(m, 0);
+	rte_mbuf_verify(m, 0);
 	m->ol_flags = ol_flags;
 	m->tso_segsz = segsize;
 	ret = rte_validate_tx_offload(m);
@@ -1914,7 +1914,7 @@ test_pktmbuf_read(struct rte_mempool *pktmbuf_pool)
 		GOTO_FAIL("%s: mbuf allocation failed!\n", __func__);
 	if (rte_pktmbuf_pkt_len(m) != 0)
 		GOTO_FAIL("%s: Bad packet length\n", __func__);
-	rte_mbuf_sanity_check(m, 0);
+	rte_mbuf_verify(m, 0);
 
 	data = rte_pktmbuf_append(m, MBUF_TEST_DATA_LEN2);
 	if (data == NULL)
@@ -1963,7 +1963,7 @@ test_pktmbuf_read_from_offset(struct rte_mempool *pktmbuf_pool)
 
 	if (rte_pktmbuf_pkt_len(m) != 0)
 		GOTO_FAIL("%s: Bad packet length\n", __func__);
-	rte_mbuf_sanity_check(m, 0);
+	rte_mbuf_verify(m, 0);
 
 	/* prepend an ethernet header */
 	hdr = (struct ether_hdr *)rte_pktmbuf_prepend(m, hdr_len);
@@ -2108,7 +2108,7 @@ create_packet(struct rte_mempool *pktmbuf_pool,
 			GOTO_FAIL("%s: mbuf allocation failed!\n", __func__);
 		if (rte_pktmbuf_pkt_len(pkt_seg) != 0)
 			GOTO_FAIL("%s: Bad packet length\n", __func__);
-		rte_mbuf_sanity_check(pkt_seg, 0);
+		rte_mbuf_verify(pkt_seg, 0);
 		/* Add header only for the first segment */
 		if (test_data->flags == MBUF_HEADER && seg == 0) {
 			hdr_len = sizeof(struct rte_ether_hdr);
@@ -2320,7 +2320,7 @@ test_pktmbuf_ext_shinfo_init_helper(struct rte_mempool *pktmbuf_pool)
 		GOTO_FAIL("%s: mbuf allocation failed!\n", __func__);
 	if (rte_pktmbuf_pkt_len(m) != 0)
 		GOTO_FAIL("%s: Bad packet length\n", __func__);
-	rte_mbuf_sanity_check(m, 0);
+	rte_mbuf_verify(m, 0);
 
 	ext_buf_addr = rte_malloc("External buffer", buf_len,
 			RTE_CACHE_LINE_SIZE);
@@ -2484,8 +2484,8 @@ test_pktmbuf_ext_pinned_buffer(struct rte_mempool *std_pool)
 		GOTO_FAIL("%s: test_pktmbuf_copy(pinned) failed\n",
 			  __func__);
 
-	if (test_failing_mbuf_sanity_check(pinned_pool) < 0)
-		GOTO_FAIL("%s: test_failing_mbuf_sanity_check(pinned)"
+	if (test_failing_mbuf_verify(pinned_pool) < 0)
+		GOTO_FAIL("%s: test_failing_mbuf_verify(pinned)"
 			  " failed\n", __func__);
 
 	if (test_mbuf_linearize_check(pinned_pool) < 0)
@@ -2859,8 +2859,8 @@ test_mbuf(void)
 		goto err;
 	}
 
-	if (test_failing_mbuf_sanity_check(pktmbuf_pool) < 0) {
-		printf("test_failing_mbuf_sanity_check() failed\n");
+	if (test_failing_mbuf_verify(pktmbuf_pool) < 0) {
+		printf("test_failing_mbuf_verify() failed\n");
 		goto err;
 	}
 
doc/guides/prog_guide/mbuf_lib.rst +2 -2
index 049357c75563..0accb51a98c7 100644
@@ -266,8 +266,8 @@ can be found in several of the sample applications, for example, the IPv4 Multic
 Debug
 -----
 
-In debug mode, the functions of the mbuf library perform sanity checks before any operation (such as, buffer corruption,
-bad type, and so on).
+In debug mode, the functions of the mbuf library perform consistency checks
+before any operation (such as, buffer corruption, bad type, and so on).
 
 Use Cases
 ---------
doc/guides/rel_notes/deprecation.rst +3 -0
index 494b401cda4b..1d8bbb0fd5f6 100644
@@ -220,3 +220,6 @@ Deprecation Notices
   will be deprecated and subsequently removed in DPDK 24.11 release.
   Before this, the new port library API (functions rte_swx_port_*)
   will gradually transition from experimental to stable status.
+
+* mbuf: The function ``rte_mbuf_sanity_check`` is deprecated in DPDK 23.11
+  release. The new function will be ``rte_mbuf_verify``.
doc/guides/rel_notes/release_23_11.rst +4 -0
index 6b4dd21fd0e1..8ff07c4a075f 100644
@@ -84,6 +84,10 @@ API Changes
    Also, make sure to start the actual text at the margin.
    =======================================================
 
+* mbuf: function ``rte_mbuf_sanity_check`` has been renamed to
+  ``rte_mbuf_verify``. The old function name is deprecated
+  and will be removed in DPDK 24.11.
+
 
 ABI Changes
 -----------
drivers/net/avp/avp_ethdev.c +9 -9
index b2a08f563542..b402c7a2ad16 100644
@@ -1231,7 +1231,7 @@ _avp_mac_filter(struct avp_dev *avp, struct rte_mbuf *m)
 
 #ifdef RTE_LIBRTE_AVP_DEBUG_BUFFERS
 static inline void
-__avp_dev_buffer_sanity_check(struct avp_dev *avp, struct rte_avp_desc *buf)
+__avp_dev_buffer_check(struct avp_dev *avp, struct rte_avp_desc *buf)
 {
 	struct rte_avp_desc *first_buf;
 	struct rte_avp_desc *pkt_buf;
@@ -1272,12 +1272,12 @@ __avp_dev_buffer_sanity_check(struct avp_dev *avp, struct rte_avp_desc *buf)
 			  first_buf->pkt_len, pkt_len);
 }
 
-#define avp_dev_buffer_sanity_check(a, b) \
-	__avp_dev_buffer_sanity_check((a), (b))
+#define avp_dev_buffer_check(a, b) \
+	__avp_dev_buffer_check((a), (b))
 
 #else /* RTE_LIBRTE_AVP_DEBUG_BUFFERS */
 
-#define avp_dev_buffer_sanity_check(a, b) do {} while (0)
+#define avp_dev_buffer_check(a, b) do {} while (0)
 
 #endif
 
@@ -1302,7 +1302,7 @@ avp_dev_copy_from_buffers(struct avp_dev *avp,
 	void *pkt_data;
 	unsigned int i;
 
-	avp_dev_buffer_sanity_check(avp, buf);
+	avp_dev_buffer_check(avp, buf);
 
 	/* setup the first source buffer */
 	pkt_buf = avp_dev_translate_buffer(avp, buf);
@@ -1370,7 +1370,7 @@ avp_dev_copy_from_buffers(struct avp_dev *avp,
 	rte_pktmbuf_pkt_len(m) = total_length;
 	m->vlan_tci = vlan_tci;
 
-	__rte_mbuf_sanity_check(m, 1);
+	__rte_mbuf_verify(m, 1);
 
 	return m;
 }
@@ -1614,7 +1614,7 @@ avp_dev_copy_to_buffers(struct avp_dev *avp,
 	char *pkt_data;
 	unsigned int i;
 
-	__rte_mbuf_sanity_check(mbuf, 1);
+	__rte_mbuf_verify(mbuf, 1);
 
 	m = mbuf;
 	src_offset = 0;
@@ -1680,7 +1680,7 @@ avp_dev_copy_to_buffers(struct avp_dev *avp,
 		first_buf->vlan_tci = mbuf->vlan_tci;
 	}
 
-	avp_dev_buffer_sanity_check(avp, buffers[0]);
+	avp_dev_buffer_check(avp, buffers[0]);
 
 	return total_length;
 }
@@ -1798,7 +1798,7 @@ avp_xmit_scattered_pkts(void *tx_queue,
 
 #ifdef RTE_LIBRTE_AVP_DEBUG_BUFFERS
 	for (i = 0; i < nb_pkts; i++)
-		avp_dev_buffer_sanity_check(avp, tx_bufs[i]);
+		avp_dev_buffer_check(avp, tx_bufs[i]);
 #endif
 
 	/* send the packets */
drivers/net/sfc/sfc_ef100_rx.c +3 -3
index 2677003da326..8199b56f2740 100644
@@ -179,7 +179,7 @@ sfc_ef100_rx_qrefill(struct sfc_ef100_rxq *rxq)
 			struct sfc_ef100_rx_sw_desc *rxd;
 			rte_iova_t dma_addr;
 
-			__rte_mbuf_raw_sanity_check(m);
+			__rte_mbuf_raw_verify(m);
 
 			dma_addr = rte_mbuf_data_iova_default(m);
 			if (rxq->flags & SFC_EF100_RXQ_NIC_DMA_MAP) {
@@ -551,7 +551,7 @@ sfc_ef100_rx_process_ready_pkts(struct sfc_ef100_rxq *rxq,
 		rxq->ready_pkts--;
 
 		pkt = sfc_ef100_rx_next_mbuf(rxq);
-		__rte_mbuf_raw_sanity_check(pkt);
+		__rte_mbuf_raw_verify(pkt);
 
 		RTE_BUILD_BUG_ON(sizeof(pkt->rearm_data[0]) !=
 				 sizeof(rxq->rearm_data));
@@ -575,7 +575,7 @@ sfc_ef100_rx_process_ready_pkts(struct sfc_ef100_rxq *rxq,
 			struct rte_mbuf *seg;
 
 			seg = sfc_ef100_rx_next_mbuf(rxq);
-			__rte_mbuf_raw_sanity_check(seg);
+			__rte_mbuf_raw_verify(seg);
 
 			seg->data_off = RTE_PKTMBUF_HEADROOM;
 
drivers/net/sfc/sfc_ef10_essb_rx.c +2 -2
index 78bd430363b1..74647e2792b1 100644
@@ -125,7 +125,7 @@ sfc_ef10_essb_next_mbuf(const struct sfc_ef10_essb_rxq *rxq,
 	struct rte_mbuf *m;
 
 	m = (struct rte_mbuf *)((uintptr_t)mbuf + rxq->buf_stride);
-	__rte_mbuf_raw_sanity_check(m);
+	__rte_mbuf_raw_verify(m);
 	return m;
 }
 
@@ -136,7 +136,7 @@ sfc_ef10_essb_mbuf_by_index(const struct sfc_ef10_essb_rxq *rxq,
 	struct rte_mbuf *m;
 
 	m = (struct rte_mbuf *)((uintptr_t)mbuf + idx * rxq->buf_stride);
-	__rte_mbuf_raw_sanity_check(m);
+	__rte_mbuf_raw_verify(m);
 	return m;
 }
 
drivers/net/sfc/sfc_ef10_rx.c +2 -2
index 30a320d0791c..72b03b3bba7a 100644
@@ -148,7 +148,7 @@ sfc_ef10_rx_qrefill(struct sfc_ef10_rxq *rxq)
 			struct sfc_ef10_rx_sw_desc *rxd;
 			rte_iova_t phys_addr;
 
-			__rte_mbuf_raw_sanity_check(m);
+			__rte_mbuf_raw_verify(m);
 
 			SFC_ASSERT((id & ~ptr_mask) == 0);
 			rxd = &rxq->sw_ring[id];
@@ -297,7 +297,7 @@ sfc_ef10_rx_process_event(struct sfc_ef10_rxq *rxq, efx_qword_t rx_ev,
 		rxd = &rxq->sw_ring[pending++ & ptr_mask];
 		m = rxd->mbuf;
 
-		__rte_mbuf_raw_sanity_check(m);
+		__rte_mbuf_raw_verify(m);
 
 		m->data_off = RTE_PKTMBUF_HEADROOM;
 		rte_pktmbuf_data_len(m) = seg_len;
drivers/net/sfc/sfc_rx.c +1 -1
index 1dde2c111001..645c8643d1c1 100644
@@ -120,7 +120,7 @@ sfc_efx_rx_qrefill(struct sfc_efx_rxq *rxq)
 		     ++i, id = (id + 1) & rxq->ptr_mask) {
 			m = objs[i];
 
-			__rte_mbuf_raw_sanity_check(m);
+			__rte_mbuf_raw_verify(m);
 
 			rxd = &rxq->sw_desc[id];
 			rxd->mbuf = m;
examples/ipv4_multicast/main.c +1 -1
index 6d0a8501eff5..f39658f4e249 100644
@@ -258,7 +258,7 @@ mcast_out_pkt(struct rte_mbuf *pkt, int use_clone)
 	hdr->pkt_len = (uint16_t)(hdr->data_len + pkt->pkt_len);
 	hdr->nb_segs = pkt->nb_segs + 1;
 
-	__rte_mbuf_sanity_check(hdr, 1);
+	__rte_mbuf_verify(hdr, 1);
 	return hdr;
 }
 /* >8 End of mcast_out_kt. */
lib/mbuf/rte_mbuf.c +15 -8
index 686e797c80c4..91cb2f84f6a1 100644
@@ -363,9 +363,9 @@ rte_pktmbuf_pool_create_extbuf(const char *name, unsigned int n,
 	return mp;
 }
 
-/* do some sanity checks on a mbuf: panic if it fails */
+/* do some checks on a mbuf: panic if it fails */
 void
-rte_mbuf_sanity_check(const struct rte_mbuf *m, int is_header)
+rte_mbuf_verify(const struct rte_mbuf *m, int is_header)
 {
 	const char *reason;
 
@@ -373,6 +373,13 @@ rte_mbuf_sanity_check(const struct rte_mbuf *m, int is_header)
 		rte_panic("%s\n", reason);
 }
 
+/* For ABI compatibility, to be removed in next release */
+void
+rte_mbuf_sanity_check(const struct rte_mbuf *m, int is_header)
+{
+	rte_mbuf_verify(m, is_header);
+}
+
 int rte_mbuf_check(const struct rte_mbuf *m, int is_header,
 		   const char **reason)
 {
@@ -492,7 +499,7 @@ void rte_pktmbuf_free_bulk(struct rte_mbuf **mbufs, unsigned int count)
 		if (unlikely(m == NULL))
 			continue;
 
-		__rte_mbuf_sanity_check(m, 1);
+		__rte_mbuf_verify(m, 1);
 
 		do {
 			m_next = m->next;
@@ -542,7 +549,7 @@ rte_pktmbuf_clone(struct rte_mbuf *md, struct rte_mempool *mp)
 		return NULL;
 	}
 
-	__rte_mbuf_sanity_check(mc, 1);
+	__rte_mbuf_verify(mc, 1);
 	return mc;
 }
 
@@ -592,7 +599,7 @@ rte_pktmbuf_copy(const struct rte_mbuf *m, struct rte_mempool *mp,
 	struct rte_mbuf *mc, *m_last, **prev;
 
 	/* garbage in check */
-	__rte_mbuf_sanity_check(m, 1);
+	__rte_mbuf_verify(m, 1);
 
 	/* check for request to copy at offset past end of mbuf */
 	if (unlikely(off >= m->pkt_len))
@@ -656,7 +663,7 @@ rte_pktmbuf_copy(const struct rte_mbuf *m, struct rte_mempool *mp,
 	}
 
 	/* garbage out check */
-	__rte_mbuf_sanity_check(mc, 1);
+	__rte_mbuf_verify(mc, 1);
 	return mc;
 }
 
@@ -667,7 +674,7 @@ rte_pktmbuf_dump(FILE *f, const struct rte_mbuf *m, unsigned dump_len)
 	unsigned int len;
 	unsigned int nb_segs;
 
-	__rte_mbuf_sanity_check(m, 1);
+	__rte_mbuf_verify(m, 1);
 
 	fprintf(f, "dump mbuf at %p, iova=%#" PRIx64 ", buf_len=%u\n", m, rte_mbuf_iova_get(m),
 		m->buf_len);
@@ -685,7 +692,7 @@ rte_pktmbuf_dump(FILE *f, const struct rte_mbuf *m, unsigned dump_len)
 	nb_segs = m->nb_segs;
 
 	while (m && nb_segs != 0) {
-		__rte_mbuf_sanity_check(m, 0);
+		__rte_mbuf_verify(m, 0);
 
 		fprintf(f, "  segment at %p, data=%p, len=%u, off=%u, refcnt=%u\n",
 			m, rte_pktmbuf_mtod(m, void *),
lib/mbuf/rte_mbuf.h +37 -34

224 lines not on this page · raw message

lib/mbuf/version.map +1 -0
index f010d4692e3e..04d9ffc1bdb3 100644
@@ -31,6 +31,7 @@ DPDK_24 {
 	rte_mbuf_set_platform_mempool_ops;
 	rte_mbuf_set_user_mempool_ops;
 	rte_mbuf_user_mempool_ops;
+	rte_mbuf_verify;
 	rte_pktmbuf_clone;
 	rte_pktmbuf_copy;
 	rte_pktmbuf_dump;
Signature · 1 line
2.39.2
#76 lore raw

PATCH v4 2/19 eal: replace use of sanity check in comments and messages

In reply to Stephen Hemminger

Sanity check is on the Tier 2 non-inclusive list.
Replace or remove it.

---
 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(-)
lib/eal/common/eal_common_memory.c +1 -1
index d9433db62345..27adaf51e5ab 100644
@@ -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",
lib/eal/common/eal_common_proc.c +2 -1
index 02d4599d6787..df5b6493e77d 100644
@@ -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;
lib/eal/common/eal_common_trace.c +1 -1
index cb980af06d9f..cadb85b94fde 100644
@@ -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;
lib/eal/common/eal_memcfg.h +1 -1
index 8889ba063fea..8df5bf007f1a 100644
@@ -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. */
 
lib/eal/common/rte_malloc.c +1 -1
index ebafef3f6cf2..e632c395132c 100644
@@ -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);
lib/eal/freebsd/eal.c +1 -1
index dfe973e6fdd1..6602af7d7782 100644
@@ -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;
lib/eal/linux/eal.c +1 -1
index c6efd920145c..dcc3bf50b4de 100644
@@ -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;
lib/eal/windows/eal.c +1 -1
index 096cb98d1c1d..b6413362892a 100644
@@ -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;
Signature · 1 line
2.39.2
#77 lore raw

PATCH v4 3/19 test: replace use word sanity

In reply to Stephen Hemminger

The word "sanity" is on the not-allowed inclusive naming list. Replace the unnecessary usage in tests.

---
 app/test/test_bitmap.c             |  4 +--
 app/test/test_bpf.c                |  6 ++--
 app/test/test_common.c             |  2 +-
 app/test/test_distributor.c        | 46 +++++++++++++++---------------
 app/test/test_dmadev.c             |  2 +-
 app/test/test_eal_flags.c          | 20 ++++++-------
 app/test/test_hash.c               |  2 +-
 app/test/test_interrupts.c         |  9 +++---
 app/test/test_link_bonding_mode4.c |  2 +-
 app/test/test_mbuf.c               |  2 +-
 app/test/test_rawdev.c             |  2 +-
 app/test/test_timer.c              | 10 +++----
 12 files changed, 54 insertions(+), 53 deletions(-)
app/test/test_bitmap.c +2 -2
index e9c61590aef7..8cb5d0954a2b 100644
@@ -33,7 +33,7 @@ test_bitmap_scan_operations(struct rte_bitmap *bmp)
 	}
 
 	if (slab1_magic != out_slab) {
-		printf("Scan operation sanity failed.\n");
+		printf("Scan operation magic number check failed.\n");
 		return TEST_FAILED;
 	}
 
@@ -43,7 +43,7 @@ test_bitmap_scan_operations(struct rte_bitmap *bmp)
 	}
 
 	if (slab2_magic != out_slab) {
-		printf("Scan operation sanity failed.\n");
+		printf("Scan operation magic number check failed.\n");
 		return TEST_FAILED;
 	}
 
app/test/test_bpf.c +3 -3
index f5af5e8a3f4a..347b672ac211 100644
@@ -3329,9 +3329,9 @@ test_bpf_match(pcap_t *pcap, const char *str,
 	return ret;
 }
 
-/* Basic sanity test can we match a IP packet */
+/* Basic test can we match a IP packet */
 static int
-test_bpf_filter_sanity(pcap_t *pcap)
+test_bpf_filter_match(pcap_t *pcap)
 {
 	const uint32_t plen = 100;
 	struct rte_mbuf mb, *m;
@@ -3463,7 +3463,7 @@ test_bpf_convert(void)
 		return -1;
 	}
 
-	rc = test_bpf_filter_sanity(pcap);
+	rc = test_bpf_filter_match(pcap);
 	for (i = 0; i < RTE_DIM(sample_filters); i++)
 		rc |= test_bpf_filter(pcap, sample_filters[i]);
 
app/test/test_common.c +1 -1
index f89e1eb7ee0d..c7ce8ea32a77 100644
@@ -18,7 +18,7 @@
 	{printf(x "() test failed!\n");\
 	return -1;}
 
-/* this is really a sanity check */
+/* this is really a consistency check */
 static int
 test_macros(int __rte_unused unused_parm)
 {
app/test/test_distributor.c +23 -23

177 lines not on this page · raw message

app/test/test_dmadev.c +1 -1
index 0736ff2a1867..b54319f763f4 100644
@@ -927,7 +927,7 @@ test_dma(void)
 {
 	int i;
 
-	/* basic sanity on dmadev infrastructure */
+	/* basic validation on dmadev infrastructure */
 	if (test_apis() < 0)
 		ERR_RETURN("Error performing API tests\n");
 
app/test/test_eal_flags.c +10 -10
index 148e9098e819..0fe2989d0a58 100644
@@ -314,7 +314,7 @@ get_number_of_sockets(void)
 
 /*
  * Test that the app doesn't run with invalid allow option.
- * Final tests ensures it does run with valid options as sanity check (one
+ * Final tests ensures it does run with valid options as basic test (one
  * test for with Domain+BDF, second for just with BDF)
  */
 static int
@@ -382,7 +382,7 @@ test_allow_flag(void)
 
 /*
  * Test that the app doesn't run with invalid blocklist option.
- * Final test ensures it does run with valid options as sanity check
+ * Final test ensures it does run with valid options as basic check.
  */
 static int
 test_invalid_b_flag(void)
@@ -429,7 +429,7 @@ test_invalid_b_flag(void)
 
 /*
  *  Test that the app doesn't run with invalid vdev option.
- *  Final test ensures it does run with valid options as sanity check
+ *  Final test ensures it does run with valid options basic check.
  */
 static int
 test_invalid_vdev_flag(void)
@@ -554,7 +554,7 @@ test_missing_c_flag(void)
 	/* bad coremask value */
 	const char *argv3[] = { prgname, prefix, mp_flag,
 				"-c", "error" };
-	/* sanity check of tests - valid coremask value */
+	/* check of tests - valid coremask value */
 	const char *argv4[] = { prgname, prefix, mp_flag,
 				"-c", "1" };
 	/* -l flag but no corelist value */
@@ -581,7 +581,7 @@ test_missing_c_flag(void)
 				"-l", RTE_STR(RTE_MAX_LCORE) };
 	const char * const argv14[] = { prgname, prefix, mp_flag,
 				"-l", "1-"RTE_STR(RTE_MAX_LCORE) };
-	/* sanity check test - valid corelist value */
+	/* check test - valid corelist value */
 	const char * const argv15[] = { prgname, prefix, mp_flag,
 				 "-l", "1-2,3" };
 
@@ -613,7 +613,7 @@ test_missing_c_flag(void)
 				 "--lcores", "(4-7)=(1,3)" };
 	const char * const argv28[] = { prgname, prefix, mp_flag,
 				 "--lcores", "[4-7]@(1,3)" };
-	/* sanity check of tests - valid lcores value */
+	/* more complex valid lcores value */
 	const char * const argv29[] = { prgname, prefix, mp_flag,
 				 "--lcores",
 				 "0-1,2@(5-7),(3-5)@(0,2),(0,6),7"};
@@ -744,7 +744,7 @@ test_main_lcore_flag(void)
 
 /*
  * Test that the app doesn't run with invalid -n flag option.
- * Final test ensures it does run with valid options as sanity check
+ * Final test ensures it does run with valid options as basic check.
  * Since -n is not compulsory for MP, we instead use --no-huge and --no-shconf
  * flags.
  */
@@ -772,10 +772,10 @@ test_invalid_n_flag(void)
 	/* zero is invalid */
 	const char *argv3[] = { prgname, prefix, no_huge, no_shconf,
 				"-n", "0" };
-	/* sanity test - check with good value */
+	/* check with good value */
 	const char *argv4[] = { prgname, prefix, no_huge, no_shconf,
 				"-n", "2" };
-	/* sanity test - check with no -n flag */
+	/* check with no -n flag */
 	const char *argv5[] = { prgname, prefix, no_huge, no_shconf};
 
 	if (launch_proc(argv1) == 0
@@ -977,7 +977,7 @@ test_misc_flags(void)
 	 * All cases, apart from the first, app should run.
 	 * No further testing of output done.
 	 */
-	/* sanity check - failure with invalid option */
+	/* failure with invalid option */
 	const char *argv0[] = {prgname, prefix, mp_flag, "--invalid-opt"};
 
 	/* With --no-pci */
app/test/test_hash.c +1 -1
index 3e45afaa67fc..f521ce7f679a 100644
@@ -1088,7 +1088,7 @@ fbk_hash_unit_test(void)
 		.socket_id = 0,
 	};
 
-	/* this is a sanity check for "same name" test
+	/* this is a check for "same name" test
 	 * creating this hash will check if we are actually able to create
 	 * multiple hashes with different names (instead of having just one).
 	 */
app/test/test_interrupts.c +5 -4
index b59ab426999c..88105b78a455 100644
@@ -48,7 +48,7 @@ static union intr_pipefds pfds;
  * Check if the interrupt handle is valid.
  */
 static inline int
-test_interrupt_handle_sanity_check(struct rte_intr_handle *intr_handle)
+test_interrupt_handle_check(struct rte_intr_handle *intr_handle)
 {
 	if (!intr_handle || rte_intr_fd_get(intr_handle) < 0)
 		return -1;
@@ -164,7 +164,7 @@ test_interrupt_handle_compare(struct rte_intr_handle *intr_handle_l,
 #else
 /* to be implemented for bsd later */
 static inline int
-test_interrupt_handle_sanity_check(struct rte_intr_handle *intr_handle)
+test_interrupt_handle_check(struct rte_intr_handle *intr_handle)
 {
 	RTE_SET_USED(intr_handle);
 
@@ -215,7 +215,7 @@ test_interrupt_callback(void *arg)
 		return;
 	}
 
-	if (test_interrupt_handle_sanity_check(intr_handle) < 0) {
+	if (test_interrupt_handle_check(intr_handle) < 0) {
 		printf("null or invalid intr_handle for %s\n", __func__);
 		flag = -1;
 		return;
@@ -241,7 +241,8 @@ static void
 test_interrupt_callback_1(void *arg)
 {
 	struct rte_intr_handle *intr_handle = arg;
-	if (test_interrupt_handle_sanity_check(intr_handle) < 0) {
+
+	if (test_interrupt_handle_check(intr_handle) < 0) {
 		printf("null or invalid intr_handle for %s\n", __func__);
 		flag = -1;
 		return;
app/test/test_link_bonding_mode4.c +1 -1
index 21c512c94b89..95dd52848fb9 100644
@@ -224,7 +224,7 @@ add_slave(struct slave_conf *slave, uint8_t start)
 	struct rte_ether_addr addr, addr_check;
 	int retval;
 
-	/* Some sanity check */
+	/* Some basic tests. */
 	RTE_VERIFY(test_params.slave_ports <= slave &&
 		slave - test_params.slave_ports < (int)RTE_DIM(test_params.slave_ports));
 	RTE_VERIFY(slave->bonded == 0);
app/test/test_mbuf.c +1 -1
index f3f5400e2eca..9c97b95268d7 100644
@@ -1701,7 +1701,7 @@ test_mbuf_validate_tx_offload(const char *test_name,
 	struct rte_mbuf *m = NULL;
 	int ret = 0;
 
-	/* alloc a mbuf and do sanity check */
+	/* alloc a mbuf and do some basic checks */
 	m = rte_pktmbuf_alloc(pktmbuf_pool);
 	if (m == NULL)
 		GOTO_FAIL("%s: mbuf allocation failed!\n", __func__);
app/test/test_rawdev.c +1 -1
index 3c780e3f9e96..c807bf90d9c3 100644
@@ -47,7 +47,7 @@ test_rawdev_selftests(void)
 	int ret = 0;
 	int i;
 
-	/* basic sanity on rawdev infrastructure */
+	/* basic check on rawdev infrastructure */
 	if (test_rawdev_selftest_skeleton() < 0)
 		return -1;
 
app/test/test_timer.c +5 -5
index 0c36dc9010b0..6615ce536443 100644
@@ -491,11 +491,11 @@ timer_basic_main_loop(__rte_unused void *arg)
 }
 
 static int
-timer_sanity_check(void)
+timer_check(void)
 {
 #ifdef RTE_LIBEAL_USE_HPET
 	if (eal_timer_source != EAL_TIMER_HPET) {
-		printf("Not using HPET, can't sanity check timer sources\n");
+		printf("Not using HPET, can't check timer sources\n");
 		return 0;
 	}
 
@@ -539,9 +539,9 @@ test_timer(void)
 		return TEST_SKIPPED;
 	}
 
-	/* sanity check our timer sources and timer config values */
-	if (timer_sanity_check() < 0) {
-		printf("Timer sanity checks failed\n");
+	/* check our timer sources and timer config values */
+	if (timer_check() < 0) {
+		printf("Timer checks failed\n");
 		return TEST_FAILED;
 	}
 
Signature · 1 line
2.39.2
#78 lore raw

PATCH v4 4/19 examples: remove term sanity

In reply to Stephen Hemminger

Do not use non-inclusive terms.

---
 examples/ipsec-secgw/event_helper.c | 2 +-
 examples/qos_sched/args.c           | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
examples/ipsec-secgw/event_helper.c +1 -1
index 89fb7e62a5a3..f595b4fe01dc 100644
@@ -2100,7 +2100,7 @@ eh_launch_worker(struct eh_conf *conf, struct eh_app_worker_params *app_wrkr,
 		goto clean_and_exit;
 	}
 
-	/* Verify sanity of the matched worker */
+	/* Verify validity of the matched worker */
 	if (eh_verify_match_worker(match_wrkr) != 1) {
 		EH_LOG_ERR("Failed to validate the matched worker");
 		goto clean_and_exit;
examples/qos_sched/args.c +1 -1
index e97273152aa7..1d8ba9522586 100644
@@ -384,7 +384,7 @@ app_parse_args(int argc, char **argv)
 		return -1;
 	}
 
-	/* sanity check for cores assignment */
+	/* check for cores assignment */
 	for(i = 0; i < nb_pfc; i++) {
 		if (qos_conf[i].rx_core >= RTE_MAX_LCORE) {
 			RTE_LOG(ERR, APP, "pfc %u: invalid RX lcore index %u\n", i + 1,
Signature · 1 line
2.39.2
#79 lore raw

PATCH v4 5/19 lib: replace use of sanity check in comments and messages

In reply to Stephen Hemminger

Sanity check is on the Tier 2 non-inclusive list.
Replace or remove it.

---
 lib/graph/graph.c           | 2 +-
 lib/graph/graph_stats.c     | 2 +-
 lib/graph/node.c            | 2 +-
 lib/jobstats/rte_jobstats.c | 6 +++---
 lib/metrics/rte_metrics.c   | 2 +-
 lib/pcapng/rte_pcapng.c     | 2 +-
 6 files changed, 8 insertions(+), 8 deletions(-)
lib/graph/graph.c +1 -1
index 26f0968a978d..e51dcc30568e 100644
@@ -344,7 +344,7 @@ rte_graph_create(const char *name, struct rte_graph_param *prm)
 
 	graph_spinlock_lock();
 
-	/* Check arguments sanity */
+	/* Check argument validity */
 	if (prm == NULL)
 		SET_ERR_JMP(EINVAL, fail, "Param should not be NULL");
 
lib/graph/graph_stats.c +1 -1
index cc32245c0593..cfb30ae07497 100644
@@ -317,7 +317,7 @@ rte_graph_cluster_stats_create(const struct rte_graph_cluster_stats_param *prm)
 	const char *pattern;
 	rte_graph_t i;
 
-	/* Sanity checks */
+	/* Validate arguments */
 	if (!rte_graph_has_stats_feature())
 		SET_ERR_JMP(EINVAL, fail, "Stats feature is not enabled");
 
lib/graph/node.c +1 -1
index 99a962277964..c238d140ed31 100644
@@ -68,7 +68,7 @@ __rte_node_register(const struct rte_node_register *reg)
 
 	graph_spinlock_lock();
 
-	/* Check sanity */
+	/* Check argument validity */
 	if (reg == NULL || reg->process == NULL) {
 		rte_errno = EINVAL;
 		goto fail;
lib/jobstats/rte_jobstats.c +3 -3
index af565a14eaf3..1c4b280c952a 100644
@@ -124,7 +124,7 @@ rte_jobstats_start(struct rte_jobstats_context *ctx, struct rte_jobstats *job)
 {
 	uint64_t now;
 
-	/* Some sanity check. */
+	/* Check validity of arguments. */
 	if (unlikely(ctx == NULL || job == NULL || job->context != NULL))
 		return -EINVAL;
 
@@ -144,7 +144,7 @@ rte_jobstats_abort(struct rte_jobstats *job)
 	struct rte_jobstats_context *ctx;
 	uint64_t now, exec_time;
 
-	/* Some sanity check. */
+	/* Check that arguments are valid */
 	if (unlikely(job == NULL || job->context == NULL))
 		return -EINVAL;
 
@@ -165,7 +165,7 @@ rte_jobstats_finish(struct rte_jobstats *job, int64_t job_value)
 	uint64_t now, exec_time;
 	int need_update;
 
-	/* Some sanity check. */
+	/* Check arguments */
 	if (unlikely(job == NULL || job->context == NULL))
 		return -EINVAL;
 
lib/metrics/rte_metrics.c +1 -1
index 0ccdbabc04eb..f60d4f3f6e25 100644
@@ -120,7 +120,7 @@ rte_metrics_reg_names(const char * const *names, uint16_t cnt_names)
 	uint16_t idx_name;
 	uint16_t idx_base;
 
-	/* Some sanity checks */
+	/* Some consistency checks */
 	if (cnt_names < 1 || names == NULL)
 		return -EINVAL;
 	for (idx_name = 0; idx_name < cnt_names; idx_name++)
lib/pcapng/rte_pcapng.c +1 -1
index 3c91fc77644a..fedf4b5b7f11 100644
@@ -669,7 +669,7 @@ rte_pcapng_write_packets(rte_pcapng_t *self,
 		struct rte_mbuf *m = pkts[i];
 		struct pcapng_enhance_packet_block *epb;
 
-		/* sanity check that is really a pcapng mbuf */
+		/* Check that is really a pcapng mbuf */
 		epb = rte_pktmbuf_mtod(m, struct pcapng_enhance_packet_block *);
 		if (unlikely(epb->block_type != PCAPNG_ENHANCED_PACKET_BLOCK ||
 			     epb->block_length != rte_pktmbuf_data_len(m))) {
Signature · 1 line
2.39.2
#80 lore raw

PATCH v4 6/19 doc/eventdev_pipeline: remove sanity

In reply to Stephen Hemminger

The word sanity check is unnecessary here.

---
 doc/guides/gpus/cuda.rst                       | 2 +-
 doc/guides/sample_app_ug/eventdev_pipeline.rst | 2 +-
 doc/guides/tools/testbbdev.rst                 | 8 ++++----
 3 files changed, 6 insertions(+), 6 deletions(-)
doc/guides/gpus/cuda.rst +1 -1
index 6520c17c3ea4..c523da1f3e9d 100644
@@ -80,7 +80,7 @@ Similarly to CUDA shared library, if the **libgdrapi.so** shared library
 is not installed in default locations (e.g. /usr/local/lib),
 you can use the variable ``GDRCOPY_PATH_L``.
 
-As an example, to enable the CPU map feature sanity check,
+As an example, to enable the CPU map feature check,
 run the ``app/test-gpudev`` application with:
 
 .. code-block:: console
doc/guides/sample_app_ug/eventdev_pipeline.rst +1 -1
index 19ff53803ede..e7787fb26609 100644
@@ -50,7 +50,7 @@ these settings is shown below:
     ./<build_dir>/examples/dpdk-eventdev_pipeline -l 0,2,8-15 --vdev event_sw0 \
     -- -r1 -t1 -e4 -w FF00 -s4 -n0 -c32 -W1000 -D
 
-The application has some sanity checking built-in, so if there is a function
+The application has some internal validation, so if there is a function
 (e.g.; the RX core) which doesn't have a cpu core mask assigned, the application
 will print an error message:
 
doc/guides/tools/testbbdev.rst +4 -4
index 54a9c44dc345..0a4af4ec9bec 100644
@@ -7,7 +7,7 @@ dpdk-test-bbdev Application
 The ``dpdk-test-bbdev`` tool is a Data Plane Development Kit (DPDK) utility that
 allows measuring performance parameters of PMDs available in the bbdev framework.
 Tests available for execution are: latency, throughput, validation,
-bler and sanity tests. Execution of tests can be customized using various
+bler and basic functionality. Execution of tests can be customized using various
 parameters passed to a python running script.
 
 
@@ -95,8 +95,8 @@ Test Cases
 
 There are 7 main test cases that can be executed using testbbdev tool:
 
-* Sanity checks [-c unittest]
-    - Performs sanity checks on BBDEV interface, validating basic functionality
+* Functional checks [-c unittest]
+    - Performs checks on BBDEV interface, validating basic functionality
 
 * Validation tests [-c validation]
     - Performs full operation of enqueue and dequeue
@@ -230,7 +230,7 @@ vector name refer more explicitly processing specificity such as
 is purely read/written for external DDR, lbrm when limited buffer
 rate matching is expected, or crc_fail when a CRC failure is expected.
 They are chosen to have a good coverage across sizes and processing
-parameters while still keeping their number limited as part of sanity
+parameters while still keeping their number limited as part of functional
 regression.
 
 Shortened tree of isg_cid-wireless_dpdk_ae with dpdk compiled and output
Signature · 1 line
2.39.2
#81 lore raw

PATCH v4 7/19 net/ring: replace use of sanity

In reply to Stephen Hemminger

Don't use term sanity check

---
 drivers/net/ring/rte_eth_ring.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/net/ring/rte_eth_ring.c +2 -5
index c43dccea7ffe..3f8faff2c94b 100644
@@ -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 {
@@ -591,10 +591,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)
Signature · 1 line
2.39.2
#82 lore raw

PATCH v4 8/19 net/fm10k, net/ixgbe: remove word sanity

In reply to Stephen Hemminger

Remove non-inclusive term sanity from these Intel drivers.

---
 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 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
drivers/net/fm10k/fm10k_ethdev.c +1 -1
index 4d3c4c10cfa4..894cf8c8a6b5 100644
@@ -1757,7 +1757,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;
 
drivers/net/fm10k/fm10k_rxtx.c +1 -1
index c0841ab8cb34..94345299b22a 100644
@@ -647,7 +647,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;
drivers/net/ixgbe/ixgbe_fdir.c +1 -1
index 06d6e2126de5..51bbf577e3fe 100644
@@ -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.
drivers/net/ixgbe/ixgbe_ipsec.c +1 -1
index d3313085560d..d4aa3e9ede8e 100644
@@ -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;
drivers/net/ixgbe/ixgbe_rxtx.c +1 -1
index 954ef241a082..81f4cf2b271b 100644
@@ -4975,7 +4975,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;
Signature · 1 line
2.39.2
#83 lore raw

PATCH v4 9/19 net/mlx[45]: remove word sanity

In reply to Stephen Hemminger

The term "sanity" is on non-inclusive naming list. Remove it from the Nvidia drivers.

---
 drivers/common/mlx5/linux/mlx5_common_os.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 +-
 7 files changed, 10 insertions(+), 12 deletions(-)
drivers/common/mlx5/linux/mlx5_common_os.c +1 -1
index 2ebb8ac8b6e5..7a7aadffa602 100644
@@ -234,7 +234,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]
drivers/net/mlx4/mlx4.c +1 -1
index a54016f4a235..e3048d5b6ec0 100644
@@ -1206,7 +1206,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]
drivers/net/mlx4/mlx4_flow.c +3 -3
index 8ef9fd2db44e..25b185d8710c 100644
@@ -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)
drivers/net/mlx5/mlx5_flow_dv.c +1 -1
index a8dd9920e6a4..7c21a9d6e91f 100644
@@ -8753,7 +8753,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
drivers/net/mlx5/mlx5_flow_hw.c +2 -4
index 5395969eb07e..0e7baa7c1a6e 100644
@@ -6008,11 +6008,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(__builtin_popcount(mask) >= __builtin_popcount(priv->vport_meta_mask));
 	return mask;
@@ -6024,12 +6023,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;
drivers/net/mlx5/mlx5_rxq.c +1 -1
index 8ef7860e161e..d18a46dff212 100644
@@ -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.
 	 * CACHE_FLUSHTHRESH_MULTIPLIER is defined in a C file, so using a
 	 * constant number 2 instead.
drivers/net/mlx5/mlx5_rxtx_vec.h +1 -1
index 77c3f4efa019..f8376f2b55b4 100644
@@ -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) \
Signature · 1 line
2.39.2
#84 lore raw

PATCH v4 10/19 net/sfc: remove term "sanity check"

In reply to Stephen Hemminger

Remove term sanity check in comment.

---
 drivers/net/sfc/sfc_dp_rx.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/sfc/sfc_dp_rx.h +1 -1
index 9f9bf2898881..dfb4fb98844b 100644
@@ -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;
 
Signature · 1 line
2.39.2
#85 lore raw

PATCH v4 11/19 net/ark: replace use of term sanity

In reply to Stephen Hemminger

Do not use non inclusive terms.

---
 drivers/net/ark/ark_ethdev.c    | 8 ++++----
 drivers/net/ark/ark_ethdev_rx.c | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)
drivers/net/ark/ark_ethdev.c +4 -4
index b2995427c8ca..9cb1c5dea49e 100644
@@ -358,10 +358,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__);
@@ -380,7 +380,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__);
 
@@ -601,7 +601,7 @@ eth_ark_dev_start(struct rte_eth_dev *dev)
 		pthread_t thread;
 
 		/* Delay packet generatpr 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[32];
 		snprintf(tname, sizeof(tname), "ark-delay-pg-%d",
drivers/net/ark/ark_ethdev_rx.c +1 -1
index cbc0416bc2d2..e293d78db353 100644
@@ -275,7 +275,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)) {
Signature · 1 line
2.39.2
#86 lore raw

PATCH v4 12/19 net/bnxt: replace use of term sanity

In reply to Stephen Hemminger

Do not use non-inclusive terms.

---
 drivers/net/bnxt/bnxt_hwrm.c           | 2 +-
 drivers/net/bnxt/hsi_struct_def_dpdk.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/bnxt/bnxt_hwrm.c +1 -1
index 06f196760fa8..e1254375b650 100644
@@ -262,7 +262,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 */
drivers/net/bnxt/hsi_struct_def_dpdk.h +1 -1
index 9afdd056ce7a..a8076a6fc223 100644
@@ -55482,7 +55482,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 {
Signature · 1 line
2.39.2
#87 lore raw

PATCH v4 13/19 net/bnx2x: remove reference to sanity

In reply to Stephen Hemminger

Replace "sanity check"

---
 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 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)
drivers/net/bnx2x/bnx2x.c +1 -1
index 29c16bb207c7..0d2dc2d3b3fa 100644
@@ -7821,7 +7821,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,
drivers/net/bnx2x/bnx2x_stats.c +4 -4
index c07b01510a06..86d90679ac0a 100644
@@ -187,7 +187,7 @@ bnx2x_stats_pmf_update(struct bnx2x_softc *sc)
 		 */
 		return;
 	}
-	/* sanity */
+	/* input valid? */
 	if (!sc->port.pmf || !sc->port.port_stx) {
 		PMD_DRV_LOG(ERR, sc, "BUG!");
 		return;
@@ -237,7 +237,7 @@ bnx2x_port_stats_init(struct bnx2x_softc *sc)
     uint32_t mac_addr;
     uint32_t *stats_comp = BNX2X_SP(sc, stats_comp);
 
-    /* sanity */
+    /* input valid? */
     if (!sc->link_vars.link_up || !sc->port.pmf) {
 	PMD_DRV_LOG(ERR, sc, "BUG!");
 	return;
@@ -461,7 +461,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 valid? */
     if (!sc->func_stx) {
 	PMD_DRV_LOG(ERR, sc, "BUG!");
 	return;
@@ -1301,7 +1301,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 valid? */
     if (!sc->port.pmf || !sc->port.port_stx) {
 	PMD_DRV_LOG(ERR, sc, "BUG!");
 	return;
drivers/net/bnx2x/ecore_sp.c +1 -1
index c6c3857778f7..158205266f62 100644
@@ -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;
 
drivers/net/bnx2x/elink.c +2 -2
index 2c81f85b9605..6ebd47d927f8 100644
@@ -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;
Signature · 1 line
2.39.2
#88 lore raw

PATCH v4 14/19 cnxk: replace term sanity

In reply to Stephen Hemminger

Do not use non-inclusive naming.

---
 drivers/common/cnxk/roc_nix_tm_ops.c | 2 +-
 drivers/common/cnxk/roc_npa.c        | 4 ++--
 drivers/net/cnxk/cnxk_ethdev.c       | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)
drivers/common/cnxk/roc_nix_tm_ops.c +1 -1
index 4e88ad1beb71..d837e2247634 100644
@@ -527,7 +527,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)
drivers/common/cnxk/roc_npa.c +2 -2
index 3b9a70028ba2..e796878ba634 100644
@@ -456,7 +456,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;
@@ -1076,7 +1076,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;
 
drivers/net/cnxk/cnxk_ethdev.c +2 -2
index 4b98faa72980..e7d311337f27 100644
@@ -636,7 +636,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;
@@ -1205,7 +1205,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;
Signature · 1 line
2.39.2
#89 lore raw

PATCH v4 15/19 event/opdl: remove term sanity

In reply to Stephen Hemminger

Don't use non-inclusive term.

---
 drivers/event/opdl/opdl_evdev.c      | 2 +-
 drivers/event/opdl/opdl_evdev_init.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/event/opdl/opdl_evdev.c +1 -1
index 9ce8b39b6098..862f3fa9b27a 100644
@@ -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",
drivers/event/opdl/opdl_evdev_init.c +1 -1
index be3437fc2f40..12eb2695f5de 100644
@@ -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));
Signature · 1 line
2.39.2
Acked-by on v4 15/19
#90 lore raw

Re: [PATCH v4 15/19] event/opdl: remove term sanity

Quoted 4 lines · Stephen Hemminger

Don't use non-inclusive term.

---

Quoted 33 lines
 drivers/event/opdl/opdl_evdev.c      | 2 +-
 drivers/event/opdl/opdl_evdev_init.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/event/opdl/opdl_evdev.c +1 -1
index 9ce8b39b6098..862f3fa9b27a 100644
@@ -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",
drivers/event/opdl/opdl_evdev_init.c +1 -1
index be3437fc2f40..12eb2695f5de 100644
@@ -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));
Signature · 1 line
2.39.2
#91 lore raw

PATCH v4 16/19 net/txgbe: replace term sanity

In reply to Stephen Hemminger

Don't use term sanity.

---
 drivers/net/txgbe/txgbe_ipsec.c | 2 +-
 drivers/net/txgbe/txgbe_rxtx.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/txgbe/txgbe_ipsec.c +1 -1
index f9f8108fb894..cadb0943c82d 100644
@@ -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;
drivers/net/txgbe/txgbe_rxtx.c +1 -1
index 427f8b82ac80..ef6478b8a5c8 100644
@@ -4115,7 +4115,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;
Signature · 1 line
2.39.2
#92 lore raw

PATCH v4 17/19 net/cxgbe: remove use of term sanity

In reply to Stephen Hemminger

Remove non-inclusive terminolgy.

---
 drivers/net/cxgbe/cxgbe_ethdev.c | 10 ++--------
 drivers/net/cxgbe/cxgbevf_main.c |  4 ++--
 2 files changed, 4 insertions(+), 10 deletions(-)
drivers/net/cxgbe/cxgbe_ethdev.c +2 -8
index 45bbeaef0ceb..2abb721afda1 100644
@@ -518,10 +518,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",
@@ -642,10 +639,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",
drivers/net/cxgbe/cxgbevf_main.c +2 -2
index d0c93f8ac3a5..dfb12b4ed5c9 100644
@@ -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"
Signature · 1 line
2.39.2
#93 lore raw

PATCH v4 18/19 crypto/bcmfs: replace term sanity check

In reply to Stephen Hemminger

Do not use non-inclusive naming here.

---
 drivers/crypto/bcmfs/hw/bcmfs4_rm.c | 6 +++---
 drivers/crypto/bcmfs/hw/bcmfs5_rm.c | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)
drivers/crypto/bcmfs/hw/bcmfs4_rm.c +3 -3
index 0ccb111898e4..50280fe14176 100644
@@ -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;
 	}
drivers/crypto/bcmfs/hw/bcmfs5_rm.c +3 -3
index c677c0cd9b52..c45eea82de20 100644
@@ -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;
 	}
Signature · 1 line
2.39.2
#94 lore raw

PATCH v4 19/19 drivers: remove use of term sanity check

In reply to Stephen Hemminger

Replace non-inclusive language with better comments. Covers multiple drivers

---
 drivers/bus/fslmc/qbman/qbman_sys_decl.h  | 2 +-
 drivers/common/cnxk/roc_npa.c             | 2 +-
 drivers/common/dpaax/caamflib/desc.h      | 2 +-
 drivers/common/sfc_efx/base/ef10_nvram.c  | 4 ++--
 drivers/common/sfc_efx/base/efx_rx.c      | 2 +-
 drivers/dma/idxd/idxd_pci.c               | 2 +-
 drivers/net/bonding/rte_eth_bond_8023ad.c | 2 +-
 drivers/net/mvpp2/mrvl_qos.c              | 2 +-
 drivers/net/nfp/nfp_flow.c                | 2 +-
 drivers/net/qede/qede_rxtx.c              | 6 +++---
 10 files changed, 13 insertions(+), 13 deletions(-)
drivers/bus/fslmc/qbman/qbman_sys_decl.h +1 -1
index caaae417773c..2b6162d0ceaf 100644
@@ -9,7 +9,7 @@
 #include <compat.h>
 #include <fsl_qbman_base.h>
 
-/* Sanity check */
+/* Byte order check */
 #if (__BYTE_ORDER__ != __ORDER_BIG_ENDIAN__) && \
 	(__BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__)
 #error "Unknown endianness!"
drivers/common/cnxk/roc_npa.c +1 -1
index e796878ba634..1db78631a185 100644
@@ -614,7 +614,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;
 
drivers/common/dpaax/caamflib/desc.h +1 -1
index 635d6bad071f..feb6a5d7bb2d 100644
@@ -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)
drivers/common/sfc_efx/base/ef10_nvram.c +2 -2
index ce8357fa94ce..fad9f0f507f3 100644
@@ -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;
drivers/common/sfc_efx/base/efx_rx.c +1 -1
index dce9ada55d28..28676c5a5b99 100644
@@ -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;
drivers/dma/idxd/idxd_pci.c +1 -1
index 3696c7f452fc..633065aa4577 100644
@@ -196,7 +196,7 @@ init_pci_device(struct rte_pci_device *dev, struct idxd_dmadev *idxd,
 	pci->portals = dev->mem_resource[2].addr;
 	pci->wq_cfg_sz = (pci->regs->wqcap >> 24) & 0x0F;
 
-	/* 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");
drivers/net/bonding/rte_eth_bond_8023ad.c +1 -1
index 4a266bb2caf1..56972f06c045 100644
@@ -1477,7 +1477,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 ||
drivers/net/mvpp2/mrvl_qos.c +1 -1
index f43217bc589c..db5052a9ab6f 100644
@@ -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;
drivers/net/nfp/nfp_flow.c +1 -1
index 3ed78eab5706..6342d6cbfbd0 100644
@@ -1956,7 +1956,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);
drivers/net/qede/qede_rxtx.c +3 -3
index c35585f5fdd6..8b89841e03b1 100644
@@ -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 =
Signature · 1 line
2.39.2
Acked-by Hemant Agrawal Acked-by on v4 19/19
#95 lore raw

RE: [EXT] [PATCH v4 19/19] drivers: remove use of term sanity check

-----Original Message-----
From: Stephen Hemminger <[email protected]>
Sent: Thursday, August 3, 2023 4:56 AM
To: [email protected]
Cc: Stephen Hemminger <[email protected]>; Hemant Agrawal <[email protected]>; Sachin Saxena <[email protected]>; Nithin Kumar Dabilpuram <[email protected]>; Kiran Kumar Kokkilagadda <[email protected]>; Sunil Kumar Kori <[email protected]>; Satha Koteswara Rao Kottidi <[email protected]>; Andrew Rybchenko <[email protected]>; Bruce Richardson <[email protected]>; Kevin Laatz <[email protected]>; Chas Williams <[email protected]>; Min Hu (Connor) <[email protected]>; Liron Himi <[email protected]>; Chaoyong He <[email protected]>; Niklas Söderlund <[email protected]>; Devendra Singh Rawat <[email protected]>; Alok Prasad <[email protected]>
Subject: [EXT] [PATCH v4 19/19] drivers: remove use of term sanity check

External Email

----------------------------------------------------------------------
Replace non-inclusive language with better comments. Covers multiple drivers

---
 drivers/bus/fslmc/qbman/qbman_sys_decl.h  | 2 +-
 drivers/common/cnxk/roc_npa.c             | 2 +-
 drivers/common/dpaax/caamflib/desc.h      | 2 +-
 drivers/common/sfc_efx/base/ef10_nvram.c  | 4 ++--
 drivers/common/sfc_efx/base/efx_rx.c      | 2 +-
 drivers/dma/idxd/idxd_pci.c               | 2 +-
 drivers/net/bonding/rte_eth_bond_8023ad.c | 2 +-
 drivers/net/mvpp2/mrvl_qos.c              | 2 +-
 drivers/net/nfp/nfp_flow.c                | 2 +-
 drivers/net/qede/qede_rxtx.c              | 6 +++---
 10 files changed, 13 insertions(+), 13 deletions(-)
drivers/bus/fslmc/qbman/qbman_sys_decl.h +1 -1
index caaae417773c..2b6162d0ceaf 100644
@@ -9,7 +9,7 @@
 #include <compat.h>
 #include <fsl_qbman_base.h>
 
-/* Sanity check */
+/* Byte order check */
 #if (__BYTE_ORDER__ != __ORDER_BIG_ENDIAN__) && \
 	(__BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__)  #error "Unknown endianness!"
drivers/common/cnxk/roc_npa.c +1 -1
@@ -614,7 +614,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;
 
drivers/common/dpaax/caamflib/desc.h +1 -1
index 635d6bad071f..feb6a5d7bb2d 100644
@@ -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)
drivers/common/sfc_efx/base/ef10_nvram.c +2 -2
index ce8357fa94ce..fad9f0f507f3 100644
@@ -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;
drivers/common/sfc_efx/base/efx_rx.c +1 -1
index dce9ada55d28..28676c5a5b99 100644
@@ -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/dma/idxd/idxd_pci.c b/drivers/dma/idxd/idxd_pci.c index 3696c7f452fc..633065aa4577 100644
drivers/dma/idxd/idxd_pci.c +1 -1
@@ -196,7 +196,7 @@ init_pci_device(struct rte_pci_device *dev, struct idxd_dmadev *idxd,
 	pci->portals = dev->mem_resource[2].addr;
 	pci->wq_cfg_sz = (pci->regs->wqcap >> 24) & 0x0F;
 
-	/* 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/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c

index 4a266bb2caf1..56972f06c045 100644

drivers/net/bonding/rte_eth_bond_8023ad.c +1 -1
@@ -1477,7 +1477,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 ||
drivers/net/mvpp2/mrvl_qos.c +1 -1
@@ -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;
drivers/net/nfp/nfp_flow.c +1 -1
@@ -1956,7 +1956,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/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c index c35585f5fdd6..8b89841e03b1 100644
drivers/net/qede/qede_rxtx.c +2 -2
@@ -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 =
--
2.39.2

Acked for qede

#96 lore raw

v5 cover remove use of the term "sanity check"

In reply to Stephen Hemminger

This set of patches removes all use of the term sanity check in DPDK. It does not address base drivers which come from vendors.

The term sanity-check and related formats are on the Inclusive Naming Tier 2 (Strongly Consider Replacing) word list.
https://inclusivenaming.org/word-lists/tier-2/sanity-check/

v5 - rebase on 23.11 and fix up conflicts.

Stephen Hemminger (19):
mbuf: replace term sanity check
eal: replace use of sanity check in comments and messages
test: replace use word sanity
examples: remove term sanity
lib: replace use of sanity check in comments and messages doc/eventdev_pipeline: remove sanity
net/ring: replace use of sanity
net/fm10k, net/ixgbe: remove word sanity net/mlx[45]: remove word sanity
net/sfc: remove term "sanity check"
net/ark: replace use of term sanity
net/bnxt: replace use of term sanity
net/bnx2x: remove reference to sanity
cnxk: replace term sanity
event/opdl: remove term sanity
net/txgbe: replace term sanity
net/cxgbe: remove use of term sanity crypto/bcmfs: replace term sanity check
drivers: remove use of term sanity check

 app/test/test_bitmap.c                        |  4 +-
 app/test/test_bpf.c                           |  6 +-
 app/test/test_common.c                        |  2 +-
 app/test/test_distributor.c                   | 46 ++++++------
 app/test/test_dmadev.c                        |  2 +-
 app/test/test_eal_flags.c                     | 20 +++---
 app/test/test_hash.c                          |  2 +-
 app/test/test_interrupts.c                    |  9 +--
 app/test/test_link_bonding_mode4.c            |  2 +-
 app/test/test_mbuf.c                          | 30 ++++----
 app/test/test_rawdev.c                        |  2 +-
 app/test/test_timer.c                         | 10 +--
 doc/guides/gpus/cuda.rst                      |  2 +-
 doc/guides/prog_guide/mbuf_lib.rst            |  4 +-
 doc/guides/rel_notes/deprecation.rst          |  3 +
 .../sample_app_ug/eventdev_pipeline.rst       |  2 +-
 doc/guides/tools/testbbdev.rst                |  8 +--
 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/avp/avp_ethdev.c                  | 18 ++---
 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/nfp_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/sfc/sfc_ef100_rx.c                |  6 +-
 drivers/net/sfc/sfc_ef10_essb_rx.c            |  4 +-
 drivers/net/sfc/sfc_ef10_rx.c                 |  4 +-
 drivers/net/sfc/sfc_rx.c                      |  2 +-
 drivers/net/txgbe/txgbe_ipsec.c               |  2 +-
 drivers/net/txgbe/txgbe_rxtx.c                |  2 +-
 examples/ipsec-secgw/event_helper.c           |  2 +-
 examples/ipv4_multicast/main.c                |  2 +-
 examples/qos_sched/args.c                     |  2 +-
 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 +-
 lib/graph/graph.c                             |  2 +-
 lib/graph/graph_stats.c                       |  2 +-
 lib/graph/node.c                              |  2 +-
 lib/jobstats/rte_jobstats.c                   |  6 +-
 lib/mbuf/rte_mbuf.c                           | 23 +++---
 lib/mbuf/rte_mbuf.h                           | 71 ++++++++++---------
 lib/mbuf/version.map                          |  1 +
 lib/metrics/rte_metrics.c                     |  2 +-
 lib/pcapng/rte_pcapng.c                       |  2 +-
 84 files changed, 234 insertions(+), 229 deletions(-)
Signature · 1 line
2.42.0
#97 lore raw

PATCH v5 1/19 mbuf: replace term sanity check

Replace rte_mbuf_sanity_check() with rte_mbuf_verify() to match the similar macro RTE_VERIFY() in rte_debug.h

The term sanity check is on the Tier 2 list of words that should be replaced.

Note: the rte_mbuf_verify() function is added without the experimental tag since it is intended as direct replacement for old function name.

---
 app/test/test_mbuf.c                 | 28 +++++------
 doc/guides/prog_guide/mbuf_lib.rst   |  4 +-
 doc/guides/rel_notes/deprecation.rst |  3 ++
 drivers/net/avp/avp_ethdev.c         | 18 +++----
 drivers/net/sfc/sfc_ef100_rx.c       |  6 +--
 drivers/net/sfc/sfc_ef10_essb_rx.c   |  4 +-
 drivers/net/sfc/sfc_ef10_rx.c        |  4 +-
 drivers/net/sfc/sfc_rx.c             |  2 +-
 examples/ipv4_multicast/main.c       |  2 +-
 lib/mbuf/rte_mbuf.c                  | 23 +++++----
 lib/mbuf/rte_mbuf.h                  | 71 +++++++++++++++-------------
 lib/mbuf/version.map                 |  1 +
 12 files changed, 90 insertions(+), 76 deletions(-)
app/test/test_mbuf.c +14 -14
index d7393df7eb5d..261c6e5d71e9 100644
@@ -261,8 +261,8 @@ test_one_pktmbuf(struct rte_mempool *pktmbuf_pool)
 		GOTO_FAIL("Buffer should be continuous");
 	memset(hdr, 0x55, MBUF_TEST_HDR2_LEN);
 
-	rte_mbuf_sanity_check(m, 1);
-	rte_mbuf_sanity_check(m, 0);
+	rte_mbuf_verify(m, 1);
+	rte_mbuf_verify(m, 0);
 	rte_pktmbuf_dump(stdout, m, 0);
 
 	/* this prepend should fail */
@@ -1161,7 +1161,7 @@ test_refcnt_mbuf(void)
 
 #ifdef RTE_EXEC_ENV_WINDOWS
 static int
-test_failing_mbuf_sanity_check(struct rte_mempool *pktmbuf_pool)
+test_failing_mbuf_verify(struct rte_mempool *pktmbuf_pool)
 {
 	RTE_SET_USED(pktmbuf_pool);
 	return TEST_SKIPPED;
@@ -1180,12 +1180,12 @@ mbuf_check_pass(struct rte_mbuf *buf)
 }
 
 static int
-test_failing_mbuf_sanity_check(struct rte_mempool *pktmbuf_pool)
+test_failing_mbuf_verify(struct rte_mempool *pktmbuf_pool)
 {
 	struct rte_mbuf *buf;
 	struct rte_mbuf badbuf;
 
-	printf("Checking rte_mbuf_sanity_check for failure conditions\n");
+	printf("Checking rte_mbuf_verify for failure conditions\n");
 
 	/* get a good mbuf to use to make copies */
 	buf = rte_pktmbuf_alloc(pktmbuf_pool);
@@ -1707,7 +1707,7 @@ test_mbuf_validate_tx_offload(const char *test_name,
 		GOTO_FAIL("%s: mbuf allocation failed!\n", __func__);
 	if (rte_pktmbuf_pkt_len(m) != 0)
 		GOTO_FAIL("%s: Bad packet length\n", __func__);
-	rte_mbuf_sanity_check(m, 0);
+	rte_mbuf_verify(m, 0);
 	m->ol_flags = ol_flags;
 	m->tso_segsz = segsize;
 	ret = rte_validate_tx_offload(m);
@@ -1914,7 +1914,7 @@ test_pktmbuf_read(struct rte_mempool *pktmbuf_pool)
 		GOTO_FAIL("%s: mbuf allocation failed!\n", __func__);
 	if (rte_pktmbuf_pkt_len(m) != 0)
 		GOTO_FAIL("%s: Bad packet length\n", __func__);
-	rte_mbuf_sanity_check(m, 0);
+	rte_mbuf_verify(m, 0);
 
 	data = rte_pktmbuf_append(m, MBUF_TEST_DATA_LEN2);
 	if (data == NULL)
@@ -1963,7 +1963,7 @@ test_pktmbuf_read_from_offset(struct rte_mempool *pktmbuf_pool)
 
 	if (rte_pktmbuf_pkt_len(m) != 0)
 		GOTO_FAIL("%s: Bad packet length\n", __func__);
-	rte_mbuf_sanity_check(m, 0);
+	rte_mbuf_verify(m, 0);
 
 	/* prepend an ethernet header */
 	hdr = (struct ether_hdr *)rte_pktmbuf_prepend(m, hdr_len);
@@ -2108,7 +2108,7 @@ create_packet(struct rte_mempool *pktmbuf_pool,
 			GOTO_FAIL("%s: mbuf allocation failed!\n", __func__);
 		if (rte_pktmbuf_pkt_len(pkt_seg) != 0)
 			GOTO_FAIL("%s: Bad packet length\n", __func__);
-		rte_mbuf_sanity_check(pkt_seg, 0);
+		rte_mbuf_verify(pkt_seg, 0);
 		/* Add header only for the first segment */
 		if (test_data->flags == MBUF_HEADER && seg == 0) {
 			hdr_len = sizeof(struct rte_ether_hdr);
@@ -2320,7 +2320,7 @@ test_pktmbuf_ext_shinfo_init_helper(struct rte_mempool *pktmbuf_pool)
 		GOTO_FAIL("%s: mbuf allocation failed!\n", __func__);
 	if (rte_pktmbuf_pkt_len(m) != 0)
 		GOTO_FAIL("%s: Bad packet length\n", __func__);
-	rte_mbuf_sanity_check(m, 0);
+	rte_mbuf_verify(m, 0);
 
 	ext_buf_addr = rte_malloc("External buffer", buf_len,
 			RTE_CACHE_LINE_SIZE);
@@ -2484,8 +2484,8 @@ test_pktmbuf_ext_pinned_buffer(struct rte_mempool *std_pool)
 		GOTO_FAIL("%s: test_pktmbuf_copy(pinned) failed\n",
 			  __func__);
 
-	if (test_failing_mbuf_sanity_check(pinned_pool) < 0)
-		GOTO_FAIL("%s: test_failing_mbuf_sanity_check(pinned)"
+	if (test_failing_mbuf_verify(pinned_pool) < 0)
+		GOTO_FAIL("%s: test_failing_mbuf_verify(pinned)"
 			  " failed\n", __func__);
 
 	if (test_mbuf_linearize_check(pinned_pool) < 0)
@@ -2859,8 +2859,8 @@ test_mbuf(void)
 		goto err;
 	}
 
-	if (test_failing_mbuf_sanity_check(pktmbuf_pool) < 0) {
-		printf("test_failing_mbuf_sanity_check() failed\n");
+	if (test_failing_mbuf_verify(pktmbuf_pool) < 0) {
+		printf("test_failing_mbuf_verify() failed\n");
 		goto err;
 	}
 
doc/guides/prog_guide/mbuf_lib.rst +2 -2
index 049357c75563..0accb51a98c7 100644
@@ -266,8 +266,8 @@ can be found in several of the sample applications, for example, the IPv4 Multic
 Debug
 -----
 
-In debug mode, the functions of the mbuf library perform sanity checks before any operation (such as, buffer corruption,
-bad type, and so on).
+In debug mode, the functions of the mbuf library perform consistency checks
+before any operation (such as, buffer corruption, bad type, and so on).
 
 Use Cases
 ---------
doc/guides/rel_notes/deprecation.rst +3 -0
index 81b93515cbd9..1e1544b5b644 100644
@@ -146,3 +146,6 @@ Deprecation Notices
   will be deprecated and subsequently removed in DPDK 24.11 release.
   Before this, the new port library API (functions rte_swx_port_*)
   will gradually transition from experimental to stable status.
+
+* mbuf: The function ``rte_mbuf_sanity_check`` is deprecated.
+  Use the new function ``rte_mbuf_verify`` instead.
drivers/net/avp/avp_ethdev.c +9 -9
index 53d9e38c939b..ae76fad84948 100644
@@ -1231,7 +1231,7 @@ _avp_mac_filter(struct avp_dev *avp, struct rte_mbuf *m)
 
 #ifdef RTE_LIBRTE_AVP_DEBUG_BUFFERS
 static inline void
-__avp_dev_buffer_sanity_check(struct avp_dev *avp, struct rte_avp_desc *buf)
+__avp_dev_buffer_check(struct avp_dev *avp, struct rte_avp_desc *buf)
 {
 	struct rte_avp_desc *first_buf;
 	struct rte_avp_desc *pkt_buf;
@@ -1272,12 +1272,12 @@ __avp_dev_buffer_sanity_check(struct avp_dev *avp, struct rte_avp_desc *buf)
 			  first_buf->pkt_len, pkt_len);
 }
 
-#define avp_dev_buffer_sanity_check(a, b) \
-	__avp_dev_buffer_sanity_check((a), (b))
+#define avp_dev_buffer_check(a, b) \
+	__avp_dev_buffer_check((a), (b))
 
 #else /* RTE_LIBRTE_AVP_DEBUG_BUFFERS */
 
-#define avp_dev_buffer_sanity_check(a, b) do {} while (0)
+#define avp_dev_buffer_check(a, b) do {} while (0)
 
 #endif
 
@@ -1302,7 +1302,7 @@ avp_dev_copy_from_buffers(struct avp_dev *avp,
 	void *pkt_data;
 	unsigned int i;
 
-	avp_dev_buffer_sanity_check(avp, buf);
+	avp_dev_buffer_check(avp, buf);
 
 	/* setup the first source buffer */
 	pkt_buf = avp_dev_translate_buffer(avp, buf);
@@ -1370,7 +1370,7 @@ avp_dev_copy_from_buffers(struct avp_dev *avp,
 	rte_pktmbuf_pkt_len(m) = total_length;
 	m->vlan_tci = vlan_tci;
 
-	__rte_mbuf_sanity_check(m, 1);
+	__rte_mbuf_verify(m, 1);
 
 	return m;
 }
@@ -1614,7 +1614,7 @@ avp_dev_copy_to_buffers(struct avp_dev *avp,
 	char *pkt_data;
 	unsigned int i;
 
-	__rte_mbuf_sanity_check(mbuf, 1);
+	__rte_mbuf_verify(mbuf, 1);
 
 	m = mbuf;
 	src_offset = 0;
@@ -1680,7 +1680,7 @@ avp_dev_copy_to_buffers(struct avp_dev *avp,
 		first_buf->vlan_tci = mbuf->vlan_tci;
 	}
 
-	avp_dev_buffer_sanity_check(avp, buffers[0]);
+	avp_dev_buffer_check(avp, buffers[0]);
 
 	return total_length;
 }
@@ -1798,7 +1798,7 @@ avp_xmit_scattered_pkts(void *tx_queue,
 
 #ifdef RTE_LIBRTE_AVP_DEBUG_BUFFERS
 	for (i = 0; i < nb_pkts; i++)
-		avp_dev_buffer_sanity_check(avp, tx_bufs[i]);
+		avp_dev_buffer_check(avp, tx_bufs[i]);
 #endif
 
 	/* send the packets */
drivers/net/sfc/sfc_ef100_rx.c +3 -3
index 2677003da326..8199b56f2740 100644
@@ -179,7 +179,7 @@ sfc_ef100_rx_qrefill(struct sfc_ef100_rxq *rxq)
 			struct sfc_ef100_rx_sw_desc *rxd;
 			rte_iova_t dma_addr;
 
-			__rte_mbuf_raw_sanity_check(m);
+			__rte_mbuf_raw_verify(m);
 
 			dma_addr = rte_mbuf_data_iova_default(m);
 			if (rxq->flags & SFC_EF100_RXQ_NIC_DMA_MAP) {
@@ -551,7 +551,7 @@ sfc_ef100_rx_process_ready_pkts(struct sfc_ef100_rxq *rxq,
 		rxq->ready_pkts--;
 
 		pkt = sfc_ef100_rx_next_mbuf(rxq);
-		__rte_mbuf_raw_sanity_check(pkt);
+		__rte_mbuf_raw_verify(pkt);
 
 		RTE_BUILD_BUG_ON(sizeof(pkt->rearm_data[0]) !=
 				 sizeof(rxq->rearm_data));
@@ -575,7 +575,7 @@ sfc_ef100_rx_process_ready_pkts(struct sfc_ef100_rxq *rxq,
 			struct rte_mbuf *seg;
 
 			seg = sfc_ef100_rx_next_mbuf(rxq);
-			__rte_mbuf_raw_sanity_check(seg);
+			__rte_mbuf_raw_verify(seg);
 
 			seg->data_off = RTE_PKTMBUF_HEADROOM;
 
drivers/net/sfc/sfc_ef10_essb_rx.c +2 -2
index 78bd430363b1..74647e2792b1 100644
@@ -125,7 +125,7 @@ sfc_ef10_essb_next_mbuf(const struct sfc_ef10_essb_rxq *rxq,
 	struct rte_mbuf *m;
 
 	m = (struct rte_mbuf *)((uintptr_t)mbuf + rxq->buf_stride);
-	__rte_mbuf_raw_sanity_check(m);
+	__rte_mbuf_raw_verify(m);
 	return m;
 }
 
@@ -136,7 +136,7 @@ sfc_ef10_essb_mbuf_by_index(const struct sfc_ef10_essb_rxq *rxq,
 	struct rte_mbuf *m;
 
 	m = (struct rte_mbuf *)((uintptr_t)mbuf + idx * rxq->buf_stride);
-	__rte_mbuf_raw_sanity_check(m);
+	__rte_mbuf_raw_verify(m);
 	return m;
 }
 
drivers/net/sfc/sfc_ef10_rx.c +2 -2
index 30a320d0791c..72b03b3bba7a 100644
@@ -148,7 +148,7 @@ sfc_ef10_rx_qrefill(struct sfc_ef10_rxq *rxq)
 			struct sfc_ef10_rx_sw_desc *rxd;
 			rte_iova_t phys_addr;
 
-			__rte_mbuf_raw_sanity_check(m);
+			__rte_mbuf_raw_verify(m);
 
 			SFC_ASSERT((id & ~ptr_mask) == 0);
 			rxd = &rxq->sw_ring[id];
@@ -297,7 +297,7 @@ sfc_ef10_rx_process_event(struct sfc_ef10_rxq *rxq, efx_qword_t rx_ev,
 		rxd = &rxq->sw_ring[pending++ & ptr_mask];
 		m = rxd->mbuf;
 
-		__rte_mbuf_raw_sanity_check(m);
+		__rte_mbuf_raw_verify(m);
 
 		m->data_off = RTE_PKTMBUF_HEADROOM;
 		rte_pktmbuf_data_len(m) = seg_len;
drivers/net/sfc/sfc_rx.c +1 -1
index 1dde2c111001..645c8643d1c1 100644
@@ -120,7 +120,7 @@ sfc_efx_rx_qrefill(struct sfc_efx_rxq *rxq)
 		     ++i, id = (id + 1) & rxq->ptr_mask) {
 			m = objs[i];
 
-			__rte_mbuf_raw_sanity_check(m);
+			__rte_mbuf_raw_verify(m);
 
 			rxd = &rxq->sw_desc[id];
 			rxd->mbuf = m;
examples/ipv4_multicast/main.c +1 -1
index 6d0a8501eff5..f39658f4e249 100644
@@ -258,7 +258,7 @@ mcast_out_pkt(struct rte_mbuf *pkt, int use_clone)
 	hdr->pkt_len = (uint16_t)(hdr->data_len + pkt->pkt_len);
 	hdr->nb_segs = pkt->nb_segs + 1;
 
-	__rte_mbuf_sanity_check(hdr, 1);
+	__rte_mbuf_verify(hdr, 1);
 	return hdr;
 }
 /* >8 End of mcast_out_kt. */
lib/mbuf/rte_mbuf.c +15 -8
index 686e797c80c4..91cb2f84f6a1 100644
@@ -363,9 +363,9 @@ rte_pktmbuf_pool_create_extbuf(const char *name, unsigned int n,
 	return mp;
 }
 
-/* do some sanity checks on a mbuf: panic if it fails */
+/* do some checks on a mbuf: panic if it fails */
 void
-rte_mbuf_sanity_check(const struct rte_mbuf *m, int is_header)
+rte_mbuf_verify(const struct rte_mbuf *m, int is_header)
 {
 	const char *reason;
 
@@ -373,6 +373,13 @@ rte_mbuf_sanity_check(const struct rte_mbuf *m, int is_header)
 		rte_panic("%s\n", reason);
 }
 
+/* For ABI compatibility, to be removed in next release */
+void
+rte_mbuf_sanity_check(const struct rte_mbuf *m, int is_header)
+{
+	rte_mbuf_verify(m, is_header);
+}
+
 int rte_mbuf_check(const struct rte_mbuf *m, int is_header,
 		   const char **reason)
 {
@@ -492,7 +499,7 @@ void rte_pktmbuf_free_bulk(struct rte_mbuf **mbufs, unsigned int count)
 		if (unlikely(m == NULL))
 			continue;
 
-		__rte_mbuf_sanity_check(m, 1);
+		__rte_mbuf_verify(m, 1);
 
 		do {
 			m_next = m->next;
@@ -542,7 +549,7 @@ rte_pktmbuf_clone(struct rte_mbuf *md, struct rte_mempool *mp)
 		return NULL;
 	}
 
-	__rte_mbuf_sanity_check(mc, 1);
+	__rte_mbuf_verify(mc, 1);
 	return mc;
 }
 
@@ -592,7 +599,7 @@ rte_pktmbuf_copy(const struct rte_mbuf *m, struct rte_mempool *mp,
 	struct rte_mbuf *mc, *m_last, **prev;
 
 	/* garbage in check */
-	__rte_mbuf_sanity_check(m, 1);
+	__rte_mbuf_verify(m, 1);
 
 	/* check for request to copy at offset past end of mbuf */
 	if (unlikely(off >= m->pkt_len))
@@ -656,7 +663,7 @@ rte_pktmbuf_copy(const struct rte_mbuf *m, struct rte_mempool *mp,
 	}
 
 	/* garbage out check */
-	__rte_mbuf_sanity_check(mc, 1);
+	__rte_mbuf_verify(mc, 1);
 	return mc;
 }
 
@@ -667,7 +674,7 @@ rte_pktmbuf_dump(FILE *f, const struct rte_mbuf *m, unsigned dump_len)
 	unsigned int len;
 	unsigned int nb_segs;
 
-	__rte_mbuf_sanity_check(m, 1);
+	__rte_mbuf_verify(m, 1);
 
 	fprintf(f, "dump mbuf at %p, iova=%#" PRIx64 ", buf_len=%u\n", m, rte_mbuf_iova_get(m),
 		m->buf_len);
@@ -685,7 +692,7 @@ rte_pktmbuf_dump(FILE *f, const struct rte_mbuf *m, unsigned dump_len)
 	nb_segs = m->nb_segs;
 
 	while (m && nb_segs != 0) {
-		__rte_mbuf_sanity_check(m, 0);
+		__rte_mbuf_verify(m, 0);
 
 		fprintf(f, "  segment at %p, data=%p, len=%u, off=%u, refcnt=%u\n",
 			m, rte_pktmbuf_mtod(m, void *),
lib/mbuf/rte_mbuf.h +37 -34

224 lines not on this page · raw message

lib/mbuf/version.map +1 -0
index daa65e2bbdb2..c85370e430b2 100644
@@ -31,6 +31,7 @@ DPDK_24 {
 	rte_mbuf_set_platform_mempool_ops;
 	rte_mbuf_set_user_mempool_ops;
 	rte_mbuf_user_mempool_ops;
+	rte_mbuf_verify;
 	rte_pktmbuf_clone;
 	rte_pktmbuf_copy;
 	rte_pktmbuf_dump;
Signature · 1 line
2.42.0
#98 lore raw

PATCH v5 2/19 eal: replace use of sanity check in comments and messages

In reply to Stephen Hemminger

Sanity check is on the Tier 2 non-inclusive list.
Replace or remove it.

---
 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(-)
lib/eal/common/eal_common_memory.c +1 -1
index d9433db62345..27adaf51e5ab 100644
@@ -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",
lib/eal/common/eal_common_proc.c +2 -1
index 728815c4a968..9f43c3199577 100644
@@ -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;
lib/eal/common/eal_common_trace.c +1 -1
index 6ad87fc0df5d..b2bab5c45f1e 100644
@@ -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;
lib/eal/common/eal_memcfg.h +1 -1
index 60e2089797a2..e8a85df35585 100644
@@ -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. */
 
lib/eal/common/rte_malloc.c +1 -1
index 9db0c399aef0..153f8c8364cd 100644
@@ -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);
lib/eal/freebsd/eal.c +1 -1
index 568e06e9ed91..aa71e4e08422 100644
@@ -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;
lib/eal/linux/eal.c +1 -1
index 57da058cec60..14fd3ce4ec20 100644
@@ -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;
lib/eal/windows/eal.c +1 -1
index 7ec215221158..3fb1e26f92b8 100644
@@ -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;
Signature · 1 line
2.42.0
#99 lore raw

PATCH v5 3/19 test: replace use word sanity

In reply to Stephen Hemminger

The word "sanity" is on the not-allowed inclusive naming list. Replace the unnecessary usage in tests.

---
 app/test/test_bitmap.c             |  4 +--
 app/test/test_bpf.c                |  6 ++--
 app/test/test_common.c             |  2 +-
 app/test/test_distributor.c        | 46 +++++++++++++++---------------
 app/test/test_dmadev.c             |  2 +-
 app/test/test_eal_flags.c          | 20 ++++++-------
 app/test/test_hash.c               |  2 +-
 app/test/test_interrupts.c         |  9 +++---
 app/test/test_link_bonding_mode4.c |  2 +-
 app/test/test_mbuf.c               |  2 +-
 app/test/test_rawdev.c             |  2 +-
 app/test/test_timer.c              | 10 +++----
 12 files changed, 54 insertions(+), 53 deletions(-)
app/test/test_bitmap.c +2 -2
index bab11812c767..a074b64f2e98 100644
@@ -33,7 +33,7 @@ test_bitmap_scan_operations(struct rte_bitmap *bmp)
 	}
 
 	if (slab1_magic != out_slab) {
-		printf("Scan operation sanity failed.\n");
+		printf("Scan operation magic number check failed.\n");
 		return TEST_FAILED;
 	}
 
@@ -43,7 +43,7 @@ test_bitmap_scan_operations(struct rte_bitmap *bmp)
 	}
 
 	if (slab2_magic != out_slab) {
-		printf("Scan operation sanity failed.\n");
+		printf("Scan operation magic number check failed.\n");
 		return TEST_FAILED;
 	}
 
app/test/test_bpf.c +3 -3
index f83e72a9adfd..ffadcece2212 100644
@@ -3329,9 +3329,9 @@ test_bpf_match(pcap_t *pcap, const char *str,
 	return ret;
 }
 
-/* Basic sanity test can we match a IP packet */
+/* Basic test can we match a IP packet */
 static int
-test_bpf_filter_sanity(pcap_t *pcap)
+test_bpf_filter_match(pcap_t *pcap)
 {
 	const uint32_t plen = 100;
 	struct rte_mbuf mb, *m;
@@ -3463,7 +3463,7 @@ test_bpf_convert(void)
 		return -1;
 	}
 
-	rc = test_bpf_filter_sanity(pcap);
+	rc = test_bpf_filter_match(pcap);
 	for (i = 0; i < RTE_DIM(sample_filters); i++)
 		rc |= test_bpf_filter(pcap, sample_filters[i]);
 
app/test/test_common.c +1 -1
index 21eb2285e1b2..784cdaf3d640 100644
@@ -19,7 +19,7 @@
 	{printf(x "() test failed!\n");\
 	return -1;}
 
-/* this is really a sanity check */
+/* this is really a consistency check */
 static int
 test_macros(int __rte_unused unused_parm)
 {
app/test/test_distributor.c +23 -23

177 lines not on this page · raw message

app/test/test_dmadev.c +1 -1
index 7581fc2b4cb0..899786b345ed 100644
@@ -1087,7 +1087,7 @@ test_dma(void)
 
 	parse_dma_env_var();
 
-	/* basic sanity on dmadev infrastructure */
+	/* basic validation on dmadev infrastructure */
 	if (test_apis() < 0)
 		ERR_RETURN("Error performing API tests\n");
 
app/test/test_eal_flags.c +10 -10
index 6cb4b0675730..9c082ff91496 100644
@@ -314,7 +314,7 @@ get_number_of_sockets(void)
 
 /*
  * Test that the app doesn't run with invalid allow option.
- * Final tests ensures it does run with valid options as sanity check (one
+ * Final tests ensures it does run with valid options as basic test (one
  * test for with Domain+BDF, second for just with BDF)
  */
 static int
@@ -382,7 +382,7 @@ test_allow_flag(void)
 
 /*
  * Test that the app doesn't run with invalid blocklist option.
- * Final test ensures it does run with valid options as sanity check
+ * Final test ensures it does run with valid options as basic check.
  */
 static int
 test_invalid_b_flag(void)
@@ -429,7 +429,7 @@ test_invalid_b_flag(void)
 
 /*
  *  Test that the app doesn't run with invalid vdev option.
- *  Final test ensures it does run with valid options as sanity check
+ *  Final test ensures it does run with valid options basic check.
  */
 static int
 test_invalid_vdev_flag(void)
@@ -554,7 +554,7 @@ test_missing_c_flag(void)
 	/* bad coremask value */
 	const char *argv3[] = { prgname, prefix, mp_flag,
 				"-c", "error" };
-	/* sanity check of tests - valid coremask value */
+	/* check of tests - valid coremask value */
 	const char *argv4[] = { prgname, prefix, mp_flag,
 				"-c", "1" };
 	/* -l flag but no corelist value */
@@ -581,7 +581,7 @@ test_missing_c_flag(void)
 				"-l", RTE_STR(RTE_MAX_LCORE) };
 	const char * const argv14[] = { prgname, prefix, mp_flag,
 				"-l", "1-"RTE_STR(RTE_MAX_LCORE) };
-	/* sanity check test - valid corelist value */
+	/* check test - valid corelist value */
 	const char * const argv15[] = { prgname, prefix, mp_flag,
 				 "-l", "1-2,3" };
 
@@ -613,7 +613,7 @@ test_missing_c_flag(void)
 				 "--lcores", "(4-7)=(1,3)" };
 	const char * const argv28[] = { prgname, prefix, mp_flag,
 				 "--lcores", "[4-7]@(1,3)" };
-	/* sanity check of tests - valid lcores value */
+	/* more complex valid lcores value */
 	const char * const argv29[] = { prgname, prefix, mp_flag,
 				 "--lcores",
 				 "0-1,2@(5-7),(3-5)@(0,2),(0,6),7"};
@@ -744,7 +744,7 @@ test_main_lcore_flag(void)
 
 /*
  * Test that the app doesn't run with invalid -n flag option.
- * Final test ensures it does run with valid options as sanity check
+ * Final test ensures it does run with valid options as basic check.
  * Since -n is not compulsory for MP, we instead use --no-huge and --no-shconf
  * flags.
  */
@@ -772,10 +772,10 @@ test_invalid_n_flag(void)
 	/* zero is invalid */
 	const char *argv3[] = { prgname, prefix, no_huge, no_shconf,
 				"-n", "0" };
-	/* sanity test - check with good value */
+	/* check with good value */
 	const char *argv4[] = { prgname, prefix, no_huge, no_shconf,
 				"-n", "2" };
-	/* sanity test - check with no -n flag */
+	/* check with no -n flag */
 	const char *argv5[] = { prgname, prefix, no_huge, no_shconf};
 
 	if (launch_proc(argv1) == 0
@@ -977,7 +977,7 @@ test_misc_flags(void)
 	 * All cases, apart from the first, app should run.
 	 * No further testing of output done.
 	 */
-	/* sanity check - failure with invalid option */
+	/* failure with invalid option */
 	const char *argv0[] = {prgname, prefix, mp_flag, "--invalid-opt"};
 
 	/* With --no-pci */
app/test/test_hash.c +1 -1
index d586878a2244..54e751b5eede 100644
@@ -1088,7 +1088,7 @@ fbk_hash_unit_test(void)
 		.socket_id = 0,
 	};
 
-	/* this is a sanity check for "same name" test
+	/* this is a check for "same name" test
 	 * creating this hash will check if we are actually able to create
 	 * multiple hashes with different names (instead of having just one).
 	 */
app/test/test_interrupts.c +5 -4
index 3952f9685fd9..42b830e9368a 100644
@@ -48,7 +48,7 @@ static union intr_pipefds pfds;
  * Check if the interrupt handle is valid.
  */
 static inline int
-test_interrupt_handle_sanity_check(struct rte_intr_handle *intr_handle)
+test_interrupt_handle_check(struct rte_intr_handle *intr_handle)
 {
 	if (!intr_handle || rte_intr_fd_get(intr_handle) < 0)
 		return -1;
@@ -164,7 +164,7 @@ test_interrupt_handle_compare(struct rte_intr_handle *intr_handle_l,
 #else
 /* to be implemented for bsd later */
 static inline int
-test_interrupt_handle_sanity_check(struct rte_intr_handle *intr_handle)
+test_interrupt_handle_check(struct rte_intr_handle *intr_handle)
 {
 	RTE_SET_USED(intr_handle);
 
@@ -215,7 +215,7 @@ test_interrupt_callback(void *arg)
 		return;
 	}
 
-	if (test_interrupt_handle_sanity_check(intr_handle) < 0) {
+	if (test_interrupt_handle_check(intr_handle) < 0) {
 		printf("null or invalid intr_handle for %s\n", __func__);
 		flag = -1;
 		return;
@@ -241,7 +241,8 @@ static void
 test_interrupt_callback_1(void *arg)
 {
 	struct rte_intr_handle *intr_handle = arg;
-	if (test_interrupt_handle_sanity_check(intr_handle) < 0) {
+
+	if (test_interrupt_handle_check(intr_handle) < 0) {
 		printf("null or invalid intr_handle for %s\n", __func__);
 		flag = -1;
 		return;
app/test/test_link_bonding_mode4.c +1 -1
index ff13dbed93f3..299b89f669ee 100644
@@ -224,7 +224,7 @@ add_member(struct member_conf *member, uint8_t start)
 	struct rte_ether_addr addr, addr_check;
 	int retval;
 
-	/* Some sanity check */
+	/* Some basic tests. */
 	RTE_VERIFY(test_params.member_ports <= member &&
 		member - test_params.member_ports < (int)RTE_DIM(test_params.member_ports));
 	RTE_VERIFY(member->bonding == 0);
app/test/test_mbuf.c +1 -1
index 261c6e5d71e9..7c73880090d4 100644
@@ -1701,7 +1701,7 @@ test_mbuf_validate_tx_offload(const char *test_name,
 	struct rte_mbuf *m = NULL;
 	int ret = 0;
 
-	/* alloc a mbuf and do sanity check */
+	/* alloc a mbuf and do some basic checks */
 	m = rte_pktmbuf_alloc(pktmbuf_pool);
 	if (m == NULL)
 		GOTO_FAIL("%s: mbuf allocation failed!\n", __func__);
app/test/test_rawdev.c +1 -1
index d34691dacf5f..0d4f0ce1fa17 100644
@@ -47,7 +47,7 @@ test_rawdev_selftests(void)
 	int ret = 0;
 	int i;
 
-	/* basic sanity on rawdev infrastructure */
+	/* basic check on rawdev infrastructure */
 	if (test_rawdev_selftest_skeleton() < 0)
 		return -1;
 
app/test/test_timer.c +5 -5
index cac8fc01149c..a23b5d8f2cb4 100644
@@ -491,11 +491,11 @@ timer_basic_main_loop(__rte_unused void *arg)
 }
 
 static int
-timer_sanity_check(void)
+timer_check(void)
 {
 #ifdef RTE_LIBEAL_USE_HPET
 	if (eal_timer_source != EAL_TIMER_HPET) {
-		printf("Not using HPET, can't sanity check timer sources\n");
+		printf("Not using HPET, can't check timer sources\n");
 		return 0;
 	}
 
@@ -539,9 +539,9 @@ test_timer(void)
 		return TEST_SKIPPED;
 	}
 
-	/* sanity check our timer sources and timer config values */
-	if (timer_sanity_check() < 0) {
-		printf("Timer sanity checks failed\n");
+	/* check our timer sources and timer config values */
+	if (timer_check() < 0) {
+		printf("Timer checks failed\n");
 		return TEST_FAILED;
 	}
 
Signature · 1 line
2.42.0
Acked-by on v5 3/19
#100 lore raw

RE: [PATCH v5 03/19] test: replace use word sanity

Quoted 502 lines

-----Original Message-----
From: Stephen Hemminger <[email protected]>
Sent: Wednesday, November 29, 2023 10:56 PM
To: [email protected]
Cc: Stephen Hemminger <[email protected]>; Cristian Dumitrescu <[email protected]>; Konstantin Ananyev <[email protected]>; David Hunt <[email protected]>; Chengwen Feng <[email protected]>; Kevin Laatz <[email protected]>; Bruce Richardson <[email protected]>; Yipeng Wang <[email protected]>; Sameh Gobriel <[email protected]>; Vladimir Medvedkin <[email protected]>; Harman Kalra <[email protected]>; Chas Williams <[email protected]>; Min Hu (Connor) <[email protected]>; Sachin Saxena <[email protected]>; Hemant Agrawal <[email protected]>; Erik Gabriel Carrillo <[email protected]>
Subject: [PATCH v5 03/19] test: replace use word sanity
Importance: High

The word "sanity" is on the not-allowed inclusive naming list. Replace the unnecessary usage in tests.

---
 app/test/test_bitmap.c             |  4 +--
 app/test/test_bpf.c                |  6 ++--
 app/test/test_common.c             |  2 +-
 app/test/test_distributor.c        | 46 +++++++++++++++---------------
 app/test/test_dmadev.c             |  2 +-
 app/test/test_eal_flags.c          | 20 ++++++-------
 app/test/test_hash.c               |  2 +-
 app/test/test_interrupts.c         |  9 +++---
 app/test/test_link_bonding_mode4.c |  2 +-
 app/test/test_mbuf.c               |  2 +-
 app/test/test_rawdev.c             |  2 +-
 app/test/test_timer.c              | 10 +++----
 12 files changed, 54 insertions(+), 53 deletions(-)
app/test/test_bitmap.c index renamed from app/test/test_bitmap.c +0 -0

bab11812c767..a074b64f2e98 100644

app/test/test_bitmap.c +2 -2
@@ -33,7 +33,7 @@ test_bitmap_scan_operations(struct rte_bitmap *bmp)
 	}
 
 	if (slab1_magic != out_slab) {
-		printf("Scan operation sanity failed.\n");
+		printf("Scan operation magic number check failed.\n");
 		return TEST_FAILED;
 	}
 
@@ -43,7 +43,7 @@ test_bitmap_scan_operations(struct rte_bitmap *bmp)
 	}
 
 	if (slab2_magic != out_slab) {
-		printf("Scan operation sanity failed.\n");
+		printf("Scan operation magic number check failed.\n");
 		return TEST_FAILED;
 	}
 
app/test/test_bpf.c index renamed from app/test/test_bpf.c +0 -0

f83e72a9adfd..ffadcece2212 100644

app/test/test_bpf.c +3 -3
@@ -3329,9 +3329,9 @@ test_bpf_match(pcap_t *pcap, const char *str,
 	return ret;
 }
 
-/* Basic sanity test can we match a IP packet */
+/* Basic test can we match a IP packet */
 static int
-test_bpf_filter_sanity(pcap_t *pcap)
+test_bpf_filter_match(pcap_t *pcap)
 {
 	const uint32_t plen = 100;
 	struct rte_mbuf mb, *m;
@@ -3463,7 +3463,7 @@ test_bpf_convert(void)
 		return -1;
 	}
 
-	rc = test_bpf_filter_sanity(pcap);
+	rc = test_bpf_filter_match(pcap);
 	for (i = 0; i < RTE_DIM(sample_filters); i++)
 		rc |= test_bpf_filter(pcap, sample_filters[i]);
 
app/test/test_common.c index renamed from app/test/test_common.c +0 -0

21eb2285e1b2..784cdaf3d640 100644

app/test/test_common.c +1 -1
@@ -19,7 +19,7 @@
 	{printf(x "() test failed!\n");\
 	return -1;}
 
-/* this is really a sanity check */
+/* this is really a consistency check */
 static int
 test_macros(int __rte_unused unused_parm)  { diff --git

a/app/test/test_distributor.c b/app/test/test_distributor.c index 6cb27f4de111..915de3027bd0 100644

app/test/test_distributor.c +4 -5
@@ -80,7 +80,7 @@ clear_packet_count(void)
 			__ATOMIC_RELAXED);
 }
 
-/* this is the basic worker function for sanity test
+/* this is the basic worker function
  * it does nothing but return packets and count them.
  */
 static int
@@ -105,7 +105,7 @@ handle_work(void *arg)
 	return 0;
 }
 
-/* do basic sanity testing of the distributor. This test tests the following:
+/* do basic testing of the distributor. This test tests the following:
  * - send 32 packets through distributor with the same tag and ensure they
  *   all go to the one worker
  * - send 32 packets through the distributor with two different tags and @@
-117,7 +117,7 @@ handle_work(void *arg)
  *   not necessarily in the same order (as different flows).
  */
 static int
-sanity_test(struct worker_params *wp, struct rte_mempool *p)
+basic_test(struct worker_params *wp, struct rte_mempool *p)
 {
 	struct rte_distributor *db = wp->dist;
 	struct rte_mbuf *bufs[BURST];
@@ -126,7 +126,7 @@ sanity_test(struct worker_params *wp, struct
 rte_mempool *p)
 	unsigned int retries;
 	unsigned int processed;
 
-	printf("=== Basic distributor sanity tests ===\n");
+	printf("=== Basic distributor tests ===\n");
 	clear_packet_count();
 	if (rte_mempool_get_bulk(p, (void *)bufs, BURST) != 0) {
app/test/test_distributor.c +1 -1
 		printf("line %d: Error getting mbufs from pool\n", __LINE__);
@@ -163,7 +163,7 @@ sanity_test(struct worker_params *wp, struct
 rte_mempool *p)
 		printf("Worker %u handled %u packets\n", i,
 			__atomic_load_n(&worker_stats[i].handled_packets,
 					__ATOMIC_RELAXED));
-	printf("Sanity test with all zero hashes done.\n");
+	printf("Test with all zero hashes done.\n");
 
 	/* pick two flows and check they go correctly */
app/test/test_distributor.c +1 -1
 	if (rte_lcore_count() >= 3) {
@@ -191,7 +191,7 @@ sanity_test(struct worker_params *wp, struct
 rte_mempool *p)
 				__atomic_load_n(
 					&worker_stats[i].handled_packets,
 					__ATOMIC_RELAXED));
-		printf("Sanity test with two hash values done\n");
+		printf("Test with two hash values done\n");
 	}
 

/* give a different hash value to each packet, @@ -219,11 +219,11
@@ sanity_test(struct worker_params *wp, struct rte_mempool *p)

app/test/test_distributor.c +2 -2
 		printf("Worker %u handled %u packets\n", i,
 			__atomic_load_n(&worker_stats[i].handled_packets,
 					__ATOMIC_RELAXED));
-	printf("Sanity test with non-zero hashes done\n");
+	printf("Test with non-zero hashes done\n");
 
 	rte_mempool_put_bulk(p, (void *)bufs, BURST);
 
-	/* sanity test with BIG_BATCH packets to ensure they all arrived back
+	/* test with BIG_BATCH packets to ensure they all arrived back
 	 * from the returned packets function */
 	clear_packet_count();
 	struct rte_mbuf *many_bufs[BIG_BATCH],

*return_bufs[BIG_BATCH]; @@ -288,7 +288,7 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)

app/test/test_distributor.c +3 -3
 			return -1;
 		}
 	}
-	printf("Sanity test of returned packets done\n");
+	printf("Test of returned packets done\n");
 
 	rte_mempool_put_bulk(p, (void *)many_bufs, BIG_BATCH);
@@ -326,20 +326,20 @@ handle_work_with_free_mbufs(void *arg)
 	return 0;
 }
 
-/* Perform a sanity test of the distributor with a large number of packets,
+/* Perform a test of the distributor with a large number of packets,
  * where we allocate a new set of mbufs for each burst. The workers then
  * free the mbufs. This ensures that we don't have any packet leaks in the
  * library.
  */
 static int
-sanity_test_with_mbuf_alloc(struct worker_params *wp, struct
 rte_mempool *p)
+basic_test_with_mbuf_alloc(struct worker_params *wp, struct

rte_mempool

app/test/test_distributor.c +2 -1
+*p)
 {
 	struct rte_distributor *d = wp->dist;
 	unsigned i;
 	struct rte_mbuf *bufs[BURST];
 	unsigned int processed;
 
-	printf("=== Sanity test with mbuf alloc/free (%s) ===\n", wp->name);
+	printf("=== Test with mbuf alloc/free (%s) ===\n", wp->name);
 
 	clear_packet_count();
 	for (i = 0; i < ((1<<ITER_POWER)); i += BURST) { @@ -367,7 +367,7

@@ sanity_test_with_mbuf_alloc(struct worker_params *wp, struct rte_mempool *p)

app/test/test_distributor.c +10 -10
 		return -1;
 	}
 
-	printf("Sanity test with mbuf alloc/free passed\n\n");
+	printf("Test with mbuf alloc/free passed\n\n");
 	return 0;
 }
@@ -433,13 +433,13 @@ handle_work_for_shutdown_test(void *arg)  }
 
 
-/* Perform a sanity test of the distributor with a large number of packets,
+/* Perform a test of the distributor with a large number of packets,
  * where we allocate a new set of mbufs for each burst. The workers then
  * free the mbufs. This ensures that we don't have any packet leaks in the
  * library.
  */
 static int
-sanity_test_with_worker_shutdown(struct worker_params *wp,
+basic_test_with_worker_shutdown(struct worker_params *wp,
 		struct rte_mempool *p)
 {
 	struct rte_distributor *d = wp->dist;
@@ -449,7 +449,7 @@ sanity_test_with_worker_shutdown(struct
 worker_params *wp,
 	unsigned int failed = 0;
 	unsigned int processed = 0;
 
-	printf("=== Sanity test of worker shutdown ===\n");
+	printf("=== Test of worker shutdown ===\n");
 
 	clear_packet_count();
@@ -515,7 +515,7 @@ sanity_test_with_worker_shutdown(struct
 worker_params *wp,
 	if (failed)
 		return -1;
 
-	printf("Sanity test with worker shutdown passed\n\n");
+	printf("Test with worker shutdown passed\n\n");
 	return 0;
 }
@@ -611,13 +611,13 @@ handle_and_mark_work(void *arg)
 	return 0;
 }
 
-/* sanity_mark_test sends packets to workers which mark them.
+/* mark_test sends packets to workers which mark them.
  * Every packet has also encoded sequence number.
  * The returned packets are sorted and verified if they were handled
  * by proper workers.
  */
 static int
-sanity_mark_test(struct worker_params *wp, struct rte_mempool *p)
+mark_test(struct worker_params *wp, struct rte_mempool *p)
 {
 	const unsigned int buf_count = 24;
 	const unsigned int burst = 8;
@@ -898,13 +898,13 @@ test_distributor(void)
 
 		rte_eal_mp_remote_launch(handle_work,
 				&worker_params, SKIP_MAIN);
-		if (sanity_test(&worker_params, p) < 0)
+		if (basic_test(&worker_params, p) < 0)
 			goto err;
 		quit_workers(&worker_params, p);
 
 
 	rte_eal_mp_remote_launch(handle_work_with_free_mbufs,
 				&worker_params, SKIP_MAIN);
-		if (sanity_test_with_mbuf_alloc(&worker_params, p) < 0)
+		if (basic_test_with_mbuf_alloc(&worker_params, p) < 0)
 			goto err;
 		quit_workers(&worker_params, p);
@@ -912,7 +912,7 @@ test_distributor(void)
 
 	rte_eal_mp_remote_launch(handle_work_for_shutdown_test,
 					&worker_params,
 					SKIP_MAIN);
-			if
 (sanity_test_with_worker_shutdown(&worker_params,
+			if
 (basic_test_with_worker_shutdown(&worker_params,
app/test/test_distributor.c +1 -1
 					p) < 0)
 				goto err;
 			quit_workers(&worker_params, p);
@@ -927,7 +927,7 @@ test_distributor(void)
 
 
 	rte_eal_mp_remote_launch(handle_and_mark_work,
 					&worker_params, SKIP_MAIN);
-			if (sanity_mark_test(&worker_params, p) < 0)
+			if (mark_test(&worker_params, p) < 0)
 				goto err;
 			quit_workers(&worker_params, p);
app/test/test_dmadev.c index renamed from app/test/test_dmadev.c +0 -0

7581fc2b4cb0..899786b345ed 100644

app/test/test_dmadev.c +1 -1
@@ -1087,7 +1087,7 @@ test_dma(void)
 
 	parse_dma_env_var();
 
-	/* basic sanity on dmadev infrastructure */
+	/* basic validation on dmadev infrastructure */
 	if (test_apis() < 0)
 		ERR_RETURN("Error performing API tests\n");
 
app/test/test_eal_flags.c index renamed from app/test/test_eal_flags.c +0 -0

6cb4b0675730..9c082ff91496 100644

app/test/test_eal_flags.c +8 -7
@@ -314,7 +314,7 @@ get_number_of_sockets(void)
 
 /*
  * Test that the app doesn't run with invalid allow option.
- * Final tests ensures it does run with valid options as sanity check (one
+ * Final tests ensures it does run with valid options as basic test
+ (one
  * test for with Domain+BDF, second for just with BDF)
  */
 static int
@@ -382,7 +382,7 @@ test_allow_flag(void)
 
 /*
  * Test that the app doesn't run with invalid blocklist option.
- * Final test ensures it does run with valid options as sanity check
+ * Final test ensures it does run with valid options as basic check.
  */
 static int
 test_invalid_b_flag(void)
@@ -429,7 +429,7 @@ test_invalid_b_flag(void)
 
 /*
  *  Test that the app doesn't run with invalid vdev option.
- *  Final test ensures it does run with valid options as sanity check
+ *  Final test ensures it does run with valid options basic check.
  */
 static int
 test_invalid_vdev_flag(void)
@@ -554,7 +554,7 @@ test_missing_c_flag(void)
 	/* bad coremask value */
 	const char *argv3[] = { prgname, prefix, mp_flag,
 				"-c", "error" };
-	/* sanity check of tests - valid coremask value */
+	/* check of tests - valid coremask value */
 	const char *argv4[] = { prgname, prefix, mp_flag,
 				"-c", "1" };
 	/* -l flag but no corelist value */
@@ -581,7 +581,7 @@ test_missing_c_flag(void)
 				"-l", RTE_STR(RTE_MAX_LCORE) };
 	const char * const argv14[] = { prgname, prefix, mp_flag,
 				"-l", "1-"RTE_STR(RTE_MAX_LCORE) };
-	/* sanity check test - valid corelist value */
+	/* check test - valid corelist value */
 	const char * const argv15[] = { prgname, prefix, mp_flag,
 				 "-l", "1-2,3" };
 
@@ -613,7 +613,7 @@ test_missing_c_flag(void)
 				 "--lcores", "(4-7)=(1,3)" };
 	const char * const argv28[] = { prgname, prefix, mp_flag,
 				 "--lcores", "[4-7]@(1,3)" };
-	/* sanity check of tests - valid lcores value */
+	/* more complex valid lcores value */
 	const char * const argv29[] = { prgname, prefix, mp_flag,
 				 "--lcores",
 				 "0-1,2@(5-7),(3-5)@(0,2),(0,6),7"};
@@ -744,7 +744,7 @@ test_main_lcore_flag(void)
 
 /*
  * Test that the app doesn't run with invalid -n flag option.
- * Final test ensures it does run with valid options as sanity check
+ * Final test ensures it does run with valid options as basic check.
  * Since -n is not compulsory for MP, we instead use --no-huge and --no-

shconf
* flags.
*/

app/test/test_eal_flags.c +3 -3
@@ -772,10 +772,10 @@ test_invalid_n_flag(void)
 	/* zero is invalid */
 	const char *argv3[] = { prgname, prefix, no_huge, no_shconf,
 				"-n", "0" };
-	/* sanity test - check with good value */
+	/* check with good value */
 	const char *argv4[] = { prgname, prefix, no_huge, no_shconf,
 				"-n", "2" };
-	/* sanity test - check with no -n flag */
+	/* check with no -n flag */
 	const char *argv5[] = { prgname, prefix, no_huge, no_shconf};
 
 	if (launch_proc(argv1) == 0
@@ -977,7 +977,7 @@ test_misc_flags(void)
 	 * All cases, apart from the first, app should run.
 	 * No further testing of output done.
 	 */
-	/* sanity check - failure with invalid option */
+	/* failure with invalid option */
 	const char *argv0[] = {prgname, prefix, mp_flag, "--invalid-opt"};
 
 	/* With --no-pci */
app/test/test_hash.c index renamed from app/test/test_hash.c +0 -0

d586878a2244..54e751b5eede 100644

app/test/test_hash.c +1 -1
@@ -1088,7 +1088,7 @@ fbk_hash_unit_test(void)
 		.socket_id = 0,
 	};
 
-	/* this is a sanity check for "same name" test
+	/* this is a check for "same name" test
 	 * creating this hash will check if we are actually able to create
 	 * multiple hashes with different names (instead of having just one).
 	 */
app/test/test_interrupts.c index renamed from app/test/test_interrupts.c +0 -0

3952f9685fd9..42b830e9368a 100644

app/test/test_interrupts.c +1 -1
@@ -48,7 +48,7 @@ static union intr_pipefds pfds;
  * Check if the interrupt handle is valid.
  */
 static inline int
-test_interrupt_handle_sanity_check(struct rte_intr_handle *intr_handle)
+test_interrupt_handle_check(struct rte_intr_handle *intr_handle)
 {
 	if (!intr_handle || rte_intr_fd_get(intr_handle) < 0)
 		return -1;
@@ -164,7 +164,7 @@ test_interrupt_handle_compare(struct

rte_intr_handle *intr_handle_l, #else
/* to be implemented for bsd later */
static inline int

app/test/test_interrupts.c +4 -3
-test_interrupt_handle_sanity_check(struct rte_intr_handle *intr_handle)
+test_interrupt_handle_check(struct rte_intr_handle *intr_handle)
 {
 	RTE_SET_USED(intr_handle);
@@ -215,7 +215,7 @@ test_interrupt_callback(void *arg)
 		return;
 	}
 
-	if (test_interrupt_handle_sanity_check(intr_handle) < 0) {
+	if (test_interrupt_handle_check(intr_handle) < 0) {
 		printf("null or invalid intr_handle for %s\n", __func__);
 		flag = -1;
 		return;
@@ -241,7 +241,8 @@ static void
 test_interrupt_callback_1(void *arg)
 {
 	struct rte_intr_handle *intr_handle = arg;
-	if (test_interrupt_handle_sanity_check(intr_handle) < 0) {
+
+	if (test_interrupt_handle_check(intr_handle) < 0) {
 		printf("null or invalid intr_handle for %s\n", __func__);
 		flag = -1;
 		return;
app/test/test_link_bonding_mode4.c +1 -1
index ff13dbed93f3..299b89f669ee 100644
@@ -224,7 +224,7 @@ add_member(struct member_conf *member,
 uint8_t start)
 	struct rte_ether_addr addr, addr_check;
 	int retval;
 
-	/* Some sanity check */
+	/* Some basic tests. */
 	RTE_VERIFY(test_params.member_ports <= member &&
 		member - test_params.member_ports <

(int)RTE_DIM(test_params.member_ports));

app/test/test_link_bonding_mode4.c +0 -0
 	RTE_VERIFY(member->bonding == 0);
app/test/test_mbuf.c index renamed from app/test/test_mbuf.c +0 -0

261c6e5d71e9..7c73880090d4 100644

app/test/test_mbuf.c +1 -1
@@ -1701,7 +1701,7 @@ test_mbuf_validate_tx_offload(const char
 *test_name,
 	struct rte_mbuf *m = NULL;
 	int ret = 0;
 
-	/* alloc a mbuf and do sanity check */
+	/* alloc a mbuf and do some basic checks */
 	m = rte_pktmbuf_alloc(pktmbuf_pool);
 	if (m == NULL)

GOTO_FAIL("%s: mbuf allocation failed!\n", __func__); diff --
git a/app/test/test_rawdev.c b/app/test/test_rawdev.c index d34691dacf5f..0d4f0ce1fa17 100644

app/test/test_rawdev.c test_rawdev_selftests(void) · line 53

Quoted 8 lines
app/test/test_rawdev.c +1 -1
@@ -47,7 +47,7 @@ test_rawdev_selftests(void)
 	int ret = 0;
 	int i;
 
-	/* basic sanity on rawdev infrastructure */
+	/* basic check on rawdev infrastructure */
 	if (test_rawdev_selftest_skeleton() < 0)
 		return -1;
 

[Hemant]

#101 lore raw

PATCH v5 4/19 examples: remove term sanity

In reply to Stephen Hemminger

Do not use non-inclusive terms.

---
 examples/ipsec-secgw/event_helper.c | 2 +-
 examples/qos_sched/args.c           | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
examples/ipsec-secgw/event_helper.c +1 -1
index 89fb7e62a5a3..f595b4fe01dc 100644
@@ -2100,7 +2100,7 @@ eh_launch_worker(struct eh_conf *conf, struct eh_app_worker_params *app_wrkr,
 		goto clean_and_exit;
 	}
 
-	/* Verify sanity of the matched worker */
+	/* Verify validity of the matched worker */
 	if (eh_verify_match_worker(match_wrkr) != 1) {
 		EH_LOG_ERR("Failed to validate the matched worker");
 		goto clean_and_exit;
examples/qos_sched/args.c +1 -1
index e97273152aa7..1d8ba9522586 100644
@@ -384,7 +384,7 @@ app_parse_args(int argc, char **argv)
 		return -1;
 	}
 
-	/* sanity check for cores assignment */
+	/* check for cores assignment */
 	for(i = 0; i < nb_pfc; i++) {
 		if (qos_conf[i].rx_core >= RTE_MAX_LCORE) {
 			RTE_LOG(ERR, APP, "pfc %u: invalid RX lcore index %u\n", i + 1,
Signature · 1 line
2.42.0
#102 lore raw

PATCH v5 5/19 lib: replace use of sanity check in comments and messages

In reply to Stephen Hemminger

Sanity check is on the Tier 2 non-inclusive list.
Replace or remove it.

---
 lib/graph/graph.c           | 2 +-
 lib/graph/graph_stats.c     | 2 +-
 lib/graph/node.c            | 2 +-
 lib/jobstats/rte_jobstats.c | 6 +++---
 lib/metrics/rte_metrics.c   | 2 +-
 lib/pcapng/rte_pcapng.c     | 2 +-
 6 files changed, 8 insertions(+), 8 deletions(-)
lib/graph/graph.c +1 -1
index 26f0968a978d..e51dcc30568e 100644
@@ -344,7 +344,7 @@ rte_graph_create(const char *name, struct rte_graph_param *prm)
 
 	graph_spinlock_lock();
 
-	/* Check arguments sanity */
+	/* Check argument validity */
 	if (prm == NULL)
 		SET_ERR_JMP(EINVAL, fail, "Param should not be NULL");
 
lib/graph/graph_stats.c +1 -1
index cc32245c0593..cfb30ae07497 100644
@@ -317,7 +317,7 @@ rte_graph_cluster_stats_create(const struct rte_graph_cluster_stats_param *prm)
 	const char *pattern;
 	rte_graph_t i;
 
-	/* Sanity checks */
+	/* Validate arguments */
 	if (!rte_graph_has_stats_feature())
 		SET_ERR_JMP(EINVAL, fail, "Stats feature is not enabled");
 
lib/graph/node.c +1 -1
index 99a962277964..c238d140ed31 100644
@@ -68,7 +68,7 @@ __rte_node_register(const struct rte_node_register *reg)
 
 	graph_spinlock_lock();
 
-	/* Check sanity */
+	/* Check argument validity */
 	if (reg == NULL || reg->process == NULL) {
 		rte_errno = EINVAL;
 		goto fail;
lib/jobstats/rte_jobstats.c +3 -3
index af565a14eaf3..1c4b280c952a 100644
@@ -124,7 +124,7 @@ rte_jobstats_start(struct rte_jobstats_context *ctx, struct rte_jobstats *job)
 {
 	uint64_t now;
 
-	/* Some sanity check. */
+	/* Check validity of arguments. */
 	if (unlikely(ctx == NULL || job == NULL || job->context != NULL))
 		return -EINVAL;
 
@@ -144,7 +144,7 @@ rte_jobstats_abort(struct rte_jobstats *job)
 	struct rte_jobstats_context *ctx;
 	uint64_t now, exec_time;
 
-	/* Some sanity check. */
+	/* Check that arguments are valid */
 	if (unlikely(job == NULL || job->context == NULL))
 		return -EINVAL;
 
@@ -165,7 +165,7 @@ rte_jobstats_finish(struct rte_jobstats *job, int64_t job_value)
 	uint64_t now, exec_time;
 	int need_update;
 
-	/* Some sanity check. */
+	/* Check arguments */
 	if (unlikely(job == NULL || job->context == NULL))
 		return -EINVAL;
 
lib/metrics/rte_metrics.c +1 -1
index 0ccdbabc04eb..f60d4f3f6e25 100644
@@ -120,7 +120,7 @@ rte_metrics_reg_names(const char * const *names, uint16_t cnt_names)
 	uint16_t idx_name;
 	uint16_t idx_base;
 
-	/* Some sanity checks */
+	/* Some consistency checks */
 	if (cnt_names < 1 || names == NULL)
 		return -EINVAL;
 	for (idx_name = 0; idx_name < cnt_names; idx_name++)
lib/pcapng/rte_pcapng.c +1 -1
index f74ec939a9f8..0de0a231693e 100644
@@ -619,7 +619,7 @@ rte_pcapng_write_packets(rte_pcapng_t *self,
 		struct pcapng_enhance_packet_block *epb;
 		uint64_t cycles, timestamp;
 
-		/* sanity check that is really a pcapng mbuf */
+		/* Check that is really a pcapng mbuf */
 		epb = rte_pktmbuf_mtod(m, struct pcapng_enhance_packet_block *);
 		if (unlikely(epb->block_type != PCAPNG_ENHANCED_PACKET_BLOCK ||
 			     epb->block_length != rte_pktmbuf_data_len(m))) {
Signature · 1 line
2.42.0
#103 lore raw

PATCH v5 6/19 doc/eventdev_pipeline: remove sanity

In reply to Stephen Hemminger

The word sanity check is unnecessary here.

---
 doc/guides/gpus/cuda.rst                       | 2 +-
 doc/guides/sample_app_ug/eventdev_pipeline.rst | 2 +-
 doc/guides/tools/testbbdev.rst                 | 8 ++++----
 3 files changed, 6 insertions(+), 6 deletions(-)
doc/guides/gpus/cuda.rst +1 -1
index 6520c17c3ea4..c523da1f3e9d 100644
@@ -80,7 +80,7 @@ Similarly to CUDA shared library, if the **libgdrapi.so** shared library
 is not installed in default locations (e.g. /usr/local/lib),
 you can use the variable ``GDRCOPY_PATH_L``.
 
-As an example, to enable the CPU map feature sanity check,
+As an example, to enable the CPU map feature check,
 run the ``app/test-gpudev`` application with:
 
 .. code-block:: console
doc/guides/sample_app_ug/eventdev_pipeline.rst +1 -1
index 19ff53803ede..e7787fb26609 100644
@@ -50,7 +50,7 @@ these settings is shown below:
     ./<build_dir>/examples/dpdk-eventdev_pipeline -l 0,2,8-15 --vdev event_sw0 \
     -- -r1 -t1 -e4 -w FF00 -s4 -n0 -c32 -W1000 -D
 
-The application has some sanity checking built-in, so if there is a function
+The application has some internal validation, so if there is a function
 (e.g.; the RX core) which doesn't have a cpu core mask assigned, the application
 will print an error message:
 
doc/guides/tools/testbbdev.rst +4 -4
index ddb8d787be6f..baaf9d115dda 100644
@@ -9,7 +9,7 @@ dpdk-test-bbdev Application
 The ``dpdk-test-bbdev`` tool is a Data Plane Development Kit (DPDK) utility that
 allows measuring performance parameters of PMDs available in the bbdev framework.
 Tests available for execution are: latency, throughput, validation,
-bler and sanity tests. Execution of tests can be customized using various
+bler and basic functionality. Execution of tests can be customized using various
 parameters passed to a python running script.
 
 
@@ -97,8 +97,8 @@ Test Cases
 
 There are 7 main test cases that can be executed using testbbdev tool:
 
-* Sanity checks [-c unittest]
-    - Performs sanity checks on BBDEV interface, validating basic functionality
+* Functional checks [-c unittest]
+    - Performs checks on BBDEV interface, validating basic functionality
 
 * Validation tests [-c validation]
     - Performs full operation of enqueue and dequeue
@@ -232,7 +232,7 @@ vector name refer more explicitly processing specificity such as
 is purely read/written for external DDR, lbrm when limited buffer
 rate matching is expected, or crc_fail when a CRC failure is expected.
 They are chosen to have a good coverage across sizes and processing
-parameters while still keeping their number limited as part of sanity
+parameters while still keeping their number limited as part of functional
 regression.
 
 Shortened tree of isg_cid-wireless_dpdk_ae with dpdk compiled and output
Signature · 1 line
2.42.0
#104 lore raw

PATCH v5 7/19 net/ring: replace use of sanity

In reply to Stephen Hemminger

Don't use term sanity check

---
 drivers/net/ring/rte_eth_ring.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/net/ring/rte_eth_ring.c +2 -5
index 48953dd7a059..710fd9ebe526 100644
@@ -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 {
@@ -606,10 +606,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)
Signature · 1 line
2.42.0
#105 lore raw

PATCH v5 8/19 net/fm10k, net/ixgbe: remove word sanity

In reply to Stephen Hemminger

Remove non-inclusive term sanity from these Intel drivers.

---
 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 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
drivers/net/fm10k/fm10k_ethdev.c +1 -1
index 4d3c4c10cfa4..894cf8c8a6b5 100644
@@ -1757,7 +1757,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;
 
drivers/net/fm10k/fm10k_rxtx.c +1 -1
index c0841ab8cb34..94345299b22a 100644
@@ -647,7 +647,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;
drivers/net/ixgbe/ixgbe_fdir.c +1 -1
index 06d6e2126de5..51bbf577e3fe 100644
@@ -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.
drivers/net/ixgbe/ixgbe_ipsec.c +1 -1
index d3313085560d..d4aa3e9ede8e 100644
@@ -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;
drivers/net/ixgbe/ixgbe_rxtx.c +1 -1
index 90b0a7004f50..0e53b8a73a18 100644
@@ -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;
Signature · 1 line
2.42.0
#106 lore raw

PATCH v5 9/19 net/mlx[45]: remove word sanity

In reply to Stephen Hemminger

The term "sanity" is on non-inclusive naming list. Remove it from the Nvidia drivers.

---
 drivers/common/mlx5/linux/mlx5_common_os.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 +-
 7 files changed, 10 insertions(+), 12 deletions(-)
drivers/common/mlx5/linux/mlx5_common_os.c +1 -1
index 41345e1597a4..2caa1a1da0b6 100644
@@ -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]
drivers/net/mlx4/mlx4.c +1 -1
index a1a7e9328848..c167d7f90f97 100644
@@ -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]
drivers/net/mlx4/mlx4_flow.c +3 -3
index 8ef9fd2db44e..25b185d8710c 100644
@@ -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)
drivers/net/mlx5/mlx5_flow_dv.c +1 -1
index 115d7303172d..254dc521c78e 100644
@@ -8820,7 +8820,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
drivers/net/mlx5/mlx5_flow_hw.c +2 -4
index da873ae2e243..69bf3c51f886 100644
@@ -7453,11 +7453,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;
@@ -7469,12 +7468,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;
drivers/net/mlx5/mlx5_rxq.c +1 -1
index 1bb036afebb3..fbe5cfd30201 100644
@@ -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.
 	 * CACHE_FLUSHTHRESH_MULTIPLIER is defined in a C file, so using a
 	 * constant number 2 instead.
drivers/net/mlx5/mlx5_rxtx_vec.h +1 -1
index 77c3f4efa019..f8376f2b55b4 100644
@@ -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) \
Signature · 1 line
2.42.0
Acked-by on v5 9/19
#107 lore raw

RE: [PATCH v5 09/19] net/mlx[45]: remove word sanity

Quoted 14 lines

-----Original Message-----
From: Stephen Hemminger <[email protected]>
Sent: Wednesday, November 29, 2023 18:26
To: [email protected]
Cc: Stephen Hemminger <[email protected]>; Dariusz Sosnowski <[email protected]>; Slava Ovsiienko <[email protected]>; Ori Kam <[email protected]>; Suanming Mou <[email protected]>; Matan Azrad <[email protected]>
Subject: [PATCH v5 09/19] net/mlx[45]: remove word sanity

The term "sanity" is on non-inclusive naming list. Remove it from the Nvidia drivers.

Quoted 9 lines
---
 drivers/common/mlx5/linux/mlx5_common_os.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 +-
 7 files changed, 10 insertions(+), 12 deletions(-)

Thank you.

#108 lore raw

PATCH v5 10/19 net/sfc: remove term "sanity check"

In reply to Stephen Hemminger

Remove term sanity check in comment.

---
 drivers/net/sfc/sfc_dp_rx.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/sfc/sfc_dp_rx.h +1 -1
index 9f9bf2898881..dfb4fb98844b 100644
@@ -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;
 
Signature · 1 line
2.42.0
#109 lore raw

PATCH v5 11/19 net/ark: replace use of term sanity

In reply to Stephen Hemminger

Do not use non inclusive terms.

---
 drivers/net/ark/ark_ethdev.c    | 8 ++++----
 drivers/net/ark/ark_ethdev_rx.c | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)
drivers/net/ark/ark_ethdev.c +4 -4
index 0ffd4b9e9e4a..68edb542db43 100644
@@ -346,10 +346,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__);
@@ -357,7 +357,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__);
 
@@ -587,7 +587,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);
drivers/net/ark/ark_ethdev_rx.c +1 -1
index 24f1c65690eb..8ac9d904e795 100644
@@ -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)) {
Signature · 1 line
2.42.0
#110 lore raw

PATCH v5 12/19 net/bnxt: replace use of term sanity

In reply to Stephen Hemminger

Do not use non-inclusive terms.

---
 drivers/net/bnxt/bnxt_hwrm.c           | 2 +-
 drivers/net/bnxt/hsi_struct_def_dpdk.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/bnxt/bnxt_hwrm.c +1 -1
index 06f196760fa8..e1254375b650 100644
@@ -262,7 +262,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 */
drivers/net/bnxt/hsi_struct_def_dpdk.h +1 -1
index 9afdd056ce7a..a8076a6fc223 100644
@@ -55482,7 +55482,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 {
Signature · 1 line
2.42.0
Reviewed-by on v5 12/19
#111 lore raw

Re: [PATCH v5 12/19] net/bnxt: replace use of term sanity

Quoted 36 lines · Stephen Hemminger

Do not use non-inclusive terms.

---
 drivers/net/bnxt/bnxt_hwrm.c           | 2 +-
 drivers/net/bnxt/hsi_struct_def_dpdk.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/bnxt/bnxt_hwrm.c +1 -1
index 06f196760fa8..e1254375b650 100644
@@ -262,7 +262,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 */
drivers/net/bnxt/hsi_struct_def_dpdk.h +1 -2
index 9afdd056ce7a..a8076a6fc223 100644
@@ -55482,7 +55482,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 {
--
Quoted 2 lines

2.42.0

#112 lore raw

PATCH v5 13/19 net/bnx2x: remove reference to sanity

In reply to Stephen Hemminger

Replace "sanity check"

---
 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 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)
drivers/net/bnx2x/bnx2x.c +1 -1
index c3283c94f38f..e345f293f25c 100644
@@ -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,
drivers/net/bnx2x/bnx2x_stats.c +4 -4
index c07b01510a06..86d90679ac0a 100644
@@ -187,7 +187,7 @@ bnx2x_stats_pmf_update(struct bnx2x_softc *sc)
 		 */
 		return;
 	}
-	/* sanity */
+	/* input valid? */
 	if (!sc->port.pmf || !sc->port.port_stx) {
 		PMD_DRV_LOG(ERR, sc, "BUG!");
 		return;
@@ -237,7 +237,7 @@ bnx2x_port_stats_init(struct bnx2x_softc *sc)
     uint32_t mac_addr;
     uint32_t *stats_comp = BNX2X_SP(sc, stats_comp);
 
-    /* sanity */
+    /* input valid? */
     if (!sc->link_vars.link_up || !sc->port.pmf) {
 	PMD_DRV_LOG(ERR, sc, "BUG!");
 	return;
@@ -461,7 +461,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 valid? */
     if (!sc->func_stx) {
 	PMD_DRV_LOG(ERR, sc, "BUG!");
 	return;
@@ -1301,7 +1301,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 valid? */
     if (!sc->port.pmf || !sc->port.port_stx) {
 	PMD_DRV_LOG(ERR, sc, "BUG!");
 	return;
drivers/net/bnx2x/ecore_sp.c +1 -1
index c6c3857778f7..158205266f62 100644
@@ -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;
 
drivers/net/bnx2x/elink.c +2 -2
index 2c81f85b9605..6ebd47d927f8 100644
@@ -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;
Signature · 1 line
2.42.0
#113 lore raw

PATCH v5 14/19 cnxk: replace term sanity

In reply to Stephen Hemminger

Do not use non-inclusive naming.

---
 drivers/common/cnxk/roc_nix_tm_ops.c | 2 +-
 drivers/common/cnxk/roc_npa.c        | 4 ++--
 drivers/net/cnxk/cnxk_ethdev.c       | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)
drivers/common/cnxk/roc_nix_tm_ops.c +1 -1
index e1cef7a670b6..6060dba0d799 100644
@@ -527,7 +527,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)
drivers/common/cnxk/roc_npa.c +2 -2
index 6c14c499019a..5e38ecf0414e 100644
@@ -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;
@@ -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;
 
drivers/net/cnxk/cnxk_ethdev.c +2 -2
index 5e11bbb017ea..798567592efe 100644
@@ -636,7 +636,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;
@@ -1205,7 +1205,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;
Signature · 1 line
2.42.0
#114 lore raw

PATCH v5 15/19 event/opdl: remove term sanity

In reply to Stephen Hemminger

Don't use non-inclusive term.

---
 drivers/event/opdl/opdl_evdev.c      | 2 +-
 drivers/event/opdl/opdl_evdev_init.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/event/opdl/opdl_evdev.c +1 -1
index 0cccaf7e9731..39cd87b8f944 100644
@@ -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",
drivers/event/opdl/opdl_evdev_init.c +1 -1
index be3437fc2f40..12eb2695f5de 100644
@@ -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));
Signature · 1 line
2.42.0
#115 lore raw

PATCH v5 16/19 net/txgbe: replace term sanity

In reply to Stephen Hemminger

Don't use term sanity.

---
 drivers/net/txgbe/txgbe_ipsec.c | 2 +-
 drivers/net/txgbe/txgbe_rxtx.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/txgbe/txgbe_ipsec.c +1 -1
index f9f8108fb894..cadb0943c82d 100644
@@ -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;
drivers/net/txgbe/txgbe_rxtx.c +1 -1
index 1cd4b25965b5..5d45d8763dc9 100644
@@ -4115,7 +4115,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;
Signature · 1 line
2.42.0
#116 lore raw

PATCH v5 17/19 net/cxgbe: remove use of term sanity

In reply to Stephen Hemminger

Remove non-inclusive terminolgy.

---
 drivers/net/cxgbe/cxgbe_ethdev.c | 10 ++--------
 drivers/net/cxgbe/cxgbevf_main.c |  4 ++--
 2 files changed, 4 insertions(+), 10 deletions(-)
drivers/net/cxgbe/cxgbe_ethdev.c +2 -8
index 8cc3d9f257a0..c7c745fee495 100644
@@ -524,10 +524,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",
@@ -648,10 +645,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",
drivers/net/cxgbe/cxgbevf_main.c +2 -2
index d0c93f8ac3a5..dfb12b4ed5c9 100644
@@ -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"
Signature · 1 line
2.42.0
#117 lore raw

PATCH v5 18/19 crypto/bcmfs: replace term sanity check

In reply to Stephen Hemminger

Do not use non-inclusive naming here.

---
 drivers/crypto/bcmfs/hw/bcmfs4_rm.c | 6 +++---
 drivers/crypto/bcmfs/hw/bcmfs5_rm.c | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)
drivers/crypto/bcmfs/hw/bcmfs4_rm.c +3 -3
index 9a30c654dab8..051bbea9cc81 100644
@@ -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;
 	}
drivers/crypto/bcmfs/hw/bcmfs5_rm.c +3 -3
index cbfe42cb4713..2df10a302841 100644
@@ -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;
 	}
Signature · 1 line
2.42.0