From patchwork Thu May 18 16:45:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 127024 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id DB5DF42B34; Thu, 18 May 2023 18:45:59 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6D5C142D39; Thu, 18 May 2023 18:45:52 +0200 (CEST) Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) by mails.dpdk.org (Postfix) with ESMTP id 141EA42BAC for ; Thu, 18 May 2023 18:45:51 +0200 (CEST) Received: by mail-pf1-f173.google.com with SMTP id d2e1a72fcca58-64cfb8d33a5so1278432b3a.2 for ; Thu, 18 May 2023 09:45:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1684428350; x=1687020350; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=C2nbe45OSvmWrHcvrvikjf5lcWuBanmH1ysK1j18/hI=; b=plBVks4ylRX+W7sDCJJTUcT+VI+gI3t6dV6V7dparCCQkjRmsuJgu2BG6p+OK4OrIa p71vTrjJbZXehXmspXwGSErdxguB13HpybxwwQZ1QC30VCI6vM50gpaCv3mBYhhTGcQa okPGMGj0leNzU85N83SgNoV2wmr9wcpb9ADmb4+NFE4rT0cqc8GPjAF7O8qHeluMV7yP JQnV9aOtkLKkgLQI/Wn/fxV+GEogsCUUbVOHr427jZAni2a0KI9mBtZDiRnVznkHxx0X Zv6/5qJl+zyhuSCw5NQPAR6MOfvo5tyYxAa+ymK7kBE0s0MCDpNFK4Yy1DmiN9QvuLJs q/XQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684428350; x=1687020350; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=C2nbe45OSvmWrHcvrvikjf5lcWuBanmH1ysK1j18/hI=; b=GxtQlooTxj/Ys3Ija0yPxK2Qoj8HItolWrGp4usnnJd9a2F/cvrBnl1tSEuh0gnsVv i3xFPVcXFpGtNbNibZ0KJpaMa6Utg0/z/k8qB8nceA9gO+5DWWuQyOgp3E9S+tac9UQt L/ptNlUxTLa8gYIGXVgG06DosN/eW1M7eDkUGWQlq/A9NR6Z2qt2VNGTYaZCffb+DFx4 eE0uXHqSqrgg9ZUq2sXa8CaZQi8a6lbF/Ibd7L7Fiq04qgajRT2IHYP1uOAZasjofSyq lKIQTk13uWUD65anFB1f7A6RlTvedVfTKx1gFDhj72d7K0gBJQo3789ZA4/ThjYu8Cbc n5sw== X-Gm-Message-State: AC+VfDxlbh720wS8kKtFtwli81X8K9o1BYdIv4jKJVfFvDb9dqS6h7aS PeA2woknzbeFZkiXvyrHkX5octtOsKbh5dHXAr/Fe0Wv X-Google-Smtp-Source: ACHHUZ6gH5+53RFCAyPz10sxoWWi3V1MBrxqrDC1Qwm9/ZlBEHk5E41wi8YcOnmFAw+NWyYqhchu2A== X-Received: by 2002:a05:6a00:24d3:b0:63b:8eeb:77b8 with SMTP id d19-20020a056a0024d300b0063b8eeb77b8mr5755432pfv.13.1684428349673; Thu, 18 May 2023 09:45:49 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id j7-20020a62e907000000b005e0699464e3sm1513579pfh.206.2023.05.18.09.45.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 May 2023 09:45:49 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Olivier Matz , Steven Webster , Matt Peters , Andrew Rybchenko Subject: [PATCH v2 01/19] mbuf: replace term sanity check Date: Thu, 18 May 2023 09:45:28 -0700 Message-Id: <20230518164546.108105-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230518164546.108105-1-stephen@networkplumber.org> References: <20230517161603.117728-1-stephen@networkplumber.org> <20230518164546.108105-1-stephen@networkplumber.org> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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. Signed-off-by: Stephen Hemminger --- 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(-) diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c index 8d8d3b9386ce..c2716dc4e5fe 100644 --- a/app/test/test_mbuf.c +++ b/app/test/test_mbuf.c @@ -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; } diff --git a/doc/guides/prog_guide/mbuf_lib.rst b/doc/guides/prog_guide/mbuf_lib.rst index 049357c75563..0accb51a98c7 100644 --- a/doc/guides/prog_guide/mbuf_lib.rst +++ b/doc/guides/prog_guide/mbuf_lib.rst @@ -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 --------- diff --git a/drivers/net/avp/avp_ethdev.c b/drivers/net/avp/avp_ethdev.c index b2a08f563542..b402c7a2ad16 100644 --- a/drivers/net/avp/avp_ethdev.c +++ b/drivers/net/avp/avp_ethdev.c @@ -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 */ diff --git a/drivers/net/sfc/sfc_ef100_rx.c b/drivers/net/sfc/sfc_ef100_rx.c index 16cd8524d32f..fe8920b12590 100644 --- a/drivers/net/sfc/sfc_ef100_rx.c +++ b/drivers/net/sfc/sfc_ef100_rx.c @@ -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; diff --git a/drivers/net/sfc/sfc_ef10_essb_rx.c b/drivers/net/sfc/sfc_ef10_essb_rx.c index 78bd430363b1..de80be462a0f 100644 --- a/drivers/net/sfc/sfc_ef10_essb_rx.c +++ b/drivers/net/sfc/sfc_ef10_essb_rx.c @@ -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; } diff --git a/drivers/net/sfc/sfc_ef10_rx.c b/drivers/net/sfc/sfc_ef10_rx.c index 7be224c9c412..f6c2345d2b74 100644 --- a/drivers/net/sfc/sfc_ef10_rx.c +++ b/drivers/net/sfc/sfc_ef10_rx.c @@ -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; diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c index 5ea98187c3b4..d9f99a9d583d 100644 --- a/drivers/net/sfc/sfc_rx.c +++ b/drivers/net/sfc/sfc_rx.c @@ -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; diff --git a/examples/ipv4_multicast/main.c b/examples/ipv4_multicast/main.c index 6d0a8501eff5..f39658f4e249 100644 --- a/examples/ipv4_multicast/main.c +++ b/examples/ipv4_multicast/main.c @@ -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. */ diff --git a/lib/mbuf/rte_mbuf.c b/lib/mbuf/rte_mbuf.c index 686e797c80c4..56fb6c846df6 100644 --- a/lib/mbuf/rte_mbuf.c +++ b/lib/mbuf/rte_mbuf.c @@ -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 *), diff --git a/lib/mbuf/rte_mbuf.h b/lib/mbuf/rte_mbuf.h index 913c459b1cc6..f3b62009accf 100644 --- a/lib/mbuf/rte_mbuf.h +++ b/lib/mbuf/rte_mbuf.h @@ -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 */ +#define __rte_mbuf_verify(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 */ +#define __rte_mbuf_verify(m, is_h) do { } while (0) #endif /* RTE_LIBRTE_MBUF_DEBUG */ @@ -514,10 +514,9 @@ rte_mbuf_ext_refcnt_update(struct rte_mbuf_ext_shared_info *shinfo, /** - * Sanity checks on an mbuf. + * Check that the mbuf is valid and panic if corrupted. * - * Check the consistency of the given mbuf. The function will cause a - * panic if corruption is detected. + * Acts assertion that mbuf is consistent. If not it calls rte_panic(). * * @param m * The mbuf to be checked. @@ -526,13 +525,17 @@ 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_verify(const struct rte_mbuf *m, int is_header); + +/* Older deprecated name for rte_mbuf_verify() */ +void __rte_deprecated rte_mbuf_sanity_check(const struct rte_mbuf *m, int is_header); /** - * Sanity checks on a mbuf. + * Do consistency checks on a mbuf. * - * Almost like rte_mbuf_sanity_check(), but this function gives the reason - * if corruption is detected rather than panic. + * Check the consistency of the given mbuf and if not valid + * return the reason. * * @param m * The mbuf to be checked. @@ -551,7 +554,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. * * Check the consistency of the given reinitialized mbuf. * The function will cause a panic if corruption is detected. @@ -563,16 +566,16 @@ int rte_mbuf_check(const struct rte_mbuf *m, int is_header, * The mbuf to be checked. */ static __rte_always_inline void -__rte_mbuf_raw_sanity_check(__rte_unused const struct rte_mbuf *m) +__rte_mbuf_raw_validate(__rte_unused const struct rte_mbuf *m) { RTE_ASSERT(rte_mbuf_refcnt_read(m) == 1); RTE_ASSERT(m->next == NULL); RTE_ASSERT(m->nb_segs == 1); - __rte_mbuf_sanity_check(m, 0); + __rte_mbuf_verify(m, 0); } /** For backwards compatibility. */ -#define MBUF_RAW_ALLOC_CHECK(m) __rte_mbuf_raw_sanity_check(m) +#define MBUF_RAW_ALLOC_CHECK(m) __rte_mbuf_raw_validate(m) /** * Allocate an uninitialized mbuf from mempool *mp*. @@ -599,7 +602,7 @@ static inline struct rte_mbuf *rte_mbuf_raw_alloc(struct rte_mempool *mp) if (rte_mempool_get(mp, (void **)&m) < 0) return NULL; - __rte_mbuf_raw_sanity_check(m); + __rte_mbuf_raw_validate(m); return m; } @@ -622,7 +625,7 @@ rte_mbuf_raw_free(struct rte_mbuf *m) { RTE_ASSERT(!RTE_MBUF_CLONED(m) && (!RTE_MBUF_HAS_EXTBUF(m) || RTE_MBUF_HAS_PINNED_EXTBUF(m))); - __rte_mbuf_raw_sanity_check(m); + __rte_mbuf_raw_validate(m); rte_mempool_put(m->pool, m); } @@ -886,7 +889,7 @@ static inline void rte_pktmbuf_reset(struct rte_mbuf *m) rte_pktmbuf_reset_headroom(m); m->data_len = 0; - __rte_mbuf_sanity_check(m, 1); + __rte_mbuf_verify(m, 1); } /** @@ -942,22 +945,22 @@ static inline int rte_pktmbuf_alloc_bulk(struct rte_mempool *pool, switch (count % 4) { case 0: while (idx != count) { - __rte_mbuf_raw_sanity_check(mbufs[idx]); + __rte_mbuf_raw_validate(mbufs[idx]); rte_pktmbuf_reset(mbufs[idx]); idx++; /* fall-through */ case 3: - __rte_mbuf_raw_sanity_check(mbufs[idx]); + __rte_mbuf_raw_validate(mbufs[idx]); rte_pktmbuf_reset(mbufs[idx]); idx++; /* fall-through */ case 2: - __rte_mbuf_raw_sanity_check(mbufs[idx]); + __rte_mbuf_raw_validate(mbufs[idx]); rte_pktmbuf_reset(mbufs[idx]); idx++; /* fall-through */ case 1: - __rte_mbuf_raw_sanity_check(mbufs[idx]); + __rte_mbuf_raw_validate(mbufs[idx]); rte_pktmbuf_reset(mbufs[idx]); idx++; /* fall-through */ @@ -1185,8 +1188,8 @@ static inline void rte_pktmbuf_attach(struct rte_mbuf *mi, struct rte_mbuf *m) mi->pkt_len = mi->data_len; mi->nb_segs = 1; - __rte_mbuf_sanity_check(mi, 1); - __rte_mbuf_sanity_check(m, 0); + __rte_mbuf_verify(mi, 1); + __rte_mbuf_verify(m, 0); } /** @@ -1341,7 +1344,7 @@ static inline int __rte_pktmbuf_pinned_extbuf_decref(struct rte_mbuf *m) static __rte_always_inline struct rte_mbuf * rte_pktmbuf_prefree_seg(struct rte_mbuf *m) { - __rte_mbuf_sanity_check(m, 0); + __rte_mbuf_verify(m, 0); if (likely(rte_mbuf_refcnt_read(m) == 1)) { @@ -1412,7 +1415,7 @@ static inline void rte_pktmbuf_free(struct rte_mbuf *m) struct rte_mbuf *m_next; if (m != NULL) - __rte_mbuf_sanity_check(m, 1); + __rte_mbuf_verify(m, 1); while (m != NULL) { m_next = m->next; @@ -1493,7 +1496,7 @@ rte_pktmbuf_copy(const struct rte_mbuf *m, struct rte_mempool *mp, */ static inline void rte_pktmbuf_refcnt_update(struct rte_mbuf *m, int16_t v) { - __rte_mbuf_sanity_check(m, 1); + __rte_mbuf_verify(m, 1); do { rte_mbuf_refcnt_update(m, v); @@ -1510,7 +1513,7 @@ static inline void rte_pktmbuf_refcnt_update(struct rte_mbuf *m, int16_t v) */ static inline uint16_t rte_pktmbuf_headroom(const struct rte_mbuf *m) { - __rte_mbuf_sanity_check(m, 0); + __rte_mbuf_verify(m, 0); return m->data_off; } @@ -1524,7 +1527,7 @@ static inline uint16_t rte_pktmbuf_headroom(const struct rte_mbuf *m) */ static inline uint16_t rte_pktmbuf_tailroom(const struct rte_mbuf *m) { - __rte_mbuf_sanity_check(m, 0); + __rte_mbuf_verify(m, 0); return (uint16_t)(m->buf_len - rte_pktmbuf_headroom(m) - m->data_len); } @@ -1539,7 +1542,7 @@ static inline uint16_t rte_pktmbuf_tailroom(const struct rte_mbuf *m) */ static inline struct rte_mbuf *rte_pktmbuf_lastseg(struct rte_mbuf *m) { - __rte_mbuf_sanity_check(m, 1); + __rte_mbuf_verify(m, 1); while (m->next != NULL) m = m->next; return m; @@ -1583,7 +1586,7 @@ static inline struct rte_mbuf *rte_pktmbuf_lastseg(struct rte_mbuf *m) static inline char *rte_pktmbuf_prepend(struct rte_mbuf *m, uint16_t len) { - __rte_mbuf_sanity_check(m, 1); + __rte_mbuf_verify(m, 1); if (unlikely(len > rte_pktmbuf_headroom(m))) return NULL; @@ -1618,7 +1621,7 @@ static inline char *rte_pktmbuf_append(struct rte_mbuf *m, uint16_t len) void *tail; struct rte_mbuf *m_last; - __rte_mbuf_sanity_check(m, 1); + __rte_mbuf_verify(m, 1); m_last = rte_pktmbuf_lastseg(m); if (unlikely(len > rte_pktmbuf_tailroom(m_last))) @@ -1646,7 +1649,7 @@ static inline char *rte_pktmbuf_append(struct rte_mbuf *m, uint16_t len) */ static inline char *rte_pktmbuf_adj(struct rte_mbuf *m, uint16_t len) { - __rte_mbuf_sanity_check(m, 1); + __rte_mbuf_verify(m, 1); if (unlikely(len > m->data_len)) return NULL; @@ -1678,7 +1681,7 @@ static inline int rte_pktmbuf_trim(struct rte_mbuf *m, uint16_t len) { struct rte_mbuf *m_last; - __rte_mbuf_sanity_check(m, 1); + __rte_mbuf_verify(m, 1); m_last = rte_pktmbuf_lastseg(m); if (unlikely(len > m_last->data_len)) @@ -1700,7 +1703,7 @@ static inline int rte_pktmbuf_trim(struct rte_mbuf *m, uint16_t len) */ static inline int rte_pktmbuf_is_contiguous(const struct rte_mbuf *m) { - __rte_mbuf_sanity_check(m, 1); + __rte_mbuf_verify(m, 1); return m->nb_segs == 1; } diff --git a/lib/mbuf/version.map b/lib/mbuf/version.map index ed486ed14ec7..f134946f3d8d 100644 --- a/lib/mbuf/version.map +++ b/lib/mbuf/version.map @@ -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; From patchwork Thu May 18 16:45:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 127025 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 92E9642B34; Thu, 18 May 2023 18:46:07 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8A42442D3E; Thu, 18 May 2023 18:45:55 +0200 (CEST) Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by mails.dpdk.org (Postfix) with ESMTP id 5328842D31 for ; Thu, 18 May 2023 18:45:52 +0200 (CEST) Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-64d18d772bdso1057075b3a.3 for ; Thu, 18 May 2023 09:45:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1684428351; x=1687020351; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=rkmP4yDVJq3cPKNDtzkeSFvJIe3Chqiof/Cw6G7obf8=; b=geNP1WmeebzV9CMsFuCBCe8vNyGQcCZjadKX1pd9m4Y4OtOyrFYjgIbRK9Evjgzg4m fHUTUv/6GtBjRMu1s9103aeVL6RW1WZUTyf0WNr05NSnWbDPhcclF5pHpbL0ph8VsF1w dXNv7rSCLHAdElXLn/gSHyK4+9VSWlIM0wizY+VJZbj6Cej2b8ryB7dQaciy1/sC4f7G xfxrSYnXYxziUgWKLlDDWdMQiSzMKtjukrb48Btw51fkiiu1RQPKPjmAk3ESVMvzSZNX XyAqdU9q3/sF20nn3NDNk/e0G9Ci3RLwi1CiRmTEv7R3iPTerriSO3QKb2EUqkdYubk+ OXTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684428351; x=1687020351; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rkmP4yDVJq3cPKNDtzkeSFvJIe3Chqiof/Cw6G7obf8=; b=GrG1Ns9d9u8OMcm1hF+6otSOY5rl2D6cddNU53hqqtN+qrBa/hjxrTjxiOaPDTO8b1 Wq9OXEjfqqbBVoYF7QcIwWowi0n2yg4bMmsqfsc/smYBsy/Lahl/Jf7BFcg+TzEd4+Ig v70vjds54xxTh1vsymfVPC8OIve3pfD2QQ8UDZtWO2HpVV4EJow7BGnYHDSYPQId/J2e 50wDarswYcBHN0TrhWpCy7jMfOa04FNdg2v0aZqB0IA9UkfdDMESy4JNddJu5XJP2+HS L9meP77ec0Haxb4rt8lnb1p6NLQvVNuUHZdxo9odkNHTxxVpcDBmE7menr4q/4UBSPL7 D9bQ== X-Gm-Message-State: AC+VfDzY8e3K6/ZmD9ntNDM35iPkUBnuKUABMKHWf5rythlmAhJ2OXLh dVuyDZ/b6urpFKKBohULg6UaQdL02kP7o9CdBMWIbjqS X-Google-Smtp-Source: ACHHUZ70kWSg9EkZtu1wYdlyUTajc6MAi20Zzrl/AuLGe1KU+VGSVvcdWnzFFzWvOa9ko4SIzQn4hQ== X-Received: by 2002:a05:6a20:1443:b0:105:9ca9:56aa with SMTP id a3-20020a056a20144300b001059ca956aamr561933pzi.0.1684428351082; Thu, 18 May 2023 09:45:51 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id j7-20020a62e907000000b005e0699464e3sm1513579pfh.206.2023.05.18.09.45.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 May 2023 09:45:50 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Anatoly Burakov , Jerin Jacob , Sunil Kumar Kori , Bruce Richardson , Dmitry Kozlyuk , Narcisa Ana Maria Vasile , Dmitry Malloy , Pallavi Kadam Subject: [PATCH v2 02/19] eal: replace use of sanity check in comments and messages Date: Thu, 18 May 2023 09:45:29 -0700 Message-Id: <20230518164546.108105-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230518164546.108105-1-stephen@networkplumber.org> References: <20230517161603.117728-1-stephen@networkplumber.org> <20230518164546.108105-1-stephen@networkplumber.org> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sanity check is on the Tier 2 non-inclusive list. Replace or remove it. Acked-by: Anatoly Burakov Signed-off-by: Stephen Hemminger --- lib/eal/common/eal_common_memory.c | 2 +- lib/eal/common/eal_common_proc.c | 3 ++- lib/eal/common/eal_common_trace.c | 2 +- lib/eal/common/eal_memcfg.h | 2 +- lib/eal/common/rte_malloc.c | 2 +- lib/eal/freebsd/eal.c | 2 +- lib/eal/linux/eal.c | 2 +- lib/eal/windows/eal.c | 2 +- 8 files changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/eal/common/eal_common_memory.c b/lib/eal/common/eal_common_memory.c index e21fc7cfaecc..f99c6b43c885 100644 --- a/lib/eal/common/eal_common_memory.c +++ b/lib/eal/common/eal_common_memory.c @@ -560,7 +560,7 @@ check_dma_mask(uint8_t maskbits, bool thread_unsafe) uint64_t mask; int ret; - /* Sanity check. We only check width can be managed with 64 bits + /* We only check width can be managed with 64 bits * variables. Indeed any higher value is likely wrong. */ if (maskbits > MAX_DMA_MASK_BITS) { RTE_LOG(ERR, EAL, "wrong dma mask size %u (Max: %u)\n", diff --git a/lib/eal/common/eal_common_proc.c b/lib/eal/common/eal_common_proc.c index 1fc1d6c53bd2..972f3269d8ae 100644 --- a/lib/eal/common/eal_common_proc.c +++ b/lib/eal/common/eal_common_proc.c @@ -309,7 +309,8 @@ read_msg(int fd, struct mp_msg_internal *m, struct sockaddr_un *s) break; } } - /* sanity-check the response */ + + /* Check that the response is valid */ if (m->msg.num_fds < 0 || m->msg.num_fds > RTE_MP_MAX_FD_NUM) { RTE_LOG(ERR, EAL, "invalid number of fd's received\n"); return -1; diff --git a/lib/eal/common/eal_common_trace.c b/lib/eal/common/eal_common_trace.c index cb980af06d9f..cadb85b94fde 100644 --- a/lib/eal/common/eal_common_trace.c +++ b/lib/eal/common/eal_common_trace.c @@ -465,7 +465,7 @@ __rte_trace_point_register(rte_trace_point_t *handle, const char *name, struct trace_point *tp; uint16_t sz; - /* Sanity checks of arguments */ + /* Check arguments */ if (name == NULL || register_fn == NULL || handle == NULL) { trace_err("invalid arguments"); rte_errno = EINVAL; diff --git a/lib/eal/common/eal_memcfg.h b/lib/eal/common/eal_memcfg.h index ea013a9daf17..dc7ef18dc11b 100644 --- a/lib/eal/common/eal_memcfg.h +++ b/lib/eal/common/eal_memcfg.h @@ -18,7 +18,7 @@ * Memory configuration shared across multiple processes. */ struct rte_mem_config { - volatile uint32_t magic; /**< Magic number - sanity check. */ + volatile uint32_t magic; /**< Magic number check. */ uint32_t version; /**< Prevent secondary processes using different DPDK versions. */ diff --git a/lib/eal/common/rte_malloc.c b/lib/eal/common/rte_malloc.c index ebafef3f6cf2..e632c395132c 100644 --- a/lib/eal/common/rte_malloc.c +++ b/lib/eal/common/rte_malloc.c @@ -654,7 +654,7 @@ rte_malloc_heap_destroy(const char *heap_name) ret = -1; goto unlock; } - /* sanity checks done, now we can destroy the heap */ + /* checks done, now we can destroy the heap */ rte_spinlock_lock(&heap->lock); ret = malloc_heap_destroy(heap); rte_spinlock_unlock(&heap->lock); diff --git a/lib/eal/freebsd/eal.c b/lib/eal/freebsd/eal.c index 7daf22e31449..d3499dd5906d 100644 --- a/lib/eal/freebsd/eal.c +++ b/lib/eal/freebsd/eal.c @@ -501,7 +501,7 @@ eal_parse_args(int argc, char **argv) goto out; } - /* sanity checks */ + /* options checks */ if (eal_check_common_options(internal_conf) != 0) { eal_usage(prgname); ret = -1; diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c index ae323cd492d4..251aa533b274 100644 --- a/lib/eal/linux/eal.c +++ b/lib/eal/linux/eal.c @@ -803,7 +803,7 @@ eal_parse_args(int argc, char **argv) goto out; } - /* sanity checks */ + /* options checks */ if (eal_check_common_options(internal_conf) != 0) { eal_usage(prgname); ret = -1; diff --git a/lib/eal/windows/eal.c b/lib/eal/windows/eal.c index 033825c14c67..17a5f9d1ba30 100644 --- a/lib/eal/windows/eal.c +++ b/lib/eal/windows/eal.c @@ -194,7 +194,7 @@ eal_parse_args(int argc, char **argv) if (eal_adjust_config(internal_conf) != 0) return -1; - /* sanity checks */ + /* options checks */ if (eal_check_common_options(internal_conf) != 0) { eal_usage(prgname); return -1; From patchwork Thu May 18 16:45:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 127026 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4063C42B34; Thu, 18 May 2023 18:46:15 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A0C3B42D46; Thu, 18 May 2023 18:45:56 +0200 (CEST) Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) by mails.dpdk.org (Postfix) with ESMTP id CF19D42D3E for ; Thu, 18 May 2023 18:45:53 +0200 (CEST) Received: by mail-pf1-f182.google.com with SMTP id d2e1a72fcca58-64d11974b45so780439b3a.2 for ; Thu, 18 May 2023 09:45:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1684428353; x=1687020353; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=KN1MgNmFGviA5Wb/xQz3V2RIr4nfiTURjr2uY0Anqds=; b=CmKsQMteWVKfpXJAZbdKtshPGS/lwmhyqSPAgkDSnE3Scu71fOJtXwyH3DmdOg0THg owEadisJMqUGmB3UPa9N4r5DuLygjS9TILFa55RheaJnpJ+wWFWT1IQX0sNPUreJmXwN S2k0L7SY6itMaY6i9sthT2lxX3Vqk5in/CO8jejbFdwO9+++PihAq7BqsxpoRn//SMd0 +XsFbZ9Lpp7yFItdrdn9XukqJbqOxUd8SHhtWfsj75R+BSl/vaXh+/5u43cyrZBrRWbW WTYS8wB86xz7ohYZ0ebp4EXzrabsjoOqon7+M/MBx8yIXhaUdMmQ2pXwcMha9MVtHAGq JLQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684428353; x=1687020353; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KN1MgNmFGviA5Wb/xQz3V2RIr4nfiTURjr2uY0Anqds=; b=KKZC2SX7BjSyLdoV3ouqzmQU/6iGafoQOsCYJR6wivvEQbSFo5cX4Rhh+BtK8UC6Ga SW9337maSxSg+Y6B+ad+yaGAjUOv6M5cwD20i+s85AFpOQ2VmSxpfIerdGmpyHLKAfXK k/gLBq+zKnr81kmcfYlq4lZeRrq2c0LI58NTO9aTKNvNH4R2w4LYBXiKIMTqY4R2I0TL bvAhl69rgi6PZhxSbX7NblMxp8F92rgXacCjWEhIZ3XX9kNOBdcGp03fp/TT7dtoAKrf Sx8mitsXTsNifO3VpcBAyWvIwhKTLjmQQ/uI+BKUhJILIb7kaWey1dSbnba8ywjcDPTM SJuw== X-Gm-Message-State: AC+VfDxp8xDmTuUfg9WsBrKnVZMQLmpLCw2qOQ+hnNJw+BjOtNHzW1TA x+kigITJrJ4s6vz9dMBeQK5Ir7vxGdXm4MSCR2fpXE/e X-Google-Smtp-Source: ACHHUZ4FG/nC7dL4UwCmxVggo2B3CUZbw/38FiIoZJeDf92i5cftbbbqcDs4sGiNQxWji9+hxDY6rQ== X-Received: by 2002:a05:6a00:21c3:b0:63c:1be4:5086 with SMTP id t3-20020a056a0021c300b0063c1be45086mr5364645pfj.6.1684428352501; Thu, 18 May 2023 09:45:52 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id j7-20020a62e907000000b005e0699464e3sm1513579pfh.206.2023.05.18.09.45.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 May 2023 09:45:52 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Cristian Dumitrescu , Konstantin Ananyev , David Hunt , Chengwen Feng , Kevin Laatz , Bruce Richardson , Yipeng Wang , Sameh Gobriel , Vladimir Medvedkin , Harman Kalra , Chas Williams , "Min Hu (Connor)" , Olivier Matz , Sachin Saxena , Hemant Agrawal , Erik Gabriel Carrillo Subject: [PATCH v2 03/19] test: replace use word sanity Date: Thu, 18 May 2023 09:45:30 -0700 Message-Id: <20230518164546.108105-4-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230518164546.108105-1-stephen@networkplumber.org> References: <20230517161603.117728-1-stephen@networkplumber.org> <20230518164546.108105-1-stephen@networkplumber.org> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org The word "sanity" is on the not-allowed inclusive naming list. Replace the unnecessary usage in tests. Signed-off-by: Stephen Hemminger --- 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(-) diff --git a/app/test/test_bitmap.c b/app/test/test_bitmap.c index e9c61590aef7..8cb5d0954a2b 100644 --- a/app/test/test_bitmap.c +++ b/app/test/test_bitmap.c @@ -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; } diff --git a/app/test/test_bpf.c b/app/test/test_bpf.c index f5af5e8a3f4a..347b672ac211 100644 --- a/app/test/test_bpf.c +++ b/app/test/test_bpf.c @@ -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]); diff --git a/app/test/test_common.c b/app/test/test_common.c index f89e1eb7ee0d..c7ce8ea32a77 100644 --- a/app/test/test_common.c +++ b/app/test/test_common.c @@ -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) { diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c index 3efa4af10439..36e246927aac 100644 --- a/app/test/test_distributor.c +++ b/app/test/test_distributor.c @@ -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) { 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 */ 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) 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) 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 *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<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, 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); diff --git a/app/test/test_dmadev.c b/app/test/test_dmadev.c index 0736ff2a1867..b54319f763f4 100644 --- a/app/test/test_dmadev.c +++ b/app/test/test_dmadev.c @@ -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"); diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c index d2b91e20750e..edbe1be50096 100644 --- a/app/test/test_eal_flags.c +++ b/app/test/test_eal_flags.c @@ -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 */ diff --git a/app/test/test_hash.c b/app/test/test_hash.c index 3e45afaa67fc..f521ce7f679a 100644 --- a/app/test/test_hash.c +++ b/app/test/test_hash.c @@ -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). */ diff --git a/app/test/test_interrupts.c b/app/test/test_interrupts.c index b59ab426999c..88105b78a455 100644 --- a/app/test/test_interrupts.c +++ b/app/test/test_interrupts.c @@ -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; diff --git a/app/test/test_link_bonding_mode4.c b/app/test/test_link_bonding_mode4.c index 21c512c94b89..95dd52848fb9 100644 --- a/app/test/test_link_bonding_mode4.c +++ b/app/test/test_link_bonding_mode4.c @@ -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); diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c index c2716dc4e5fe..7c86323be772 100644 --- a/app/test/test_mbuf.c +++ b/app/test/test_mbuf.c @@ -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__); diff --git a/app/test/test_rawdev.c b/app/test/test_rawdev.c index 3c780e3f9e96..c807bf90d9c3 100644 --- a/app/test/test_rawdev.c +++ b/app/test/test_rawdev.c @@ -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; diff --git a/app/test/test_timer.c b/app/test/test_timer.c index 0c36dc9010b0..6615ce536443 100644 --- a/app/test/test_timer.c +++ b/app/test/test_timer.c @@ -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; } From patchwork Thu May 18 16:45:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 127027 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8ED5442B34; Thu, 18 May 2023 18:46:26 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 20A9F42D56; Thu, 18 May 2023 18:45:58 +0200 (CEST) Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) by mails.dpdk.org (Postfix) with ESMTP id 9ECF542BDA for ; Thu, 18 May 2023 18:45:54 +0200 (CEST) Received: by mail-pf1-f173.google.com with SMTP id d2e1a72fcca58-64d293746e0so462975b3a.2 for ; Thu, 18 May 2023 09:45:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1684428353; x=1687020353; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7S6o+sVm/gpVn3nPuseXoEP8Kki8zKVpVJHEVBiEplM=; b=sllOO6PF/98RYEux/7uWOwlsSgs+tvaULBduxiRJwoseLIElmEMh3ymhdw80kIURjn OXuZeoRbkIm+JLPmVxzmD1+UyNTQCfXDb8/lCvUviwoBRkF7tjr4kjO5r/gzdflhWoEW 1w+eqsK1X034FIT6GR+F08k4Rw1ewDHmykYs3+CkL5JgkyT1BGF/9wwMIlluVvXXCjSa NS7kiqI72GmgQqaLOKAQZs/1K6ldIOHmhvHxcvcFF1jmEVrOi8LYuxhOGdFCE16lf749 Ys8XTwPv4MUooyJDcbmyNtzsq0kSgP1/T5ewym6gJoO2zsvs0/dg7ynQdQ4NS2fIeVv5 67Kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684428353; x=1687020353; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7S6o+sVm/gpVn3nPuseXoEP8Kki8zKVpVJHEVBiEplM=; b=KURggcKrR2r02MdKw7wgmM5wfotIXzQk1BfATExW9XLkC0U69qkHZUtarL7/ZefXgn poflXG/2vBYNEORk01Gtdwsn5wKK3lwlWpozpTaGqjuCrZpFwyiWUue2BCiYJCRLfenS LJoSUNPQM8CUe+MNdjamC6aefJpbW9n5o2Dpi2yVRvjf0CUk5qiTiMMtA+6KM7q8wK+Z GM94ebvWWDzhEe2cAgfSJcb02+S/LAzKArKk3YkZhWr8ZQKvo6cpas4Q5c/MHO9Fb/NM WxzQ/Nsltw6+Jc9G7K2rMb66MFhW/7/TOGpiPTm6AHRyUhxb/UKvMI3r8Ac3gRqwi3zZ WnSg== X-Gm-Message-State: AC+VfDzkk5r4eihl83JLT6AlaOJyAWCtuGj9LMa4PG0N0UWx6BrHZKAa 0t7YuAW/mIF6ZPs07bq/3p7ccizn45+jjU1HCxntnUV2 X-Google-Smtp-Source: ACHHUZ5eqZxmH/TmzIR8KAgMeQ+cLSb8X5K3LBrv4QOq9/p6syvbWKXHKRpxrF84UTzqJ7pBoZSDkA== X-Received: by 2002:a05:6a20:2453:b0:101:4c8c:d1fa with SMTP id t19-20020a056a20245300b001014c8cd1famr512496pzc.5.1684428353604; Thu, 18 May 2023 09:45:53 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id j7-20020a62e907000000b005e0699464e3sm1513579pfh.206.2023.05.18.09.45.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 May 2023 09:45:53 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Radu Nicolau , Akhil Goyal , Cristian Dumitrescu Subject: [PATCH v2 04/19] examples: remove term sanity Date: Thu, 18 May 2023 09:45:31 -0700 Message-Id: <20230518164546.108105-5-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230518164546.108105-1-stephen@networkplumber.org> References: <20230517161603.117728-1-stephen@networkplumber.org> <20230518164546.108105-1-stephen@networkplumber.org> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Do not use non-inclusive terms. Signed-off-by: Stephen Hemminger --- examples/ipsec-secgw/event_helper.c | 2 +- examples/qos_sched/args.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/ipsec-secgw/event_helper.c b/examples/ipsec-secgw/event_helper.c index 89fb7e62a5a3..f595b4fe01dc 100644 --- a/examples/ipsec-secgw/event_helper.c +++ b/examples/ipsec-secgw/event_helper.c @@ -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; diff --git a/examples/qos_sched/args.c b/examples/qos_sched/args.c index e97273152aa7..1d8ba9522586 100644 --- a/examples/qos_sched/args.c +++ b/examples/qos_sched/args.c @@ -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, From patchwork Thu May 18 16:45:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 127028 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5BF5242B34; Thu, 18 May 2023 18:46:34 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3D27B42D5F; Thu, 18 May 2023 18:45:59 +0200 (CEST) Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) by mails.dpdk.org (Postfix) with ESMTP id B654742D42 for ; Thu, 18 May 2023 18:45:55 +0200 (CEST) Received: by mail-pf1-f175.google.com with SMTP id d2e1a72fcca58-643465067d1so1784205b3a.0 for ; Thu, 18 May 2023 09:45:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1684428354; x=1687020354; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mQOZXysbMxBdYXC4hBo8txdRgrIlJ+FKZjItfbewRrU=; b=A1rG2Hms128HI51tiHxq21lG7RF5BG68sv1uh/k9qyAIQXyKPzm5oVu8pDhO0aU3uo 9emlqccHPDt2h9rUHX2T8Y32ks7ZWt6KjG0yjbn6w270+0eGZA9eKGVRfZ3og5Nb0UAD q5S2TleYRabF2e3ttSmbnQuU9KoElY2IoDPD+d+bZqucCXHFgVO7DneqRyV33ziCfr4F KSEO7bVqLgTBXjs/1oOTjnUYxeWTL/397bLMObYy1jSlLSG9dltBjrSA+5Gr/m/jmjrr vdN7K+RbF0zLgiiamMPxihhBvdBVX9AbzylJxzp3DH6Tf+PFgzspoJJYtWm2sMMoStpn 2EBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684428354; x=1687020354; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mQOZXysbMxBdYXC4hBo8txdRgrIlJ+FKZjItfbewRrU=; b=X5lEDKZQXjv6BkIdl1kkexrzSJWFLtLNfZrAAjubzlPhFcHwDX3vmW0nKWsL1XZmih shy7GLXIhOdS8nM/22vI2ZXNXKTp9XqtLnygfrgRibhgU4h7R53pWfy7nJVCNZgogJzQ 6m1Z5JJDan6LFy+tGZEz4o/G/Ga+PNJlYmNDs/q3CykOtoM3jlREFobDZe37KGJXbiIP wX/q4N8/P42HSU+d1wHugW1pDfWMMWyO5eWQXu4muuxGh+wPKK7kbVtdYDmgfWyMR15h A1mGNinnjrtQHSCF/tvfctb2YjzywdE6jq3b8R1A677hyKoPGzQFtN/oFyEboOaUkaft c9Yw== X-Gm-Message-State: AC+VfDxbLrB3o4LkQcFakcNppf0jMql6URJaPoD+qhkeZwLhcxMXSEK+ CGoqTh7m7eIf7tinf7RYz/jajEttHsv0G5HGoskZjeMx X-Google-Smtp-Source: ACHHUZ6zst5ZwzKVXKBa8TjWajFZG4US1sRnNZOg5+3XqZydaQJ6/1eaQOQQx8VkOxoS1gsvygTtfw== X-Received: by 2002:a05:6a21:339a:b0:100:5851:d4ba with SMTP id yy26-20020a056a21339a00b001005851d4bamr198463pzb.54.1684428354710; Thu, 18 May 2023 09:45:54 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id j7-20020a62e907000000b005e0699464e3sm1513579pfh.206.2023.05.18.09.45.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 May 2023 09:45:54 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Jerin Jacob , Kiran Kumar K , Nithin Dabilpuram , Reshma Pattan Subject: [PATCH v2 05/19] lib: replace use of sanity check in comments and messages Date: Thu, 18 May 2023 09:45:32 -0700 Message-Id: <20230518164546.108105-6-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230518164546.108105-1-stephen@networkplumber.org> References: <20230517161603.117728-1-stephen@networkplumber.org> <20230518164546.108105-1-stephen@networkplumber.org> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sanity check is on the Tier 2 non-inclusive list. Replace or remove it. Signed-off-by: Stephen Hemminger --- 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(-) diff --git a/lib/graph/graph.c b/lib/graph/graph.c index 5582631b5301..597e9e7aa28e 100644 --- a/lib/graph/graph.c +++ b/lib/graph/graph.c @@ -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"); diff --git a/lib/graph/graph_stats.c b/lib/graph/graph_stats.c index c0140ba92212..28d5728e5e61 100644 --- a/lib/graph/graph_stats.c +++ b/lib/graph/graph_stats.c @@ -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"); diff --git a/lib/graph/node.c b/lib/graph/node.c index 149414dcd94c..3f0ae0c395db 100644 --- a/lib/graph/node.c +++ b/lib/graph/node.c @@ -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; diff --git a/lib/jobstats/rte_jobstats.c b/lib/jobstats/rte_jobstats.c index af565a14eaf3..1c4b280c952a 100644 --- a/lib/jobstats/rte_jobstats.c +++ b/lib/jobstats/rte_jobstats.c @@ -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; diff --git a/lib/metrics/rte_metrics.c b/lib/metrics/rte_metrics.c index 0ccdbabc04eb..f60d4f3f6e25 100644 --- a/lib/metrics/rte_metrics.c +++ b/lib/metrics/rte_metrics.c @@ -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++) diff --git a/lib/pcapng/rte_pcapng.c b/lib/pcapng/rte_pcapng.c index 3c91fc77644a..fedf4b5b7f11 100644 --- a/lib/pcapng/rte_pcapng.c +++ b/lib/pcapng/rte_pcapng.c @@ -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))) { From patchwork Thu May 18 16:45:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 127029 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 675AB42B34; Thu, 18 May 2023 18:46:43 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BB05B42D7E; Thu, 18 May 2023 18:46:00 +0200 (CEST) Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) by mails.dpdk.org (Postfix) with ESMTP id 056E742D48 for ; Thu, 18 May 2023 18:45:57 +0200 (CEST) Received: by mail-pf1-f177.google.com with SMTP id d2e1a72fcca58-64384c6797eso1761367b3a.2 for ; Thu, 18 May 2023 09:45:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1684428356; x=1687020356; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ZndbhWyyYVzRrPHeWwy0prkR1MYxradj38bgB4FJSIc=; b=DL7gsBNx4guMIMWerG1tYKsi/vmMgGYHfpGNiFkF127xtIIfBw9eAoV72ZgKfA6F6S 1BhYIlVkb4HZVFM/amCcr38PE6mV1ba9U/6jmHuvYPDTll6sbY64AAESH6BsQxpfSfO6 dimQOClAJ2dSfUSXosxLJzO0hD0ktPkn1xpTv1Xi2axUsR8xq4Tm3SxhO3IzcikuBUF4 nwwPYG++vTPr27kUaFbZo/UMxx6WCPJ2VPemTFgk7xL0+AmzHzksGxsPq7r7ds6Qu3eg OjJ49RWtRvJWzTgtuXb3heLg7h/sYUbf/5gvUQW2bPoPV7yx4UoiIRNzb/x3abLFhlLe Ed5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684428356; x=1687020356; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZndbhWyyYVzRrPHeWwy0prkR1MYxradj38bgB4FJSIc=; b=W+9BjV+sqkR0TAB+MgMGfzRURu0u+LFhwUBD9OM039lSJ2L6ZoBmBdXwwObxp8j7C6 wzIagUXGV1ea9C3CjaVvyA/iiXI3KuXXaeTouf1j5A00yjUlFEQS9dDXvsACzL6+3Bwd VHBfNkupdrwSo/5anBMoj/8qTr1HctZj15RR1PjhcQJxdPthLBG/moTkck4SEGzuE3FH rmEJuT7fzrZQzAc45/kHaCzWt4wW0VT4IQnQdwZg+5DcneZYhGNR3laxhfZrVWubjiLB 5u5u+HR6S0kOVaEj1iJ08a5Z0eS+OiUOeGjTM/bGJOZbZ1TzwUj/iJeahFNN4hn9m539 2qEQ== X-Gm-Message-State: AC+VfDxRM81LF4NyeiWFXN3PdewZTrpOMalDfJ4WXWB8tMG4T+YjJAnW f+cgDy374/knBbKRYb6o2nIjL+PpMaxjhWJELs9D4o6R X-Google-Smtp-Source: ACHHUZ6D1bwK2OLXHSy5rItbmKsTuqyz2vE8NHhgO0QOEkkDPQwRVAw2Cec8Wn1Dk9jByu2h6c1dBQ== X-Received: by 2002:a05:6a00:1403:b0:64b:43d8:a57d with SMTP id l3-20020a056a00140300b0064b43d8a57dmr5640888pfu.13.1684428355923; Thu, 18 May 2023 09:45:55 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id j7-20020a62e907000000b005e0699464e3sm1513579pfh.206.2023.05.18.09.45.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 May 2023 09:45:55 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Elena Agostini , Harry van Haaren , Nicolas Chautru Subject: [PATCH v2 06/19] doc/eventdev_pipeline: remove sanity Date: Thu, 18 May 2023 09:45:33 -0700 Message-Id: <20230518164546.108105-7-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230518164546.108105-1-stephen@networkplumber.org> References: <20230517161603.117728-1-stephen@networkplumber.org> <20230518164546.108105-1-stephen@networkplumber.org> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org The word sanity check is unnecessary here. Signed-off-by: Stephen Hemminger --- 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(-) diff --git a/doc/guides/gpus/cuda.rst b/doc/guides/gpus/cuda.rst index 114e3bc8cb72..75f107095593 100644 --- a/doc/guides/gpus/cuda.rst +++ b/doc/guides/gpus/cuda.rst @@ -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 diff --git a/doc/guides/sample_app_ug/eventdev_pipeline.rst b/doc/guides/sample_app_ug/eventdev_pipeline.rst index 19ff53803ede..e7787fb26609 100644 --- a/doc/guides/sample_app_ug/eventdev_pipeline.rst +++ b/doc/guides/sample_app_ug/eventdev_pipeline.rst @@ -50,7 +50,7 @@ these settings is shown below: .//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: diff --git a/doc/guides/tools/testbbdev.rst b/doc/guides/tools/testbbdev.rst index 54a9c44dc345..0a4af4ec9bec 100644 --- a/doc/guides/tools/testbbdev.rst +++ b/doc/guides/tools/testbbdev.rst @@ -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 From patchwork Thu May 18 16:45:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 127030 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C73E742B34; Thu, 18 May 2023 18:46:49 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C325842D85; Thu, 18 May 2023 18:46:01 +0200 (CEST) Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by mails.dpdk.org (Postfix) with ESMTP id EF5FE42D52 for ; Thu, 18 May 2023 18:45:57 +0200 (CEST) Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-64354231003so1068816b3a.0 for ; Thu, 18 May 2023 09:45:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1684428357; x=1687020357; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=lMQf3qTN8Fulc3SikVUCZY/No0nJ3UQ1aiWZC2NKDME=; b=ezStfDMMq0BN98VeyQag2N+5Sb+aF6zHVOUgvgKXm7IPHwxM7oKNF62PEQUvO9YemB R2lqiRWY9a5krBEdejxHbBAi2ZnuQ2sElo3R/TVNv6PhSVk+BYR+D4p/rJ4BVkOPqs+H XF+s7m4MOgaIDyuo4CZ+ALcVyX/8QYpgTDxKQHJ1Hlg5Dzld5lgvjfX4hrgbeyXXnLhr K1akfn099OsyA3BIb+dgOwZYhg6tDTyu3cSBgtJ7aGTSaPN7j+IxmiDWtQzi2fROtxjj /clS77oOsj1cAldx9f+MGjif/F6nWPvTiSbW5lPMfJT4CMCiRo/E+60mNRO8wvc+gGu5 /IOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684428357; x=1687020357; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lMQf3qTN8Fulc3SikVUCZY/No0nJ3UQ1aiWZC2NKDME=; b=giegRuqBqPpz1tX7JypW5BooND4uxjHrtxFJiPPCux3TGcd3ehRs+Jq2wEGviS7zms 0W8BxIbeVoUoclprkIIvtJ5ihdaPfdPv90vgm/TFH/rgncRv4Mba/q9W7capJ3NGiwyD ykY4YIyMoILJd7o9YKHu2ZcSfVQu213Lt1bLFbvSLxS8jwdX3WUzSeQrfGv3CKTfxsTP aG5jhilaCjVR6QJLCaG8T38qWlne81kVCWYw5amNfB0SDjU/44XsWi6EF1gul3lUL87b aSyA4rNCUJFW0xrJW4UyRVqzBunFBLl12IXWO/fW+hwcMq7Os7CiNNZytDwRqFEkIdZd Lt/w== X-Gm-Message-State: AC+VfDwbEV5oBbDWqlaKvFHofYdNMYNWmMFsX4/EpyeU+WZwqXDQDD7f ds1HoiqfTlMlrRzjUWCNjbcExyT7UbnU2tzo1mSd0FLY X-Google-Smtp-Source: ACHHUZ5odKIXIvc98eVo/uCt8bb1wjILCCx3NSdHgN8DEaktC33EW/Jum1rK2IvkF7EXYPvuLQuG2Q== X-Received: by 2002:a05:6a00:1885:b0:63b:8dcc:84de with SMTP id x5-20020a056a00188500b0063b8dcc84demr4624215pfh.4.1684428356939; Thu, 18 May 2023 09:45:56 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id j7-20020a62e907000000b005e0699464e3sm1513579pfh.206.2023.05.18.09.45.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 May 2023 09:45:56 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Bruce Richardson Subject: [PATCH v2 07/19] net/ring: replace use of sanity Date: Thu, 18 May 2023 09:45:34 -0700 Message-Id: <20230518164546.108105-8-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230518164546.108105-1-stephen@networkplumber.org> References: <20230517161603.117728-1-stephen@networkplumber.org> <20230518164546.108105-1-stephen@networkplumber.org> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Don't use term sanity check Signed-off-by: Stephen Hemminger --- drivers/net/ring/rte_eth_ring.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c index e8bc9b627102..e36742fda84f 100644 --- a/drivers/net/ring/rte_eth_ring.c +++ b/drivers/net/ring/rte_eth_ring.c @@ -34,7 +34,7 @@ struct ring_internal_args { struct rte_ring * const *tx_queues; const unsigned int nb_tx_queues; const unsigned int numa_node; - void *addr; /* self addr for sanity check */ + void *addr; /* self addr for verification */ }; enum dev_action { @@ -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) From patchwork Thu May 18 16:45:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 127031 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id ED99142B34; Thu, 18 May 2023 18:46:56 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D39AE42D8A; Thu, 18 May 2023 18:46:02 +0200 (CEST) Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) by mails.dpdk.org (Postfix) with ESMTP id E4BDD42D5A for ; Thu, 18 May 2023 18:45:58 +0200 (CEST) Received: by mail-pf1-f171.google.com with SMTP id d2e1a72fcca58-64d24136663so485985b3a.0 for ; Thu, 18 May 2023 09:45:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1684428358; x=1687020358; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=E+g3LGv1MimqAdKQP79DQNEodaidHvBBomLqdvw/v70=; b=rugj0UrgHZ73uopi9NTf73ypLb069ttiWelU+Ut6p7JOE7eAljvotIkq9PogmSo3D5 JDSfrVypUQLzxp8ISyfe9Nu8XJ6V/HnGtHJQGhCu5ggUZCl4263ctqyovMQAH2xzdpDz GmmxPumj4F8J2N/Pcqzd/nR8IAgVsSkS7F4/zQonrBdkJZRxuyV0XDYU6be4KdLkOZuZ nhZsQxTtq/dyEcLa9woCCHEq+MrAiDyH28bGW5khjlfgii8INBN4sCFNDib8vt8tqfw+ 9ideBgXyjTTqAeSIyrDKUGCwnueiaOO6P9TRAf1dsgBzZikoegK5W9DfE1AmWuiupZJe OLzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684428358; x=1687020358; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=E+g3LGv1MimqAdKQP79DQNEodaidHvBBomLqdvw/v70=; b=DxN7Lyqr7sWAV9JnYGWdM6yny2BzCenjJ34bOjVNUvZfHqKMCRmCHC+rZBlVgdl8if eKydZ0to1FzAjzmOJ+XYZDgu8QvG6OXSr0Y4HQw0GPhKAl7iLghmHcXiTUN1Yx14BliB YTDg4NbmaE6VQp6ySdypKu70l9wkn9De0k40Hx68RmhWxsJ272szsig9u2G8rOiJkPLH Mot0i44tjdvxl1On9sDVnjwc1J9iDJYKQ0LSqISNRhbZtIG9lFSa1L5fr5ureGW1b3st IjIgbR6QtLnMJzqABznmJKSRRNq8u447Z+3e1R+myp4+t/BVbDKzOnlIKWcmgwEps6aK dJDg== X-Gm-Message-State: AC+VfDx2YBu4KtLDE54rL7da/cIBb1AyVgMYH984P/xr8UG1kUaE8jWX QVcUh6QXLqsDnbEswEAYwBvx9TGHTz+CMFvQ/UVfQWgB X-Google-Smtp-Source: ACHHUZ7Ec2xcSxD4tAGuyrEC6wVZyM59I5F/a+z3MiS6NYVLEmNQq4mioYo7waRKFBPj7oweICsHsg== X-Received: by 2002:a05:6a20:42a4:b0:ff:8d85:9f24 with SMTP id o36-20020a056a2042a400b000ff8d859f24mr280265pzj.50.1684428357886; Thu, 18 May 2023 09:45:57 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id j7-20020a62e907000000b005e0699464e3sm1513579pfh.206.2023.05.18.09.45.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 May 2023 09:45:57 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Qi Zhang , Xiao Wang , Qiming Yang , Wenjun Wu Subject: [PATCH v2 08/19] net/fm10k, net/ixgbe: remove word sanity Date: Thu, 18 May 2023 09:45:35 -0700 Message-Id: <20230518164546.108105-9-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230518164546.108105-1-stephen@networkplumber.org> References: <20230517161603.117728-1-stephen@networkplumber.org> <20230518164546.108105-1-stephen@networkplumber.org> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Remove non-inclusive term sanity from these Intel drivers. Signed-off-by: Stephen Hemminger --- 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(-) diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c index 4d3c4c10cfa4..894cf8c8a6b5 100644 --- a/drivers/net/fm10k/fm10k_ethdev.c +++ b/drivers/net/fm10k/fm10k_ethdev.c @@ -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; diff --git a/drivers/net/fm10k/fm10k_rxtx.c b/drivers/net/fm10k/fm10k_rxtx.c index c0841ab8cb34..94345299b22a 100644 --- a/drivers/net/fm10k/fm10k_rxtx.c +++ b/drivers/net/fm10k/fm10k_rxtx.c @@ -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; diff --git a/drivers/net/ixgbe/ixgbe_fdir.c b/drivers/net/ixgbe/ixgbe_fdir.c index 06d6e2126de5..51bbf577e3fe 100644 --- a/drivers/net/ixgbe/ixgbe_fdir.c +++ b/drivers/net/ixgbe/ixgbe_fdir.c @@ -1130,7 +1130,7 @@ ixgbe_fdir_filter_program(struct rte_eth_dev *dev, return -ENOTSUP; /* - * Sanity check for x550. + * Check for x550. * When adding a new filter with flow type set to IPv4, * the flow director mask should be configed before, * and the L4 protocol and ports are masked. diff --git a/drivers/net/ixgbe/ixgbe_ipsec.c b/drivers/net/ixgbe/ixgbe_ipsec.c index d3313085560d..d4aa3e9ede8e 100644 --- a/drivers/net/ixgbe/ixgbe_ipsec.c +++ b/drivers/net/ixgbe/ixgbe_ipsec.c @@ -615,7 +615,7 @@ ixgbe_crypto_enable_ipsec(struct rte_eth_dev *dev) rx_offloads = dev->data->dev_conf.rxmode.offloads; tx_offloads = dev->data->dev_conf.txmode.offloads; - /* sanity checks */ + /* input validation */ if (rx_offloads & RTE_ETH_RX_OFFLOAD_TCP_LRO) { PMD_DRV_LOG(ERR, "RSC and IPsec not supported"); return -1; diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c index c9d6ca9efea4..72f89b1b51fd 100644 --- a/drivers/net/ixgbe/ixgbe_rxtx.c +++ b/drivers/net/ixgbe/ixgbe_rxtx.c @@ -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; From patchwork Thu May 18 16:45:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 127032 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1334A42B34; Thu, 18 May 2023 18:47:04 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C884642D8E; Thu, 18 May 2023 18:46:03 +0200 (CEST) Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) by mails.dpdk.org (Postfix) with ESMTP id BAD5242D63 for ; Thu, 18 May 2023 18:45:59 +0200 (CEST) Received: by mail-pf1-f173.google.com with SMTP id d2e1a72fcca58-64d293746e0so463045b3a.2 for ; Thu, 18 May 2023 09:45:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1684428359; x=1687020359; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YEW2rqMxztAh+f5gLeStoVZIwbQIrbDYlJl2i+QW/6g=; b=pjHHM9q/iw53x0eMvkVZHgk+X+d0sUwKuMeAtYpPiV6bsOdw6ERDRMemkHbBDVdT0N X8cSyK23IX1+JyqWBL2j/XS2py3Et7DM40k0qsrP/NHbkDD+mN1jiNJmmFOEY3yNEowg SKwFdD6jzW/L+rTgFKEn8xHeiv3xpCd/eBnDmMwD06R4aVrjxa/a9bUoq61AyplX8mD7 2cV7UjUCugKKMyzWZvT6QGVjdoYD9/s0PRJNe8xHsXYWblIzO9rWjP4tPkmMZURKgwaP Hy48bGKrdS47nkRTNevzlFlDPbcbdZSg8+ow4uyLqISo0YwxqTuwXJuHzw3ByW1gxWMa Lvxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684428359; x=1687020359; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YEW2rqMxztAh+f5gLeStoVZIwbQIrbDYlJl2i+QW/6g=; b=jvPU8kz6fvHOxHjYqyaebT/5BmD3eiqBozcUQj4aC3aNsqPP5lDzQcm66L9kDNpl/V J7UGL/6rX9+BZNgGKE+nctq0N5Pv+1t1+fw6ee39m8j5eY0WX2G8U2Plq5oWHRLVaomZ KW7CDsv2dytHa4yVd+IOfHy8d2xIMAfQdAQWnp9UraTNKIhMr7gOPyRdXaL79AcKPtFs BUDSAwnKXmBh3S+/q2tTwKB49cbucUm9IxqwelTaAsZ3Gua1nEVxwGM+5bln9zvczRyM wGHVMv6EaA1/qzk6uWViUj+bpL5d5AvaJ+Iufapq0fETTI2WovZW0447HOHGuRvAsusX 0EFg== X-Gm-Message-State: AC+VfDy1JUBEXOa/MlMUbnF9tGbFUzz9FEoTn3y2XiT9ZE9mBQooy6cF H1xENwAQE/WQCKUm5B12Y6Oyd09dEXL2x9j40/A3+RSU X-Google-Smtp-Source: ACHHUZ444bvlpNx2x/dZVt1SkONR7ioseoNFq85ctkH4KOOqaAhWjIaTlKMDxXmXeUagUt9UuV7gSQ== X-Received: by 2002:a05:6a00:1346:b0:643:6b94:374b with SMTP id k6-20020a056a00134600b006436b94374bmr5801780pfu.1.1684428359004; Thu, 18 May 2023 09:45:59 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id j7-20020a62e907000000b005e0699464e3sm1513579pfh.206.2023.05.18.09.45.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 May 2023 09:45:58 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Matan Azrad , Viacheslav Ovsiienko Subject: [PATCH v2 09/19] net/mlx[45]: remove word sanity Date: Thu, 18 May 2023 09:45:36 -0700 Message-Id: <20230518164546.108105-10-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230518164546.108105-1-stephen@networkplumber.org> References: <20230517161603.117728-1-stephen@networkplumber.org> <20230518164546.108105-1-stephen@networkplumber.org> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org The term "sanity" is on non-inclusive naming list. Remove it from the Nvidia drivers. Signed-off-by: Stephen Hemminger --- 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(-) diff --git a/drivers/common/mlx5/linux/mlx5_common_os.c b/drivers/common/mlx5/linux/mlx5_common_os.c index aafff60eeb38..45fac9be0ae1 100644 --- a/drivers/common/mlx5/linux/mlx5_common_os.c +++ b/drivers/common/mlx5/linux/mlx5_common_os.c @@ -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] diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c index a54016f4a235..e3048d5b6ec0 100644 --- a/drivers/net/mlx4/mlx4.c +++ b/drivers/net/mlx4/mlx4.c @@ -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] diff --git a/drivers/net/mlx4/mlx4_flow.c b/drivers/net/mlx4/mlx4_flow.c index 8ef9fd2db44e..25b185d8710c 100644 --- a/drivers/net/mlx4/mlx4_flow.c +++ b/drivers/net/mlx4/mlx4_flow.c @@ -514,7 +514,7 @@ mlx4_flow_merge_tcp(struct rte_flow *flow, } /** - * Perform basic sanity checks on a pattern item. + * Perform basic checks on a pattern item. * * @param[in] item * Item specification. @@ -730,7 +730,7 @@ mlx4_flow_prepare(struct mlx4_priv *priv, goto exit_item_not_supported; proc = next; /* - * Perform basic sanity checks only once, while handle is + * Perform basic checks only once, while handle is * not allocated. */ if (flow == &temp) { @@ -799,7 +799,7 @@ mlx4_flow_prepare(struct mlx4_priv *priv, rss_key = mlx4_rss_hash_key_default; rss_key_len = MLX4_RSS_HASH_KEY_SIZE; } - /* Sanity checks. */ + /* Input checks. */ for (i = 0; i < rss->queue_num; ++i) if (rss->queue[i] >= ETH_DEV(priv)->data->nb_rx_queues) diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index d14661298cf0..52a035588755 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -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 diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c index 853c94af9cfd..6e805d547c8a 100644 --- a/drivers/net/mlx5/mlx5_flow_hw.c +++ b/drivers/net/mlx5/mlx5_flow_hw.c @@ -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; diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c index ad8fd13cbe8e..377618926a8d 100644 --- a/drivers/net/mlx5/mlx5_rxq.c +++ b/drivers/net/mlx5/mlx5_rxq.c @@ -1442,7 +1442,7 @@ mlx5_mprq_alloc_mp(struct rte_eth_dev *dev) desc *= 4; obj_num = desc + MLX5_MPRQ_MP_CACHE_SZ * n_ibv; /* - * rte_mempool_create_empty() has sanity check to refuse large cache + * rte_mempool_create_empty() has basic check to refuse large cache * size compared to the number of elements. * CACHE_FLUSHTHRESH_MULTIPLIER is defined in a C file, so using a * constant number 2 instead. diff --git a/drivers/net/mlx5/mlx5_rxtx_vec.h b/drivers/net/mlx5/mlx5_rxtx_vec.h index 77c3f4efa019..f8376f2b55b4 100644 --- a/drivers/net/mlx5/mlx5_rxtx_vec.h +++ b/drivers/net/mlx5/mlx5_rxtx_vec.h @@ -21,7 +21,7 @@ RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM) /* - * Compile time sanity check for vectorized functions. + * Compile time checks for vectorized functions. */ #define S_ASSERT_RTE_MBUF(s) \ From patchwork Thu May 18 16:45:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 127033 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8278042B34; Thu, 18 May 2023 18:47:10 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C6D0042D9C; Thu, 18 May 2023 18:46:04 +0200 (CEST) Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) by mails.dpdk.org (Postfix) with ESMTP id 0A81042D79 for ; Thu, 18 May 2023 18:46:01 +0200 (CEST) Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-64d2c865e4eso137342b3a.0 for ; Thu, 18 May 2023 09:46:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1684428360; x=1687020360; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hBGgGerODp1YMbr/uV88X+jcEyx1fkMa1oQYYGjFCy0=; b=OdRFRDiXFXOABlV7b0E3p3OyNcdE1RjD+W3yWc0XDbyOX6laz+7fBQjzB4Brg7zdir 0lcHgkCQ0cWrvgJCGwS3QL2dzKuy0HEwGEm9UT3YADEOXL7clG/O4RTfJXwO2Dee5OOZ bfDnKymfFTh8t2c9Er9TXnsQhKqdvbO+38JnMIw9jE2Q7hi7lsbpREhkISKQCKXhHt16 1lzHkIaLk30IkkVX4o7ISbmtEj0vD66vTlweIOFhX2GUbw9Dn+dUmy7i+olQERGj7VAc 1pp4McZC1L18Yb8/1IBi8AU/HMOjZi2C7Htb7yWUiDe41knX+fQ2yoqTnNWzlVSObkBR hwSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684428360; x=1687020360; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hBGgGerODp1YMbr/uV88X+jcEyx1fkMa1oQYYGjFCy0=; b=H3Ym71uo5QiEvhDSy+s7ANrOkN/yNvcP9p1IN4FM+l8UGgLnqXYljTyfuKn0SiK97U 39X+1t2wkPkCg+fhnTrzy/MNlzrLpTWO3wklwQ1yJ3mdz4bTcymqpeH0VvApIupfd11j a3tPmYovKkvHd9CseK6LXwb2l7v7s1OasWd5P5e2nGCkKnl81mTeynNmtz30LR8OLVGw f8VpCTOJbuf8wnz27ID8+sW+ZGQ9TejwHc9RRBaqCqgvhaP6lv5Y+yiQ9JJgFH3cwP5i EqVoaYn1VXxIdeGbarykDdbr158Ak26wdNzDQL1G9rm1SuSsLPPzvMZ+2bq2mNlt+YQ8 4fEw== X-Gm-Message-State: AC+VfDwJcTIm5FTIlIB1DtRgqje1yvI/+i+DTCe6YjTDfilhdlRw/Z4G JzEPdQHx1srjVVEr1e8lGBEoPhmKLvx6Ub7wXCn1+/iz X-Google-Smtp-Source: ACHHUZ6mPFzk36zLwPax5ZxMAAq1bZIkg1o9kAa3QHmYe7USr/BD9cLm1E6xu80LCs4b3yLc+tYROw== X-Received: by 2002:a05:6a20:429e:b0:109:bd4c:3865 with SMTP id o30-20020a056a20429e00b00109bd4c3865mr398365pzj.24.1684428360037; Thu, 18 May 2023 09:46:00 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id j7-20020a62e907000000b005e0699464e3sm1513579pfh.206.2023.05.18.09.45.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 May 2023 09:45:59 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Andrew Rybchenko Subject: [PATCH v2 10/19] net/sfc: remove term "sanity check" Date: Thu, 18 May 2023 09:45:37 -0700 Message-Id: <20230518164546.108105-11-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230518164546.108105-1-stephen@networkplumber.org> References: <20230517161603.117728-1-stephen@networkplumber.org> <20230518164546.108105-1-stephen@networkplumber.org> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Remove term sanity check in comment. Signed-off-by: Stephen Hemminger --- drivers/net/sfc/sfc_dp_rx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/sfc/sfc_dp_rx.h b/drivers/net/sfc/sfc_dp_rx.h index 246adbd87cde..c64db488f652 100644 --- a/drivers/net/sfc/sfc_dp_rx.h +++ b/drivers/net/sfc/sfc_dp_rx.h @@ -59,7 +59,7 @@ struct sfc_dp_rx_qcreate_info { /** * Maximum number of Rx descriptors completed in one Rx event. - * Just for sanity checks if datapath would like to do. + * Checks if datapath would like to do. */ unsigned int batch_max; From patchwork Thu May 18 16:45:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 127034 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6AA5D42B34; Thu, 18 May 2023 18:47:18 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 67A2F42DB8; Thu, 18 May 2023 18:46:06 +0200 (CEST) Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) by mails.dpdk.org (Postfix) with ESMTP id 6309C42D4E for ; Thu, 18 May 2023 18:46:02 +0200 (CEST) Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-643bb9cdd6eso2406217b3a.1 for ; Thu, 18 May 2023 09:46:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1684428361; x=1687020361; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/bJty09TAXk61wgumKyJwYVk8ly7f+/kef1jxrYtgkg=; b=oQXVwGsG5/Lt+ds4C074oJEWORi0IFNhsT2hVDAzt9QUkP9bQwF29ltBZ56iV4hWYo WDGvcX9p6ZWgg2f89ghtQ+pinOixCvLHVwtJEPDR/vayVpjP7lMPol0DktPY4BkOZL9f /9ZtpOyntMUiUj3AYMxXxNP39DKQafwNbMihw4PZwROXlTp/wjwNAxr69K68PzbepCau UqB96T1OSIygGeC185GuhktoO8O8UJ2tFlvrEsgEcpR+VwnNUbUExO94Tffj8TudhSJX fljpYSEfQEm75uQxsAhpqroLjn+/JUzc4G9O3RyMCaQ9rS/fLgqrj97HBonYIH42j2Vw ruPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684428361; x=1687020361; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/bJty09TAXk61wgumKyJwYVk8ly7f+/kef1jxrYtgkg=; b=NgEm2AbnCuY1r1Xx+gEcrGrLlGi4tagn9aByFydwtazs0B6DXDkw3X6PAMXjfXj9kL 1beYeURvj8K9agnAwcQ+7IFu/8rZgzmRZ5aAgysRDGqvW7waWMWf89Fh6bs01Jhiw1Te +5mu+h7MRG2UtVqSTrpw8VHJpyPqR9RyRWiHEm2BKRb7xVMiLU8LGIG4tQJoXH6NDL+J e8h9Ry/RdkbpE5ksLlcPRSM7u64T0oJ339J6pMKOp6ljxoz0zpDGBdJTA+yUUM5Nqfjk 8DaSaOgm63ieIucF00nSM51hr4JodeQM9PututV/CRofIau3n01YGAymvfSciYqIYG5O ljCg== X-Gm-Message-State: AC+VfDyKZkvZ4mHIyx0gQLr82RLeIkN3TOqLGSw2738Y/bCXmZCknlnL 2Jyc79B9NKUR7jp0pO3PjqPFjAACe0l6Li6thcg+vXr/ X-Google-Smtp-Source: ACHHUZ7LIPEpOBfBLSYOmOlOZ4RVZAR1Aw68FZoO/9lciqezsEu6dmuYjXaBatyRSZIsIvETz3BOrw== X-Received: by 2002:a05:6a20:729f:b0:100:b137:3563 with SMTP id o31-20020a056a20729f00b00100b1373563mr328888pzk.32.1684428361223; Thu, 18 May 2023 09:46:01 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id j7-20020a62e907000000b005e0699464e3sm1513579pfh.206.2023.05.18.09.46.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 May 2023 09:46:00 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Shepard Siegel , Ed Czeck , John Miller Subject: [PATCH v2 11/19] net/ark: replace use of term sanity Date: Thu, 18 May 2023 09:45:38 -0700 Message-Id: <20230518164546.108105-12-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230518164546.108105-1-stephen@networkplumber.org> References: <20230517161603.117728-1-stephen@networkplumber.org> <20230518164546.108105-1-stephen@networkplumber.org> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Do not use non inclusive terms. Signed-off-by: Stephen Hemminger --- drivers/net/ark/ark_ethdev.c | 8 ++++---- drivers/net/ark/ark_ethdev_rx.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c index b2995427c8ca..9cb1c5dea49e 100644 --- a/drivers/net/ark/ark_ethdev.c +++ b/drivers/net/ark/ark_ethdev.c @@ -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", diff --git a/drivers/net/ark/ark_ethdev_rx.c b/drivers/net/ark/ark_ethdev_rx.c index cbc0416bc2d2..e293d78db353 100644 --- a/drivers/net/ark/ark_ethdev_rx.c +++ b/drivers/net/ark/ark_ethdev_rx.c @@ -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)) { From patchwork Thu May 18 16:45:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 127035 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8C29D42B34; Thu, 18 May 2023 18:47:24 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 79E8342DC2; Thu, 18 May 2023 18:46:07 +0200 (CEST) Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by mails.dpdk.org (Postfix) with ESMTP id 6B85F42D4B for ; Thu, 18 May 2023 18:46:03 +0200 (CEST) Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-64354231003so1068896b3a.0 for ; Thu, 18 May 2023 09:46:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1684428363; x=1687020363; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ryCQAdGNtZano17UY10DpviX8XNuxHY4K/cLYcKhH1U=; b=tgqA9o6CMtEhWgjuiQY6XPYOsTPJ0xFGBhEZDgJt9RMcR9TKX71M9z9o6TwGYDo4hH 2j8zINvi3wFU+MhYX5JQDQCYH1SU+bJ8JUY/jN1uevdiJ0LZlCOPP9WaoaDdZs3zw2ui Dzxu6ldwDsISJDynMMGkl7Mvn1opbBNHSkqtALUPXvNHjGMI4vYfhaWXeEa5tBfygkLN qIXjiuqN/goCX2j4CiRlTl4GiC+/EPyLWw5WtbJsqFkzJDsdWOZKxB06wnAEtgTYtDWG mepBCWJzP4fHDxgMGKy9003K3wp1GE53XeWsutq1FsLprMJTvJhBzFKhjoRSmkEoQf2s K/kA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684428363; x=1687020363; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ryCQAdGNtZano17UY10DpviX8XNuxHY4K/cLYcKhH1U=; b=El7giCqxYOv58uRSuSmyCwt13dLYZ6tXMMWFBgassfF7hfdM6DuZy52kqlF+Mtsfqw hNHZleaUttSnWostkuK22/6OZDMneGwidH+szcj6UoTsyiB4Zw6eUz7C3bNug/YP7D3/ +7WQI5RCR/pebXAvUbZLwgB8ZlqGPxBos1tZqJmDx6eQOrf9tIUFcBEWHUNNV5r7yZAf 0PaRNzhPdMupWY60KNUtUwA2rlARsFFOqAscAfLU89j1hwcW5cjC2VBnO5Z5dW7EbhjD DOEHeljOtTCCpeIbV3GeGrkgVJDfyzhUhPxC8sy0uAd08tztHNnjCVEXJ0uy514xmxAl ZPxg== X-Gm-Message-State: AC+VfDw7sc58sLomJPUhdnfva4QwN8mw1AJYYgW0ysd41WpuaH88VyBC yBwmDRV3lWSkPBbVc+WrsGFTS0FSHKuP0Hbbdepe2mXy X-Google-Smtp-Source: ACHHUZ6TSNUbgN5/J5oYE6HZxMeOCaEMR/HCXY5lyuQxjCzFLqmtiFf8LwP5OWSODb/AS9pRuQn3Fg== X-Received: by 2002:a05:6a20:72a1:b0:105:108f:4827 with SMTP id o33-20020a056a2072a100b00105108f4827mr16362pzk.23.1684428362748; Thu, 18 May 2023 09:46:02 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id j7-20020a62e907000000b005e0699464e3sm1513579pfh.206.2023.05.18.09.46.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 May 2023 09:46:02 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Ajit Khaparde , Somnath Kotur Subject: [PATCH v2 12/19] net/bnxt: replace use of term sanity Date: Thu, 18 May 2023 09:45:39 -0700 Message-Id: <20230518164546.108105-13-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230518164546.108105-1-stephen@networkplumber.org> References: <20230517161603.117728-1-stephen@networkplumber.org> <20230518164546.108105-1-stephen@networkplumber.org> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Do not use non-inclusive terms. Signed-off-by: Stephen Hemminger --- drivers/net/bnxt/bnxt_hwrm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index 51e1e2d6b39b..5370293fed8d 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -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 */ From patchwork Thu May 18 16:45:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 127036 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3950442B34; Thu, 18 May 2023 18:47:31 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B661842DCC; Thu, 18 May 2023 18:46:08 +0200 (CEST) Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by mails.dpdk.org (Postfix) with ESMTP id ABE8642D94 for ; Thu, 18 May 2023 18:46:04 +0200 (CEST) Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-64354231003so1068920b3a.0 for ; Thu, 18 May 2023 09:46:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1684428364; x=1687020364; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2ExCDqThjCDlZxRs/cZRIJvP1uteJ/8ZUE6rrQ56gqA=; b=HdB22JIfQruIWH/B/3ISK/Xnf96IXkv1/dXVhiSS1mqXJogOHiFNCTIrl2OCEpIbid VqYpsvN7duAHK8fq3S7miLUxwuFwNGDk7NCvpINJfoS0L08BvcVCjx0a2C0qBYE9OmSQ KpOaJVIKZ5LmXLLFxefmliTSbNKZlvG6w6P+Fr3cMV8WLTDwgqF4kVP/8P9When+KQam fwoYq/VzQTqDvuCdUt+lixbe+LGs+sSoAzN9W9puqP+lW9oLuEZG3biGJvYhY6iIn1p3 8wW3rjK6/8C0P2wUe1wm0++7elM9XD9m903RGJr7W6xbXX38vdBFhGr1NlTY3rEVsgNS feHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684428364; x=1687020364; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2ExCDqThjCDlZxRs/cZRIJvP1uteJ/8ZUE6rrQ56gqA=; b=Z6rQKfikCVw7bYCJBfgyLlc1WojamafttVufb5Ke2GYE7RBghmAkbfKiuq07agVRVQ fdrjk6ShJgVPvJYP9i7h8HuUsHAEbP2rbmADMdno7R8zY/7OuP0ttap9M8pOkla5iB6i gV7aWtSzum+g6kBSDleWTs8rsTUA9zF8xWx1mIDcWFoK1K9DQEGGDUrcmdcYbf1RaEO9 34EaE/Y9X7cCAmUi44koaJiBHEOOvKmR20fGd/cCDX6iwFUMowup62rCFUVssBxv2RHR RPKR6ZUpgUs7qUzDWPpvNbQG1ypF1JgZUpzgtcyfvY2Fj+ydUcMq75SnjuvBBGuiQI2d BsOA== X-Gm-Message-State: AC+VfDw8V2OaR/ekK9CWtIJBi0txRG//dhLvYoaNA4ArCPy6Yapjqegx 32h0XW/jeTknLzGV+JLtTi2LsFafwThzwum/V1xl7qe4 X-Google-Smtp-Source: ACHHUZ4DM7m4Nxwo8uuILm1Ng+3Xnxxo5NfuTTSkKRWePscN0wCZ269SQmjE436ZdlaibLmvZQ7q5g== X-Received: by 2002:a05:6a00:2d8f:b0:63d:6744:8cae with SMTP id fb15-20020a056a002d8f00b0063d67448caemr4085662pfb.2.1684428363944; Thu, 18 May 2023 09:46:03 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id j7-20020a62e907000000b005e0699464e3sm1513579pfh.206.2023.05.18.09.46.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 May 2023 09:46:03 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Rasesh Mody , Shahed Shaikh Subject: [PATCH v2 13/19] net/bnx2x: remove reference to sanity Date: Thu, 18 May 2023 09:45:40 -0700 Message-Id: <20230518164546.108105-14-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230518164546.108105-1-stephen@networkplumber.org> References: <20230517161603.117728-1-stephen@networkplumber.org> <20230518164546.108105-1-stephen@networkplumber.org> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Replace "sanity check" Signed-off-by: Stephen Hemminger --- 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(-) diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c index 29c16bb207c7..0d2dc2d3b3fa 100644 --- a/drivers/net/bnx2x/bnx2x.c +++ b/drivers/net/bnx2x/bnx2x.c @@ -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, diff --git a/drivers/net/bnx2x/bnx2x_stats.c b/drivers/net/bnx2x/bnx2x_stats.c index c07b01510a06..86d90679ac0a 100644 --- a/drivers/net/bnx2x/bnx2x_stats.c +++ b/drivers/net/bnx2x/bnx2x_stats.c @@ -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; diff --git a/drivers/net/bnx2x/ecore_sp.c b/drivers/net/bnx2x/ecore_sp.c index c6c3857778f7..158205266f62 100644 --- a/drivers/net/bnx2x/ecore_sp.c +++ b/drivers/net/bnx2x/ecore_sp.c @@ -207,7 +207,7 @@ static int ecore_exe_queue_step(struct bnx2x_softc *sc, break; } - /* Sanity check */ + /* Argument check */ if (!cur_len) return ECORE_SUCCESS; diff --git a/drivers/net/bnx2x/elink.c b/drivers/net/bnx2x/elink.c index 43fbf04ece11..2b0236aac24e 100644 --- a/drivers/net/bnx2x/elink.c +++ b/drivers/net/bnx2x/elink.c @@ -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; From patchwork Thu May 18 16:45:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 127037 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4D0FE42B34; Thu, 18 May 2023 18:47:38 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D055842F86; Thu, 18 May 2023 18:46:09 +0200 (CEST) Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) by mails.dpdk.org (Postfix) with ESMTP id ED19642DBC for ; Thu, 18 May 2023 18:46:06 +0200 (CEST) Received: by mail-pf1-f174.google.com with SMTP id d2e1a72fcca58-64d18d7738dso678514b3a.3 for ; Thu, 18 May 2023 09:46:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1684428366; x=1687020366; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Ox2/1DyBdWFGOTpbAGYHhFIlWAE+SizGnBjAsFKISvE=; b=gJOGAZ+HBRlsSzX7Zb0a+w8sPhObWf8RPS/quHRwZ48PSQoj79mdtS/23PIiOnLY+q X+rZ6AJsrs4xLPr4hVML65PKvEJ+MyGb+HBYkqAXc30Js1G5R3toQI2ELxB2uSAoRTYC z3jMkvZ5X3KBpKg2oSDPBiKbNGQze+3Q2PhL61G1/IIRfi6tDtam5+nLR5bTMfpSXimE FwM8ewiA/TsEWyhp/k5CDafTgcOrK4ZQgXfi6yDcmzC1hU7IsGr8hbGa6Wv3OgbkiTPS i7o+wdBOv9r450FOe54ZttyLNmHyrUO7ruRLTQ6KdRXyF6r5JJbO105OX/VlJOZsnI4f eY2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684428366; x=1687020366; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ox2/1DyBdWFGOTpbAGYHhFIlWAE+SizGnBjAsFKISvE=; b=d37mNDdU3LjFiouwwdjQ0BkEO5a0vju5kJFd/UgJjiGwX9kkAQDacoX+aMcAGd3Tyr InOcMz7jjYpGIRdWnI86dXgNIqszdETzTSeLvfvPjw0+dOYJOAcAmI0lBx8WXKOKk/7a /AZzSNGVQqWrnA816E6AE4AzM+vFqfLAxwsDb2ssEJu+2Y47Hamp1sNif+0ANLim/XOK RJWJvb+sP67gRkq9ZGh9ntH9ML4L+iKsgs93+xE4bRLxuhmNmHJN9mwCdO/2MTiZ01p1 e+6PG6t3/Rio860JzzXminYfqkZgtUFIhNaJTnFy+lSNYB6I2GKAzhEgag9nYFPlElNX bMJA== X-Gm-Message-State: AC+VfDyUsnMpqx8q2h6zfbUSOqvwgk4NyRS10cDtLC58lCk//v1daBTR tD5lAi2H8uG4p7sn3mhFYGVgtOpBcPF0vvVgopmkF+JO X-Google-Smtp-Source: ACHHUZ6ykESyNHUtEasjGo1ZRHIHBF/2Fz3YYZkK3PZxy0zJ3gBLfiMK1xIbP+0I1sczUH4gAigXJQ== X-Received: by 2002:a05:6a00:138f:b0:64a:a1ba:50fd with SMTP id t15-20020a056a00138f00b0064aa1ba50fdmr5585448pfg.22.1684428365976; Thu, 18 May 2023 09:46:05 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id j7-20020a62e907000000b005e0699464e3sm1513579pfh.206.2023.05.18.09.46.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 May 2023 09:46:04 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao Subject: [PATCH v2 14/19] cnxk: replace term sanity Date: Thu, 18 May 2023 09:45:41 -0700 Message-Id: <20230518164546.108105-15-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230518164546.108105-1-stephen@networkplumber.org> References: <20230517161603.117728-1-stephen@networkplumber.org> <20230518164546.108105-1-stephen@networkplumber.org> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Do not use non-inclusive naming. Signed-off-by: Stephen Hemminger --- 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(-) diff --git a/drivers/common/cnxk/roc_nix_tm_ops.c b/drivers/common/cnxk/roc_nix_tm_ops.c index 4e88ad1beb71..d837e2247634 100644 --- a/drivers/common/cnxk/roc_nix_tm_ops.c +++ b/drivers/common/cnxk/roc_nix_tm_ops.c @@ -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) diff --git a/drivers/common/cnxk/roc_npa.c b/drivers/common/cnxk/roc_npa.c index 20637fbf657c..08e193e6118c 100644 --- a/drivers/common/cnxk/roc_npa.c +++ b/drivers/common/cnxk/roc_npa.c @@ -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; diff --git a/drivers/net/cnxk/cnxk_ethdev.c b/drivers/net/cnxk/cnxk_ethdev.c index 1cae3084e184..8fdc3d5a9a96 100644 --- a/drivers/net/cnxk/cnxk_ethdev.c +++ b/drivers/net/cnxk/cnxk_ethdev.c @@ -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; From patchwork Thu May 18 16:45:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 127038 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5FBB242B34; Thu, 18 May 2023 18:47:45 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DA2B742F90; Thu, 18 May 2023 18:46:10 +0200 (CEST) Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) by mails.dpdk.org (Postfix) with ESMTP id 97E1942DA8 for ; Thu, 18 May 2023 18:46:07 +0200 (CEST) Received: by mail-pf1-f175.google.com with SMTP id d2e1a72fcca58-643465067d1so1784415b3a.0 for ; Thu, 18 May 2023 09:46:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1684428367; x=1687020367; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=U7jbFcrIk8aeX00x0BwSijIpJbE/SS1FAXi4PEONwoM=; b=5XJgaYCD3jT8KbvCvs2NTZKUcbTlELpWyVLHXfgy8FIW1OVIusHx1sAu0g49400O7h PSjLYBkqjymOWCnbhYJkJejH5ktcXyWNMkLVWmenZLaxCX8Zc0LJFWNbTUZW+p5ii86b SCCSoQWJz2e9wX9rqeBIwRSnHV/8SdvHWdNqUqSLoW0EorTRBMDYMNhVSY/hNWvHbqOp Oc0n9/UM//3KAmSbx7JQQCXtDTw1heyz7i0ClA22cwJRkCuHX6PGDTRnZZpjm9s4ek59 Xu0u2GsEdLCJktV6Cv6KcZQ6JSzy/w8omvRVq5uUGNgE6dbJr/FyDZqr2g1f0rgRRG5i FlNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684428367; x=1687020367; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=U7jbFcrIk8aeX00x0BwSijIpJbE/SS1FAXi4PEONwoM=; b=MahjqQ6/WQ7WmkLspqXb8Kq0dk86JkpvZYUw6SFei83bR7fIPuULsmDWaS2UzOx7CQ vafH2jPOPT8+EzefwSz07UDo/i2Zc5s3u1GWiDAvAd8+TsEOKQG4FWv/yc8mzj4utKzy W+PzgcgDJKaM/CoGDf3IB644nkM1IzsCkGiVyya8WaYr5YiAzCvQ4jAbQvJ6MsZEgeBQ AGxzxKdgrYpaubN4y2BeUrqsttDR7u3m2whq1UCJhcSCNV2/sS06TQSSvNbcLp2NB5zr AmQ38zJNOLb4GlqHeKR0we16o/xHuK04dzoLkwYXL25o+mZOaNsDy3FgeBvx+UiLPh8Q +NPg== X-Gm-Message-State: AC+VfDwF4NrMUqe1crSGzYzyIWlhX77gPHlvVcPA0G3SzOfL3ypMMnZD 6z/nbqslu2uwPyDGAcmWOo6ZtRYcw7GjUDl6kqKfpZqf X-Google-Smtp-Source: ACHHUZ6P/FzE1MBBFb4lZY+jIx/OOcygqt9AFbmdn51wACOxJLntITVbO1im+vtDmcELBS7urBc0+Q== X-Received: by 2002:a05:6a00:2e83:b0:648:64fe:b14b with SMTP id fd3-20020a056a002e8300b0064864feb14bmr5595540pfb.32.1684428366899; Thu, 18 May 2023 09:46:06 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id j7-20020a62e907000000b005e0699464e3sm1513579pfh.206.2023.05.18.09.46.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 May 2023 09:46:06 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Liang Ma , Peter Mccarthy Subject: [PATCH v2 15/19] event/opdl: remove term sanity Date: Thu, 18 May 2023 09:45:42 -0700 Message-Id: <20230518164546.108105-16-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230518164546.108105-1-stephen@networkplumber.org> References: <20230517161603.117728-1-stephen@networkplumber.org> <20230518164546.108105-1-stephen@networkplumber.org> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Don't use non-inclusive term. Signed-off-by: Stephen Hemminger --- drivers/event/opdl/opdl_evdev.c | 2 +- drivers/event/opdl/opdl_evdev_init.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/event/opdl/opdl_evdev.c b/drivers/event/opdl/opdl_evdev.c index 9ce8b39b6098..862f3fa9b27a 100644 --- a/drivers/event/opdl/opdl_evdev.c +++ b/drivers/event/opdl/opdl_evdev.c @@ -241,7 +241,7 @@ opdl_queue_setup(struct rte_eventdev *dev, struct opdl_evdev *device = opdl_pmd_priv(dev); - /* Extra sanity check, probably not needed */ + /* Extra check, probably not needed */ if (queue_id == OPDL_INVALID_QID) { PMD_DRV_LOG(ERR, "DEV_ID:[%02d] : " "Invalid queue id %u requested\n", diff --git a/drivers/event/opdl/opdl_evdev_init.c b/drivers/event/opdl/opdl_evdev_init.c index be3437fc2f40..12eb2695f5de 100644 --- a/drivers/event/opdl/opdl_evdev_init.c +++ b/drivers/event/opdl/opdl_evdev_init.c @@ -300,7 +300,7 @@ static int opdl_add_deps(struct opdl_evdev *device, struct opdl_queue *queue_deps = &device->queue[deps_q_id]; struct opdl_stage *dep_stages[OPDL_PORTS_MAX]; - /* sanity check that all stages are for same opdl ring */ + /* check that all stages are for same opdl ring */ for (i = 0; i < queue->nb_ports; i++) { struct opdl_ring *r = opdl_stage_get_opdl_ring(stage_for_port(queue, i)); From patchwork Thu May 18 16:45:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 127039 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0FBB742B34; Thu, 18 May 2023 18:47:52 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E549242F96; Thu, 18 May 2023 18:46:11 +0200 (CEST) Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) by mails.dpdk.org (Postfix) with ESMTP id DCC5E42F82 for ; Thu, 18 May 2023 18:46:08 +0200 (CEST) Received: by mail-pf1-f177.google.com with SMTP id d2e1a72fcca58-643a1fed360so1619074b3a.3 for ; Thu, 18 May 2023 09:46:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1684428368; x=1687020368; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=4h4rys5G+IxB/bimWPFOuIYwFdYnGtqo83jxYvm/eY8=; b=2+M/fhA72Xfy7F8hNeoJdHaLyFVtKCbB9f9dLC2G1EzjGe6bI7gRMs9NMpRUvYyplh SFTHp8BfwwUlpZ0WxF6WvFWJZ7jHRRf20PsWJTCC+tAfV10v2cFXbzF52YCPqNmV7ClX zQZAYBZb2vmpjRpPbLBY0no2hctTmV1JbS5w+WgbA04JGbWsg7+gkKA75Tnn6CRxwCa6 JF8CSCUBGxg/jeu6tUoz9iZAo5s0dVC23Q4XyC80vC6Gf/yqy4hyO6RtS7YdgrhzLj95 Z5+rMv/a0og/Qlc44mNhJ30Lk13h7asH2y2GmVyhhyGkqlwUQLbKklsM+r1VyD0N9GRL qRFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684428368; x=1687020368; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4h4rys5G+IxB/bimWPFOuIYwFdYnGtqo83jxYvm/eY8=; b=kKQ9Va5hNNyHcaExPdV8K/oMeIrglxnu+Pt+nUS6hcarES/C1XyWuiJvrjPXgvY6Qa sf6u6JtDVN1f1RGH0AhQ+vkBpUKgcq72PNPPIi5AslCt0se02EELFcOcERm6SjH1mMAU miRwvEv+gvmNDi9TKr+/CE62RnkYrlCsErisRLNxhg7TXaQGqM+ELrW89GDrtKWgHzjU fzkc2nLphdvQH9ZW7kXLrR34Gg60DfFQKXsk4flilNO2NgKC7L49KNvYzBdENpouBYyQ 3Qw2oeCBEj+PSaDUT2WH9FsOirU3bcRPP35/jdQbay7RlxJdCBrQs+nNH6s+uhtdv6JE ATrw== X-Gm-Message-State: AC+VfDwlV4pkfMce/BkpeEC9ZdPqcuwhwuruVMkl0prq/bZCit6kq+GH GR9qb3N7aJRV/jxLHhBlHyUbKzhEn0KCvMK0A0YOatRo X-Google-Smtp-Source: ACHHUZ7/dwRuvfkgTSMvj1uwP2aVZmUdjP1Os3ongKzcrgcEZ7ODjBuLbYPFiY/dRllR03Gfu7u4Pw== X-Received: by 2002:a05:6a00:15c1:b0:64c:ae1c:3385 with SMTP id o1-20020a056a0015c100b0064cae1c3385mr5895100pfu.32.1684428367881; Thu, 18 May 2023 09:46:07 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id j7-20020a62e907000000b005e0699464e3sm1513579pfh.206.2023.05.18.09.46.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 May 2023 09:46:07 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Jiawen Wu , Jian Wang Subject: [PATCH v2 16/19] net/txgbe: replace term sanity Date: Thu, 18 May 2023 09:45:43 -0700 Message-Id: <20230518164546.108105-17-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230518164546.108105-1-stephen@networkplumber.org> References: <20230517161603.117728-1-stephen@networkplumber.org> <20230518164546.108105-1-stephen@networkplumber.org> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Don't use term sanity. Signed-off-by: Stephen Hemminger --- drivers/net/txgbe/txgbe_ipsec.c | 2 +- drivers/net/txgbe/txgbe_rxtx.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/txgbe/txgbe_ipsec.c b/drivers/net/txgbe/txgbe_ipsec.c index f9f8108fb894..cadb0943c82d 100644 --- a/drivers/net/txgbe/txgbe_ipsec.c +++ b/drivers/net/txgbe/txgbe_ipsec.c @@ -595,7 +595,7 @@ txgbe_crypto_enable_ipsec(struct rte_eth_dev *dev) rx_offloads = dev->data->dev_conf.rxmode.offloads; tx_offloads = dev->data->dev_conf.txmode.offloads; - /* sanity checks */ + /* offload checks */ if (rx_offloads & RTE_ETH_RX_OFFLOAD_TCP_LRO) { PMD_DRV_LOG(ERR, "RSC and IPsec not supported"); return -1; diff --git a/drivers/net/txgbe/txgbe_rxtx.c b/drivers/net/txgbe/txgbe_rxtx.c index 427f8b82ac80..ef6478b8a5c8 100644 --- a/drivers/net/txgbe/txgbe_rxtx.c +++ b/drivers/net/txgbe/txgbe_rxtx.c @@ -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; From patchwork Thu May 18 16:45:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 127040 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4BC2242B34; Thu, 18 May 2023 18:47:58 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F0BF942FA2; Thu, 18 May 2023 18:46:12 +0200 (CEST) Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) by mails.dpdk.org (Postfix) with ESMTP id 0FAE542F8A for ; Thu, 18 May 2023 18:46:10 +0200 (CEST) Received: by mail-pf1-f173.google.com with SMTP id d2e1a72fcca58-64cfb8d33a5so1278844b3a.2 for ; Thu, 18 May 2023 09:46:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1684428369; x=1687020369; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QbPW5NlN/oktrtXO/Djd0dV/g9YCo5upuw7v3/N0IxI=; b=MEPNHOOhXn0szyhjcYDZYu7OtGU9wHnxLqjSYgtWdt2jnwWWjwItGFKBEpohn+IAmH buXG2iiApH90Js+nCsPsSVFKymsG4rIvlu8BjNDuE33x5DOakwupXalJ+1i0ywL/mWmy XvBlxfcxJtJ8na+kq9kzSik5r57TG00oBteE/keqRCWShV1IMH19/wymwLWLp/IWc9nH CXFxDCnyU6VC4Dmax66R+k/mCOEH2ibqhwHEsUOWlXKYnLCpBMIJEKpTn0B10Y8Sntfy LhuT3OM/rwKO0vPL1A+Xuk78PE/DCvdRFLdw3WtH067sXsMyD3tHw87U42m4+5o86TrU lMtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684428369; x=1687020369; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QbPW5NlN/oktrtXO/Djd0dV/g9YCo5upuw7v3/N0IxI=; b=CHvI+Zj3JoT/yc74XlU0NQzEvQhMKm0SCSGoQezJ2N0bR7XaNOMAg4LdprJ9Xiue2T MxyWKIzScc00q4Oz6cI2QvMta+beOpoZdHAkbQ7WIk13BqSSmSie1DBq8TcwYxMCjZMA vKcMJD/76BIomXUomPxk3jkqiZ8Xf6fHlof0EWaVQ3M0INgIw/GrKH1yqlqOts4HLX4P dyS+DH3XaCAfKHlQgo2A7YTsPpgVOPcWu++eXg2DQ9HKpaEaDcHQ3l57UqM0MefF0goC FLOwmmXN9Jl0umCvX7rtdMFHoiic5ZgKamm+sM3AlmofanjmQKNFOECTnwLqYarU8a3N Zkdg== X-Gm-Message-State: AC+VfDz/aQo3w+3HIJWDDd8ytYSgqICUfKLwqmOyZzoAjWE+BDYUm+oL UPRE66b7s0U3gsf4GO3UclV81T4VyiPpOf+St471llU8 X-Google-Smtp-Source: ACHHUZ7/pSTSZZCAZ986SZ6NnM0x/oPTZ3QOxtEFkCIPt+BOJ2Hi7GHF7Vn0rVTXCeRrEsSgdLpYlA== X-Received: by 2002:a05:6a00:1308:b0:648:1311:fbc4 with SMTP id j8-20020a056a00130800b006481311fbc4mr5407161pfu.33.1684428369263; Thu, 18 May 2023 09:46:09 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id j7-20020a62e907000000b005e0699464e3sm1513579pfh.206.2023.05.18.09.46.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 May 2023 09:46:08 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Rahul Lakkireddy Subject: [PATCH v2 17/19] net/cxgbe: remove use of term sanity Date: Thu, 18 May 2023 09:45:44 -0700 Message-Id: <20230518164546.108105-18-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230518164546.108105-1-stephen@networkplumber.org> References: <20230517161603.117728-1-stephen@networkplumber.org> <20230518164546.108105-1-stephen@networkplumber.org> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Remove non-inclusive terminolgy. Signed-off-by: Stephen Hemminger --- drivers/net/cxgbe/cxgbe_ethdev.c | 10 ++-------- drivers/net/cxgbe/cxgbevf_main.c | 4 ++-- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c index 45bbeaef0ceb..2abb721afda1 100644 --- a/drivers/net/cxgbe/cxgbe_ethdev.c +++ b/drivers/net/cxgbe/cxgbe_ethdev.c @@ -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", diff --git a/drivers/net/cxgbe/cxgbevf_main.c b/drivers/net/cxgbe/cxgbevf_main.c index d0c93f8ac3a5..dfb12b4ed5c9 100644 --- a/drivers/net/cxgbe/cxgbevf_main.c +++ b/drivers/net/cxgbe/cxgbevf_main.c @@ -137,7 +137,7 @@ static int adap_init0vf(struct adapter *adapter) /* * Grab our Virtual Interface resource allocation, extract the - * features that we're interested in and do a bit of sanity testing on + * features that we're interested in and do a bit of testing on * what we discover. */ err = t4vf_get_vfres(adapter); @@ -148,7 +148,7 @@ static int adap_init0vf(struct adapter *adapter) } /* - * Check for various parameter sanity issues. + * Check for various parameter issues. */ if (adapter->params.vfres.pmask == 0) { dev_err(adapter->pdev_dev, "no port access configured\n" From patchwork Thu May 18 16:45:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 127041 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7FAF742B34; Thu, 18 May 2023 18:48:07 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 54B6542FBA; Thu, 18 May 2023 18:46:14 +0200 (CEST) Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) by mails.dpdk.org (Postfix) with ESMTP id 55FB742F94 for ; Thu, 18 May 2023 18:46:11 +0200 (CEST) Received: by mail-pf1-f182.google.com with SMTP id d2e1a72fcca58-64d247a023aso503004b3a.2 for ; Thu, 18 May 2023 09:46:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1684428370; x=1687020370; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=69mHfvs2lidrOAYmWKgl8XU07nB+W9FxVe9ZBT1ukeY=; b=E9DuSiaHzHpRFZkBCUFrtYXyemsXGtYu/X2JBf7WFLDDAOSu3VQeLbiov/jmpsaKAC nOUmvy5zfGSWWcYEUbZbrSnqLzQX65ezI6xdlSD/cfwP1o7gVX7i+L7+RwXiao5tKUx7 nHRjOoI29wPsGcDw18uGUSeBEcVjCTcRcXrYghdLk3UINo0rlYIWTp6m/7ArG+bnZ5L/ Cao3CZPJMMiCCrYdZmaUxEcNo6pHfzvfKp7Nh717I3al9UqWJx54rj6SsKBMr2ocg9Hd 6Dvf3OWxepMAeMzl0nr7WJbOIxnQ7SNKIuWTamu3ocN1YOUWLpmiVhQ3fcuFh29JlUHQ BIFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684428370; x=1687020370; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=69mHfvs2lidrOAYmWKgl8XU07nB+W9FxVe9ZBT1ukeY=; b=gSNIGyCPsLGaGJr/mAUQ8y5H59pEfSo60LaL36UZU8V3VEifoFmTsAGAvBucInYFWv 9zgM89BOzbDNsSEDbkdwbOWF6mlnyFhvIBJdTKtgJB7ln/1plA0Ae5bO4Thys7eFkVVt UywrscZBACJ3vLUfLCKjj6CaMuPoEadheCoR65SmLg5CBGi8KoNBVbzOef+Aq3B4+KGy q1OFQ7W3Eg8i21MMi7y7WDUfLJSllVPC0k3zfbHS6G6ijM/aYLYf77OSnAWig7L6SG2b 0qUgdz7UjcOKstIt7jMxuJ0sCOLlw+loRy9ohQimktCvv1wPMf6Im81v6nmUYPmUSuda dfKA== X-Gm-Message-State: AC+VfDwHt9GDa1ubhDoFvcaY2nrXFDzgTF69i26mDt0XmM819bI10rPH gVx9hx3mSwfCd6yxhz5nGuEMAbPYCyoa2+bUv1hzombx X-Google-Smtp-Source: ACHHUZ6+E6lUIqCGV3ihhl+uZvoBqDT0xeobp1//joVwdiLyB4jhlROGdLba6NNQKuyycFp0ikGF2g== X-Received: by 2002:a05:6a21:3393:b0:104:ad71:f080 with SMTP id yy19-20020a056a21339300b00104ad71f080mr373258pzb.34.1684428370394; Thu, 18 May 2023 09:46:10 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id j7-20020a62e907000000b005e0699464e3sm1513579pfh.206.2023.05.18.09.46.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 May 2023 09:46:10 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Ajit Khaparde , Raveendra Padasalagi , Vikas Gupta Subject: [PATCH v2 18/19] crypto/bcmfs: replace term sanity check Date: Thu, 18 May 2023 09:45:45 -0700 Message-Id: <20230518164546.108105-19-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230518164546.108105-1-stephen@networkplumber.org> References: <20230517161603.117728-1-stephen@networkplumber.org> <20230518164546.108105-1-stephen@networkplumber.org> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Do not use non-inclusive naming here. Signed-off-by: Stephen Hemminger --- drivers/crypto/bcmfs/hw/bcmfs4_rm.c | 6 +++--- drivers/crypto/bcmfs/hw/bcmfs5_rm.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/bcmfs/hw/bcmfs4_rm.c b/drivers/crypto/bcmfs/hw/bcmfs4_rm.c index 0ccb111898e4..50280fe14176 100644 --- a/drivers/crypto/bcmfs/hw/bcmfs4_rm.c +++ b/drivers/crypto/bcmfs/hw/bcmfs4_rm.c @@ -317,7 +317,7 @@ bcmfs4_mdst_desc(uint64_t addr, unsigned int length_div_16) } static bool -bcmfs4_sanity_check(struct bcmfs_qp_message *msg) +bcmfs4_message_check(struct bcmfs_qp_message *msg) { unsigned int i = 0; @@ -458,8 +458,8 @@ bcmfs4_enqueue_single_request_qp(struct bcmfs_qp *qp, void *op) struct bcmfs_queue *txq = &qp->tx_q; struct bcmfs_qp_message *msg = (struct bcmfs_qp_message *)op; - /* Do sanity check on message */ - if (!bcmfs4_sanity_check(msg)) { + /* Do check on message */ + if (!bcmfs4_message_check(msg)) { BCMFS_DP_LOG(ERR, "Invalid msg on queue %d", qp->qpair_id); return -EIO; } diff --git a/drivers/crypto/bcmfs/hw/bcmfs5_rm.c b/drivers/crypto/bcmfs/hw/bcmfs5_rm.c index c677c0cd9b52..c45eea82de20 100644 --- a/drivers/crypto/bcmfs/hw/bcmfs5_rm.c +++ b/drivers/crypto/bcmfs/hw/bcmfs5_rm.c @@ -293,7 +293,7 @@ bcmfs5_mdst_desc(uint64_t addr, unsigned int len_div_16) } static bool -bcmfs5_sanity_check(struct bcmfs_qp_message *msg) +bcmfs5_message_check(struct bcmfs_qp_message *msg) { unsigned int i = 0; @@ -389,8 +389,8 @@ bcmfs5_enqueue_single_request_qp(struct bcmfs_qp *qp, void *op) struct bcmfs_queue *txq = &qp->tx_q; struct bcmfs_qp_message *msg = (struct bcmfs_qp_message *)op; - /* Do sanity check on message */ - if (!bcmfs5_sanity_check(msg)) { + /* Do check on message */ + if (!bcmfs5_message_check(msg)) { BCMFS_DP_LOG(ERR, "Invalid msg on queue %d", qp->qpair_id); return -EIO; } From patchwork Thu May 18 16:45:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 127042 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id BF03242B34; Thu, 18 May 2023 18:48:13 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3C2E142FC4; Thu, 18 May 2023 18:46:15 +0200 (CEST) Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) by mails.dpdk.org (Postfix) with ESMTP id 991FC42F9C for ; Thu, 18 May 2023 18:46:12 +0200 (CEST) Received: by mail-pf1-f179.google.com with SMTP id d2e1a72fcca58-64d24136685so464669b3a.1 for ; Thu, 18 May 2023 09:46:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1684428371; x=1687020371; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=IZ8g6Ml3xxg5roU39QxW2esztWRwohY9nM8G06iCqJY=; b=rR/93GhDVYk78bsRSPThnIBdecWjqNn0++0Rr9vNPNHBw3Dghw0LsOJprZsyhJujQl E4Vahd0OjgEU009THL7LZ/oNfMTlTIm7STObzzD22HymiZiofScmpqlrkugzwumiWM3y d5NNnQ/LxRUtmBW1gDCo3IQULwEBJDMS7SZk0JhoVzWOSFmWY7O63lDmZKdycGJNTmZf SZXNDCPAdHQPk3hELVLTFMgm80kQyO2ZYxbf5Vp1jI3u6Fo9JV4/stWIHRNwxOsY97G+ erj5Fo+jVQBhVUq0kRjJBshJ1mADJpTTu2mi0xNrpY/y9wmBkH23FNEKrOUoxJLsyBhY g1mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684428371; x=1687020371; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IZ8g6Ml3xxg5roU39QxW2esztWRwohY9nM8G06iCqJY=; b=XhlhNnsua5wqU0fGg+UtbYZcUd+O/FMFdnypMvmulh3Vc2YtDRcl6TnA6tPwcCdDxZ 5uVNpujM+TgQWCnQSbRFhBGT2Ik/TwUBjpy3jlii9RzIZGgu3umpu0qb8I2sXm5JWFNH V6x7TwE0SEq74AelAgIbe/8l/5ejnf9SUn1TXsvQ1kV1MZeoMOMwXjt2CIwCMpXpzLI2 8+msXY3V8yIobh5PBBBs6ZZ+ym+QhEwJNmDeeK1r9KVadXsZbmzlLyWysvit945fBP0Z HxuKPu588ikWKZ5BzCeyU+LvBF2OI9u5lymrklAuRq41KTgJvWrFj9LiLHhVlRUkrAKL pyVA== X-Gm-Message-State: AC+VfDzLmwJx0rigGJhY1NYuxVyLyPHNamo67kK2qyKGindA4JURYMQA N0SgxerTUsItyWCQjLHWOEq6LZa7H/RxfLSCfIYLQ4jF X-Google-Smtp-Source: ACHHUZ5NJoPkfCZ24ufX/wgYRVFDfKx9tWRM03HMkfL98SLmD7MFisw/d0y7RlTpuoO9v9TBQbCjMA== X-Received: by 2002:aa7:8882:0:b0:63b:54e4:871b with SMTP id z2-20020aa78882000000b0063b54e4871bmr4508551pfe.8.1684428371532; Thu, 18 May 2023 09:46:11 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id j7-20020a62e907000000b005e0699464e3sm1513579pfh.206.2023.05.18.09.46.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 May 2023 09:46:11 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Hemant Agrawal , Sachin Saxena , Bruce Richardson , Kevin Laatz , Chas Williams , "Min Hu (Connor)" , Liron Himi , Devendra Singh Rawat , Alok Prasad Subject: [PATCH v2 19/19] Remove use of term sanity check Date: Thu, 18 May 2023 09:45:46 -0700 Message-Id: <20230518164546.108105-20-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230518164546.108105-1-stephen@networkplumber.org> References: <20230517161603.117728-1-stephen@networkplumber.org> <20230518164546.108105-1-stephen@networkplumber.org> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Replace non-inclusive language with better comments. Acked-by: Hemant Agrawal Signed-off-by: Stephen Hemminger --- 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(-) diff --git a/drivers/bus/fslmc/qbman/qbman_sys_decl.h b/drivers/bus/fslmc/qbman/qbman_sys_decl.h index caaae417773c..2b6162d0ceaf 100644 --- a/drivers/bus/fslmc/qbman/qbman_sys_decl.h +++ b/drivers/bus/fslmc/qbman/qbman_sys_decl.h @@ -9,7 +9,7 @@ #include #include -/* Sanity check */ +/* Byte order check */ #if (__BYTE_ORDER__ != __ORDER_BIG_ENDIAN__) && \ (__BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__) #error "Unknown endianness!" diff --git a/drivers/common/dpaax/caamflib/desc.h b/drivers/common/dpaax/caamflib/desc.h index 635d6bad071f..feb6a5d7bb2d 100644 --- a/drivers/common/dpaax/caamflib/desc.h +++ b/drivers/common/dpaax/caamflib/desc.h @@ -107,7 +107,7 @@ extern enum rta_sec_era rta_sec_era; /* * ONE - should always be set. Combination of ONE (always - * set) and ZRO (always clear) forms an endianness sanity check + * set) and ZRO (always clear) forms an endianness check */ #define HDR_ONE BIT(23) #define HDR_ZRO BIT(15) diff --git a/drivers/dma/idxd/idxd_pci.c b/drivers/dma/idxd/idxd_pci.c index 781fa02db3ca..a1e9b08940d9 100644 --- a/drivers/dma/idxd/idxd_pci.c +++ b/drivers/dma/idxd/idxd_pci.c @@ -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 --- a/drivers/net/bonding/rte_eth_bond_8023ad.c +++ b/drivers/net/bonding/rte_eth_bond_8023ad.c @@ -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 || diff --git a/drivers/net/mvpp2/mrvl_qos.c b/drivers/net/mvpp2/mrvl_qos.c index f43217bc589c..db5052a9ab6f 100644 --- a/drivers/net/mvpp2/mrvl_qos.c +++ b/drivers/net/mvpp2/mrvl_qos.c @@ -260,7 +260,7 @@ get_entry_values(const char *entry, uint8_t *tab, if (nb_rng_tokens != 2) return -3; - /* Range and sanity checks. */ + /* Range and input checks. */ if (get_val_securely(rng_tokens[0], &token_val) < 0) return -4; beg = (char)token_val; diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c index c35585f5fdd6..8b89841e03b1 100644 --- a/drivers/net/qede/qede_rxtx.c +++ b/drivers/net/qede/qede_rxtx.c @@ -1383,7 +1383,7 @@ qede_rx_process_tpa_end_cqe(struct qede_dev *qdev, cqe->len_list[0]); /* Update total length and frags based on end TPA */ rx_mb = rxq->tpa_info[cqe->tpa_agg_index].tpa_head; - /* TODO: Add Sanity Checks */ + /* TODO: Add more checks */ rx_mb->nb_segs = cqe->num_of_bds; rx_mb->pkt_len = cqe->total_packet_len; @@ -2211,7 +2211,7 @@ qede_xmit_prep_pkts(__rte_unused void *p_txq, struct rte_mbuf **tx_pkts, #ifdef RTE_LIBRTE_QEDE_DEBUG_TX static inline void -qede_mpls_tunn_tx_sanity_check(struct rte_mbuf *mbuf, +qede_mpls_tunn_tx_basic_check(struct rte_mbuf *mbuf, struct qede_tx_queue *txq) { if (((mbuf->outer_l2_len + mbuf->outer_l3_len) / 2) > 0xff) @@ -2473,7 +2473,7 @@ qede_xmit_pkts(void *p_txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) RTE_MBUF_F_TX_TUNNEL_MPLSINUDP) { mplsoudp_flg = true; #ifdef RTE_LIBRTE_QEDE_DEBUG_TX - qede_mpls_tunn_tx_sanity_check(mbuf, txq); + qede_mpls_tunn_tx_basic_check(mbuf, txq); #endif /* Outer L4 offset in two byte words */ tunn_l4_hdr_start_offset =