From patchwork Wed May 17 16:15: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: 126925 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 E82DF42B2C; Wed, 17 May 2023 18:16:17 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E28C242D29; Wed, 17 May 2023 18:16:09 +0200 (CEST) Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) by mails.dpdk.org (Postfix) with ESMTP id 891FE406B7 for ; Wed, 17 May 2023 18:16:08 +0200 (CEST) Received: by mail-pf1-f169.google.com with SMTP id d2e1a72fcca58-64354231003so143308b3a.0 for ; Wed, 17 May 2023 09:16:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1684340167; x=1686932167; 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=x28BgXhxXlzUC6u61ZFSHQ/XLofM5ks0SWUjiEZpX38=; b=jJf55Q3zL3lV7MM+HoI7sBI10ahNJYcinCIjMKBEQIAn0ADc7ojfuo21NGxMlht7T7 R8Nl7UtLCR0YSaaD1n74lSQ5HRcIgdvuhXIZfh6QkOyZDRKQSCdVqLPD+xXAWBCU+Q5Q HbzSXtF1kngL7UccYZ2wug7a4yl1klQbwbgILATXIs9A2+6nDNJsZcHPNFffuHX7Fct8 qjg4E5vk/dzVyt2uSpddSwAhlJnT4JC+IlK4wFoOfRSu9txKPoYgvQ3+ghBh/i/uIAVI JEeTv2jnfxKnPdc9iMrp1mF9+BEKkcR6ZNN1S14SfeMCC+/2GzoLv5CKZJKlCdYwsTqb 3V7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684340167; x=1686932167; 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=x28BgXhxXlzUC6u61ZFSHQ/XLofM5ks0SWUjiEZpX38=; b=J1cnX21LwEPMmpnMI/58CPCp2ZElLBZzn3a5nTLIzCvbsV2AmTkVGvFU0kec3t+Nma 3tm1mEbRvf87bsP+/U5/2bSP+nZ1t8/Q5XmNPwDwajP3x+DMjibeITOJJtoSa2rgswVl uK+8AJBvsHZIV0wHnkRdKWUbldPlsFLCqfOt0FzwwGnIYjFsBGWPDUDMu3pWgHdyICcM HCCgo+8ZJpESYf1KzmfEKZy+lmVMIWoah8M7+SDZJzzefIauJDmOe0dBL0fyI2ZF1An2 zMCwo9Z9XwT4PWkn3qAx/nu8s2Zo+tU/CfKoKooTow9vpMNF0LZ0n5Nz9DhfirOS+r3x L/Aw== X-Gm-Message-State: AC+VfDx5DLMQqXc48v7q1f/EvH3YDR/HjY42dTgccKAKgb+F75l5mBRK 20iTmj0KWijwifgI4azTIB4obEXWTzVEBgMfetdW6g== X-Google-Smtp-Source: ACHHUZ4IXr+CTZQhCSU/SNfi0Np+c8v/hNgeEZLs1sbJ4yYgTMUDA6bZLXIUq9I8Cw6Y6kBwuPQuIQ== X-Received: by 2002:a05:6a20:3c9e:b0:104:873:c3be with SMTP id b30-20020a056a203c9e00b001040873c3bemr3323067pzj.12.1684340167051; Wed, 17 May 2023 09:16:07 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id h5-20020a62b405000000b0063f33e216dasm15793009pfn.96.2023.05.17.09.16.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 May 2023 09:16:06 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Olivier Matz , Steven Webster , Matt Peters , Andrew Rybchenko Subject: [PATCH 01/20] mbuf: replace term sanity check Date: Wed, 17 May 2023 09:15:44 -0700 Message-Id: <20230517161603.117728-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230517161603.117728-1-stephen@networkplumber.org> References: <20230517161603.117728-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 check is on the Tier 2 list of words that should be replaced. Signed-off-by: Stephen Hemminger Acked-by: Andrew Rybchenko --- app/test/test_mbuf.c | 30 ++++++------- doc/guides/prog_guide/mbuf_lib.rst | 4 +- drivers/net/avp/avp_ethdev.c | 18 ++++---- drivers/net/sfc/sfc_ef100_rx.c | 6 +-- drivers/net/sfc/sfc_ef10_essb_rx.c | 4 +- drivers/net/sfc/sfc_ef10_rx.c | 4 +- drivers/net/sfc/sfc_rx.c | 2 +- examples/ipv4_multicast/main.c | 2 +- lib/mbuf/rte_mbuf.c | 16 +++---- lib/mbuf/rte_mbuf.h | 71 ++++++++++++++++-------------- lib/mbuf/version.map | 2 +- 11 files changed, 83 insertions(+), 76 deletions(-) diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c index 8d8d3b9386ce..db9bb3caeea2 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_validate(m, 1); + rte_mbuf_validate(m, 0); rte_pktmbuf_dump(stdout, m, 0); /* this prepend should fail */ @@ -1161,7 +1161,7 @@ test_refcnt_mbuf(void) #ifdef RTE_EXEC_ENV_WINDOWS static int -test_failing_mbuf_sanity_check(struct rte_mempool *pktmbuf_pool) +test_failing_mbuf_validate(struct rte_mempool *pktmbuf_pool) { RTE_SET_USED(pktmbuf_pool); return TEST_SKIPPED; @@ -1188,7 +1188,7 @@ verify_mbuf_check_panics(struct rte_mbuf *buf) /* No need to generate a coredump when panicking. */ rl.rlim_cur = rl.rlim_max = 0; setrlimit(RLIMIT_CORE, &rl); - rte_mbuf_sanity_check(buf, 1); /* should panic */ + rte_mbuf_validate(buf, 1); /* should panic */ exit(0); /* return normally if it doesn't panic */ } else if (pid < 0) { printf("Fork Failed\n"); @@ -1202,12 +1202,12 @@ verify_mbuf_check_panics(struct rte_mbuf *buf) } static int -test_failing_mbuf_sanity_check(struct rte_mempool *pktmbuf_pool) +test_failing_mbuf_validate(struct rte_mempool *pktmbuf_pool) { struct rte_mbuf *buf; struct rte_mbuf badbuf; - printf("Checking rte_mbuf_sanity_check for failure conditions\n"); + printf("Checking rte_mbuf_validate for failure conditions\n"); /* get a good mbuf to use to make copies */ buf = rte_pktmbuf_alloc(pktmbuf_pool); @@ -1729,7 +1729,7 @@ test_mbuf_validate_tx_offload(const char *test_name, GOTO_FAIL("%s: mbuf allocation failed!\n", __func__); if (rte_pktmbuf_pkt_len(m) != 0) GOTO_FAIL("%s: Bad packet length\n", __func__); - rte_mbuf_sanity_check(m, 0); + rte_mbuf_validate(m, 0); m->ol_flags = ol_flags; m->tso_segsz = segsize; ret = rte_validate_tx_offload(m); @@ -1936,7 +1936,7 @@ test_pktmbuf_read(struct rte_mempool *pktmbuf_pool) GOTO_FAIL("%s: mbuf allocation failed!\n", __func__); if (rte_pktmbuf_pkt_len(m) != 0) GOTO_FAIL("%s: Bad packet length\n", __func__); - rte_mbuf_sanity_check(m, 0); + rte_mbuf_validate(m, 0); data = rte_pktmbuf_append(m, MBUF_TEST_DATA_LEN2); if (data == NULL) @@ -1985,7 +1985,7 @@ test_pktmbuf_read_from_offset(struct rte_mempool *pktmbuf_pool) if (rte_pktmbuf_pkt_len(m) != 0) GOTO_FAIL("%s: Bad packet length\n", __func__); - rte_mbuf_sanity_check(m, 0); + rte_mbuf_validate(m, 0); /* prepend an ethernet header */ hdr = (struct ether_hdr *)rte_pktmbuf_prepend(m, hdr_len); @@ -2130,7 +2130,7 @@ create_packet(struct rte_mempool *pktmbuf_pool, GOTO_FAIL("%s: mbuf allocation failed!\n", __func__); if (rte_pktmbuf_pkt_len(pkt_seg) != 0) GOTO_FAIL("%s: Bad packet length\n", __func__); - rte_mbuf_sanity_check(pkt_seg, 0); + rte_mbuf_validate(pkt_seg, 0); /* Add header only for the first segment */ if (test_data->flags == MBUF_HEADER && seg == 0) { hdr_len = sizeof(struct rte_ether_hdr); @@ -2342,7 +2342,7 @@ test_pktmbuf_ext_shinfo_init_helper(struct rte_mempool *pktmbuf_pool) GOTO_FAIL("%s: mbuf allocation failed!\n", __func__); if (rte_pktmbuf_pkt_len(m) != 0) GOTO_FAIL("%s: Bad packet length\n", __func__); - rte_mbuf_sanity_check(m, 0); + rte_mbuf_validate(m, 0); ext_buf_addr = rte_malloc("External buffer", buf_len, RTE_CACHE_LINE_SIZE); @@ -2506,8 +2506,8 @@ test_pktmbuf_ext_pinned_buffer(struct rte_mempool *std_pool) GOTO_FAIL("%s: test_pktmbuf_copy(pinned) failed\n", __func__); - if (test_failing_mbuf_sanity_check(pinned_pool) < 0) - GOTO_FAIL("%s: test_failing_mbuf_sanity_check(pinned)" + if (test_failing_mbuf_validate(pinned_pool) < 0) + GOTO_FAIL("%s: test_failing_mbuf_validate(pinned)" " failed\n", __func__); if (test_mbuf_linearize_check(pinned_pool) < 0) @@ -2881,8 +2881,8 @@ test_mbuf(void) goto err; } - if (test_failing_mbuf_sanity_check(pktmbuf_pool) < 0) { - printf("test_failing_mbuf_sanity_check() failed\n"); + if (test_failing_mbuf_validate(pktmbuf_pool) < 0) { + printf("test_failing_mbuf_validate() failed\n"); goto err; } 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..627b362555e8 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_validate(m, 1); return m; } @@ -1614,7 +1614,7 @@ avp_dev_copy_to_buffers(struct avp_dev *avp, char *pkt_data; unsigned int i; - __rte_mbuf_sanity_check(mbuf, 1); + __rte_mbuf_validate(mbuf, 1); m = mbuf; src_offset = 0; @@ -1680,7 +1680,7 @@ avp_dev_copy_to_buffers(struct avp_dev *avp, first_buf->vlan_tci = mbuf->vlan_tci; } - avp_dev_buffer_sanity_check(avp, buffers[0]); + avp_dev_buffer_check(avp, buffers[0]); return total_length; } @@ -1798,7 +1798,7 @@ avp_xmit_scattered_pkts(void *tx_queue, #ifdef RTE_LIBRTE_AVP_DEBUG_BUFFERS for (i = 0; i < nb_pkts; i++) - avp_dev_buffer_sanity_check(avp, tx_bufs[i]); + avp_dev_buffer_check(avp, tx_bufs[i]); #endif /* send the packets */ 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..4be74e7af55a 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_validate(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..6afa9de98d4e 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_validate(const struct rte_mbuf *m, int is_header) { const char *reason; @@ -492,7 +492,7 @@ void rte_pktmbuf_free_bulk(struct rte_mbuf **mbufs, unsigned int count) if (unlikely(m == NULL)) continue; - __rte_mbuf_sanity_check(m, 1); + __rte_mbuf_validate(m, 1); do { m_next = m->next; @@ -542,7 +542,7 @@ rte_pktmbuf_clone(struct rte_mbuf *md, struct rte_mempool *mp) return NULL; } - __rte_mbuf_sanity_check(mc, 1); + __rte_mbuf_validate(mc, 1); return mc; } @@ -592,7 +592,7 @@ rte_pktmbuf_copy(const struct rte_mbuf *m, struct rte_mempool *mp, struct rte_mbuf *mc, *m_last, **prev; /* garbage in check */ - __rte_mbuf_sanity_check(m, 1); + __rte_mbuf_validate(m, 1); /* check for request to copy at offset past end of mbuf */ if (unlikely(off >= m->pkt_len)) @@ -656,7 +656,7 @@ rte_pktmbuf_copy(const struct rte_mbuf *m, struct rte_mempool *mp, } /* garbage out check */ - __rte_mbuf_sanity_check(mc, 1); + __rte_mbuf_validate(mc, 1); return mc; } @@ -667,7 +667,7 @@ rte_pktmbuf_dump(FILE *f, const struct rte_mbuf *m, unsigned dump_len) unsigned int len; unsigned int nb_segs; - __rte_mbuf_sanity_check(m, 1); + __rte_mbuf_validate(m, 1); fprintf(f, "dump mbuf at %p, iova=%#" PRIx64 ", buf_len=%u\n", m, rte_mbuf_iova_get(m), m->buf_len); @@ -685,7 +685,7 @@ rte_pktmbuf_dump(FILE *f, const struct rte_mbuf *m, unsigned dump_len) nb_segs = m->nb_segs; while (m && nb_segs != 0) { - __rte_mbuf_sanity_check(m, 0); + __rte_mbuf_validate(m, 0); fprintf(f, " segment at %p, data=%p, len=%u, off=%u, refcnt=%u\n", m, rte_pktmbuf_mtod(m, void *), diff --git a/lib/mbuf/rte_mbuf.h b/lib/mbuf/rte_mbuf.h index 913c459b1cc6..919545b775a1 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_validate(m, is_h) rte_mbuf_validate(m, is_h) #else /* RTE_LIBRTE_MBUF_DEBUG */ -/** check mbuf type in debug mode */ -#define __rte_mbuf_sanity_check(m, is_h) do { } while (0) +/** ignore mbuf checks if not in debug mode */ +#define __rte_mbuf_validate(m, is_h) do { } while (0) #endif /* RTE_LIBRTE_MBUF_DEBUG */ @@ -514,7 +514,7 @@ rte_mbuf_ext_refcnt_update(struct rte_mbuf_ext_shared_info *shinfo, /** - * Sanity checks on an mbuf. + * Consistency checks on an mbuf. * * Check the consistency of the given mbuf. The function will cause a * panic if corruption is detected. @@ -526,12 +526,19 @@ rte_mbuf_ext_refcnt_update(struct rte_mbuf_ext_shared_info *shinfo, * of a packet (in this case, some fields like nb_segs are not checked) */ void -rte_mbuf_sanity_check(const struct rte_mbuf *m, int is_header); +rte_mbuf_validate(const struct rte_mbuf *m, int is_header); + +/* Older deprecated name for rte_mbuf_validate() */ +static inline __rte_deprecated +void rte_mbuf_sanity_check(const struct rte_mbuf *m, int is_header) +{ + rte_mbuf_validate(m, is_header); +} /** - * Sanity checks on a mbuf. + * Do consistency checks on a mbuf. * - * Almost like rte_mbuf_sanity_check(), but this function gives the reason + * Almost like rte_mbuf_validate(), but this function gives the reason * if corruption is detected rather than panic. * * @param m @@ -551,7 +558,7 @@ int rte_mbuf_check(const struct rte_mbuf *m, int is_header, const char **reason); /** - * Sanity checks on a reinitialized mbuf in debug mode. + * Do checks on a reinitialized mbuf in debug mode. * * Check the consistency of the given reinitialized mbuf. * The function will cause a panic if corruption is detected. @@ -563,16 +570,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_validate(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 +606,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 +629,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 +893,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_validate(m, 1); } /** @@ -942,22 +949,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 +1192,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_validate(mi, 1); + __rte_mbuf_validate(m, 0); } /** @@ -1341,7 +1348,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_validate(m, 0); if (likely(rte_mbuf_refcnt_read(m) == 1)) { @@ -1412,7 +1419,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_validate(m, 1); while (m != NULL) { m_next = m->next; @@ -1493,7 +1500,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_validate(m, 1); do { rte_mbuf_refcnt_update(m, v); @@ -1510,7 +1517,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_validate(m, 0); return m->data_off; } @@ -1524,7 +1531,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_validate(m, 0); return (uint16_t)(m->buf_len - rte_pktmbuf_headroom(m) - m->data_len); } @@ -1539,7 +1546,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_validate(m, 1); while (m->next != NULL) m = m->next; return m; @@ -1583,7 +1590,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_validate(m, 1); if (unlikely(len > rte_pktmbuf_headroom(m))) return NULL; @@ -1618,7 +1625,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_validate(m, 1); m_last = rte_pktmbuf_lastseg(m); if (unlikely(len > rte_pktmbuf_tailroom(m_last))) @@ -1646,7 +1653,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_validate(m, 1); if (unlikely(len > m->data_len)) return NULL; @@ -1678,7 +1685,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_validate(m, 1); m_last = rte_pktmbuf_lastseg(m); if (unlikely(len > m_last->data_len)) @@ -1700,7 +1707,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_validate(m, 1); return m->nb_segs == 1; } diff --git a/lib/mbuf/version.map b/lib/mbuf/version.map index ed486ed14ec7..e968c54a0807 100644 --- a/lib/mbuf/version.map +++ b/lib/mbuf/version.map @@ -27,7 +27,6 @@ DPDK_23 { rte_mbuf_dynflag_register; rte_mbuf_dynflag_register_bitnum; rte_mbuf_platform_mempool_ops; - rte_mbuf_sanity_check; rte_mbuf_set_platform_mempool_ops; rte_mbuf_set_user_mempool_ops; rte_mbuf_user_mempool_ops; @@ -39,6 +38,7 @@ DPDK_23 { rte_pktmbuf_pool_create; rte_pktmbuf_pool_create_by_ops; rte_pktmbuf_pool_init; + rte_mbuf_validate; local: *; }; From patchwork Wed May 17 16:15: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: 126926 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 70C8A42B2C; Wed, 17 May 2023 18:16:23 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1AF5742B8B; Wed, 17 May 2023 18:16:12 +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 BEA4842D31 for ; Wed, 17 May 2023 18:16:10 +0200 (CEST) Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-644d9bf05b7so741084b3a.3 for ; Wed, 17 May 2023 09:16:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1684340170; x=1686932170; 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=XQGSRpP/KDwjriwlLt8xDHr3mkn0SDV5wRaNdyE3PWE=; b=yG+kHtZYyZfduOA+WYodEpG1/6J2uRyEN0BpDCVF8bZ37NAainpkW6SrkD0FlxdtYO cZiiT9PGcKCuFZ3/KD+DfF+lJXb5dQvsGOv4Ql/uXB31HU3r4uWIcbUMomooycMZlJEz 7v73Absu6VZPjlKcwhfJ/AXAW+a9OO3CFHiRgdk+cNkwWFgBrxIYF3VwNhNvJokcABbT Z6NHOfwgbcrsdJ+OHeyoFpOBl7ZvWw5vx0zQdn5asw7FRkCbI3/0KOeGLsBxBsd3EUgQ sVfUNz8S54VgsD5hHTV73OeVigjObDUSQemzqrbCwtTRtDsKVd46pfklOUtev3E6Ao5N Q6ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684340170; x=1686932170; 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=XQGSRpP/KDwjriwlLt8xDHr3mkn0SDV5wRaNdyE3PWE=; b=AsQyZpY/KypCKP9suH0dOATFMsgox5wLa/d3jt3CGr9I+EFhbv7pKcg4kZpkqKF478 VYfb7sxNP750aO8ALjgIcGvaufNkKBqRWKm2h2zsmGuz/pX5vg4FbBIUuBdpegfcMCY/ gV7iyPpIczRQ4dCwp5aag/NH0QBVXRmQbeWthyr11xfhE02FjfAcfCcjkNt5Mj05U9Yf qFG853ZHXFuYzaiDLnXjuWcYfffex+ymaSuWMm05VG6Cr5oiopDrQUJM8lu/+c+kCJbd fQt3O7sKA0+o7FhqqcS3mc0AuYSU0/zW/IGQAKG4TbQx61+yenEifJGMgy2wYh9IxTn9 dZlw== X-Gm-Message-State: AC+VfDyU64rcaO6J1u3JOxXjF6XVCudfRWnVYI3+5WEN+b8ZpxVf/3Sw N+DJupG0DjafE41De1lhLMh3aghsd0W2Qn7mZDuiPA== X-Google-Smtp-Source: ACHHUZ7Tqi8SWkwOZeIU7pj2+BGOY6zDlcNCqSthq0G5Ob371WQpv6zCXscMEDkSq+tjgV8Et/X9Mg== X-Received: by 2002:a05:6a00:134b:b0:62d:8376:3712 with SMTP id k11-20020a056a00134b00b0062d83763712mr159284pfu.28.1684340169719; Wed, 17 May 2023 09:16:09 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id h5-20020a62b405000000b0063f33e216dasm15793009pfn.96.2023.05.17.09.16.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 May 2023 09:16:09 -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 02/20] eal: replace use of sanity check in comments and messages Date: Wed, 17 May 2023 09:15:45 -0700 Message-Id: <20230517161603.117728-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230517161603.117728-1-stephen@networkplumber.org> References: <20230517161603.117728-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 Acked-by: Anatoly Burakov --- lib/eal/common/eal_common_memory.c | 2 +- lib/eal/common/eal_common_proc.c | 3 ++- lib/eal/common/eal_common_trace.c | 2 +- lib/eal/common/eal_memcfg.h | 2 +- lib/eal/common/rte_malloc.c | 2 +- lib/eal/freebsd/eal.c | 2 +- lib/eal/linux/eal.c | 2 +- lib/eal/windows/eal.c | 2 +- 8 files changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/eal/common/eal_common_memory.c b/lib/eal/common/eal_common_memory.c index 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 Wed May 17 16:15: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: 126927 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 DF8A542B2C; Wed, 17 May 2023 18:16:31 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AF4D842D3E; Wed, 17 May 2023 18:16:15 +0200 (CEST) Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) by mails.dpdk.org (Postfix) with ESMTP id D37A040041 for ; Wed, 17 May 2023 18:16:11 +0200 (CEST) Received: by mail-pf1-f169.google.com with SMTP id d2e1a72fcca58-64390dc0a7fso142846b3a.1 for ; Wed, 17 May 2023 09:16:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1684340171; x=1686932171; 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=j90Wcyywo7bWVqG+xeHiFrSS78DAjEgvWTa+IJquoEQ=; b=YKVe4sF2heRdy2UDmiw+uJ3bHKjpKqhYIiNYTTxYgTA5JD/9DMFwtYWrl4uRNoptdh UfkU1tVTWECWbbQm374eS0rA/LLMjdg5PuCozdKzdPPf1W5LYK1Q/IgO986sO2qJtsqj azHcgwClc93y8HlSgDHhqeS38Xr5uDMM/wpzkqm489TZs40ci4p5TpUHEB8NYqr82udh 8xyHUlYEQJn2KuZKIISKJa5o4uM4ysHU+pIa3ok//aaTok+Is/Cu3Vv4YWs4GOvUHgiY JAyUB+BZHqpySoCSxlD+rFJ6lU/jW6IBOgkusY6GjAyMmZd7mn94y3Tjeg8AWn+SO3KY 53Tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684340171; x=1686932171; 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=j90Wcyywo7bWVqG+xeHiFrSS78DAjEgvWTa+IJquoEQ=; b=X+kBc01sfq3rtwTJvRUxTqMGQpnMAVfv2+mmUKQuCcgTcyRBYY7Wbh5DeE/dUrFEn+ i89qMQhY5w1/Kit3Ik0/AvCa+vS4VZxm3aWBnzjhs95rV37F5vHyghIIkdDosAdSCqqD uLspH5yprqGHK+48ut61uK8PcGDiZvJCh6nOcyaQ9o5TlzQsiY6i5Wu9EyKEURyNsWNS p/rbNKikLXy/8m/fd+u7IAx8Uov6yBfp17jRFnF7VrEh8AJ5HWd3Fl8+tBgqVT6Cjj2H 8wbjACy1SHBuvnGACpA70LxD5WRFMHyxycE0eOIQOhlicyXHZMdlFgUsF9S1YFnqgBdp w+og== X-Gm-Message-State: AC+VfDz1IIFMSk9BSf3HCW6mTJdmHI964Hunr2zPlr+uEMWS8AAFbkpl Rccs5s9gJtNc1fXykTEPBF58DF4WqThXVyvcSuodBw== X-Google-Smtp-Source: ACHHUZ78ZRR8ILUUNJysDOcSR4pwjetGr4J39KMI6qLUu825lYCvARNOpm2JfaDdKXHbW6kwTCy2Tw== X-Received: by 2002:a05:6a00:2888:b0:63d:368c:97c2 with SMTP id ch8-20020a056a00288800b0063d368c97c2mr30826pfb.8.1684340170832; Wed, 17 May 2023 09:16:10 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id h5-20020a62b405000000b0063f33e216dasm15793009pfn.96.2023.05.17.09.16.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 May 2023 09:16:10 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Bruce Richardson Subject: [PATCH 03/20] net/ring: replace use of sanity Date: Wed, 17 May 2023 09:15:46 -0700 Message-Id: <20230517161603.117728-4-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230517161603.117728-1-stephen@networkplumber.org> References: <20230517161603.117728-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 --- 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 Wed May 17 16:15:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 126928 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 CD2CE42B2C; Wed, 17 May 2023 18:16:37 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CC8FA42D41; Wed, 17 May 2023 18:16:16 +0200 (CEST) Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) by mails.dpdk.org (Postfix) with ESMTP id 7179A42D1A for ; Wed, 17 May 2023 18:16:13 +0200 (CEST) Received: by mail-pf1-f172.google.com with SMTP id d2e1a72fcca58-643a1fed360so688507b3a.3 for ; Wed, 17 May 2023 09:16:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1684340172; x=1686932172; 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=wV7lTuDhizLSKGqMDI6a194UMPZjjKxdq3jOOOY4nuE=; b=ZJ6AhAnBs5Hfk9CcBsJCP8xiE9OY0mPZ7NCl/NUJd+Nlba6Wy4e51fst1bYaFEG5ul XK2KMJ9wy7NmTczFFFihRiggpXVLBIRrI6OVanZW0DXk8N0l5t2UNXNiS9Io7aygNvXR p4sp5QddyiUlwknyImVQB9jgRQg0QvdogkIs8S/n15bWa/OTrjJesuqVbGHemsr7rVOA 00kVfU4OaUaNqXzmRG3zVfGwxcUiY4lEYJCjJaM9YmFmtBZxwM9U5E4DHGBAemFinZod V0Rik/2nl5r0lzkMicI1AC8+YSwhwmzgImjfAbi7kA9QNGV96qQAq8WyF6dR6ZwA/Akc dolQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684340172; x=1686932172; 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=wV7lTuDhizLSKGqMDI6a194UMPZjjKxdq3jOOOY4nuE=; b=C/cQxi4eYZvxuIRFcwzIFARJyJO5EbiSrW7vOdDAyR9eYS7Z9i96Aqm/dEzk8naZje TiHk5mTwwwQyQrbN0cYoKXHzUT4Ce1wIfu2W9fRP+sDxK+YHjHC0LEOLrv8lTVk/GoCB Ci+dEwtSou+11LdlUItBT6kdnlb+oflI8GGvqxPW9TCBBeYISkKVWeELqmWKuUD71yno UZ/JEvMAmPgVto2ZfcoMpq30gbsnFmaNb47UmOp0Ny+5SQn2jMN6rEnoIFLvstaBOG39 Z0sYGaTNgyZ4hafIcGEqAqoo4OIRHRMu9evN3APrxOOah+cpzT6njgULIi1chgEmZXso ipng== X-Gm-Message-State: AC+VfDziKMe6dgR/eVvFl/hDwsxx2S4YJ5dDririkjSsvDBPF0nW9dT1 dDL7vkF5tUjfvqbRkZsrYXBnp8l1omZ3o82iBZLONQ== X-Google-Smtp-Source: ACHHUZ4Rf+y7btIZSiYGMkVRd6TEiRR8a8cUxOOhe2jORpdsIpBIONnG3R8jAsJHOTAETbDXzs6YKA== X-Received: by 2002:a05:6a20:441c:b0:100:bee5:c80d with SMTP id ce28-20020a056a20441c00b00100bee5c80dmr44310578pzb.25.1684340172072; Wed, 17 May 2023 09:16:12 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id h5-20020a62b405000000b0063f33e216dasm15793009pfn.96.2023.05.17.09.16.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 May 2023 09:16:11 -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 04/20] test: replace use word sanity Date: Wed, 17 May 2023 09:15:47 -0700 Message-Id: <20230517161603.117728-5-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230517161603.117728-1-stephen@networkplumber.org> References: <20230517161603.117728-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 db9bb3caeea2..3add3d8717de 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 Wed May 17 16:15:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 126929 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 2389242B2C; Wed, 17 May 2023 18:16:44 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E192542D47; Wed, 17 May 2023 18:16:17 +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 3B6E741611 for ; Wed, 17 May 2023 18:16:14 +0200 (CEST) Received: by mail-pf1-f174.google.com with SMTP id d2e1a72fcca58-6439f186366so700681b3a.2 for ; Wed, 17 May 2023 09:16:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1684340173; x=1686932173; 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=SmZv17R5d3ol56uZ6nk8UBcd2gsiNC5MydqTayt+V7o8GzOPhJlPYDwrOsU6HUGxbp it8e5lVvUAosCuLUjNLaahrO4hqN4WCkh2N59rZllxYQfVATvGN6h6GGJafsZl6fhsWf hyv6te7YEEmetN4zojaH4479ukpYYtMPvdwmwmH8YxeBQx/ffpcX84dcyX0q7sAmP5Yn MZtUs068cgH2QBW7l/DkSV48Mx5Wq1YdOAdBYTLITr/Fkgfvbr9gsOxXNm96hD7dCrJ1 pSWhf+dOyt/a0LaKRFVV5eW66MJcHbOyUKmbwmwCtZd/82NdKm24I0rJRjPlUPjpCbYs JZ3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684340173; x=1686932173; 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=D6CnmuubAahawQ7HTbgE1HGyZ1FqSSgA4pub/RLGB+0uk2G/iEbqAZN6CMJxzmR4yO h8SMFnm/GvLm0UoJHe6VfaswDCttFu0vgbU9pHwL62ZFW29Dy/rILFz27BIAUf78ioyR JmchSMGKQfb/ucOGeFEFcHtlyAkgvasL2zsi4wo29wf8VEZP7k71kKrMPEBQnlTYivrU 9EKzm8ri4dNMWYXJLl4rzcbcK/HWDXFBh7AvUMNISf/OgNEDwdDFANQc6FtUHiC8m+Qt fQBHC/Q8c4+7i79FBwfcAcyhlu3AL2H6h47Uan1RKv9lRCZZQZBdGaw+44wdH0k7i6B4 R6Og== X-Gm-Message-State: AC+VfDzpAyIGEUb8w8uDU0D3vlvok4OELQswBBg1zmliKquwziQjXodM Dmwl5HShNpZ5J/gQdK77qQpNEXk2mpHdkSHDw8SQUA== X-Google-Smtp-Source: ACHHUZ5novDVRbW9jDNQ4hU1KI0kldtEV2xQe8nRgVq1mWEWOXb3B0OFlN5t7snJPwZsk78ZNlOOAA== X-Received: by 2002:a05:6a00:1502:b0:627:e49a:871a with SMTP id q2-20020a056a00150200b00627e49a871amr205591pfu.23.1684340173222; Wed, 17 May 2023 09:16:13 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id h5-20020a62b405000000b0063f33e216dasm15793009pfn.96.2023.05.17.09.16.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 May 2023 09:16:12 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Radu Nicolau , Akhil Goyal , Cristian Dumitrescu Subject: [PATCH 05/20] examples: remove term sanity Date: Wed, 17 May 2023 09:15:48 -0700 Message-Id: <20230517161603.117728-6-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230517161603.117728-1-stephen@networkplumber.org> References: <20230517161603.117728-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 Wed May 17 16:15:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 126930 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 F244342B2C; Wed, 17 May 2023 18:16:52 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6A1AD42D55; Wed, 17 May 2023 18:16:19 +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 5B5D842D3B for ; Wed, 17 May 2023 18:16:15 +0200 (CEST) Received: by mail-pf1-f171.google.com with SMTP id d2e1a72fcca58-643ac91c51fso748530b3a.1 for ; Wed, 17 May 2023 09:16:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1684340174; x=1686932174; 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=3FSHiMioEPFWXPJKI6LlUMhfkclZSDjL9ZE86YDb+lA=; b=n1a8hqKvFOxZ6t72bTjpwf8o29g1AtM2zEWvfSLS14CrRuP6fK9WNb31J+Kl6C88pw GO5sP8usVsxrufbd5kQ2tuBpjYAKcE8wgMD0zxOi56ByT89Ys9I6NbNRbLH7RgvkxoaG 0WWLulQflLyTaZnUizPsunjwZAV8s6DMYozdvq16bYw09n9HYAbcqvBNSLahj287DEFX 6SC9/3hsWui/6odKQU1h8hTEqpGAtvirFDVBnjdJqD5h8mSbCM8eZ6dI+2Kd7JDTKRfj uQf3daQVhIeDRS0xWIPjQsE/hMqW6P+BQlX24YYku/n6zMSWv++FwqBVpDIwsjX5C8Pj lgIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684340174; x=1686932174; 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=3FSHiMioEPFWXPJKI6LlUMhfkclZSDjL9ZE86YDb+lA=; b=jlWxR+rpi0Ay3RVl62DgNqbXcmgkIJPQ7k6U9ifA3AVPpsvagBPpgnxJLq7Yd9DpY0 hRRAtp/evNquSswgLG7nqCdjI+8RJl9aRT6x+K5JLpFxNTckPdvjloYIcink9DPGLlM4 sxn1VoLue/KuFsiHBfPjFZo0laN8kVV3HQgIWRZeIa//xZOOlQ8UZV6hrn8c8tshb8m8 X4ycME68rJuhu3K8MWaIrAf6GNevKAywBCL2Zox/LsKSiLa7pnflcl8mY+PFSOhqlMi+ llP5CgiPRzf0zlirNgDiEgVd6zGGTxVbIXeABgbfYmCyFkCeCxyOR3rBHqWPUDBB+cpF 7YKw== X-Gm-Message-State: AC+VfDzRsdS3qZRkMLZjj2VVP+NcZuNdWBk3+8ydZGuDPajVLH7/sljC tVkI4i2UkrtyjMHxBstJJO0WAqgZVT7vpTkqu0udUQ== X-Google-Smtp-Source: ACHHUZ7WzC9Yo/+jppX1FHnoJ4Rld1yQe6czW/u1BP6K2GJe9o+w3kbjOprDu5GlVlKbtZ9oAcy9VA== X-Received: by 2002:a05:6a20:144d:b0:103:73a6:5cc1 with SMTP id a13-20020a056a20144d00b0010373a65cc1mr31765556pzi.4.1684340174299; Wed, 17 May 2023 09:16:14 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id h5-20020a62b405000000b0063f33e216dasm15793009pfn.96.2023.05.17.09.16.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 May 2023 09:16:13 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Jerin Jacob , Kiran Kumar K , Nithin Dabilpuram , Reshma Pattan Subject: [PATCH 06/20] lib: replace use of sanity check in comments and messages Date: Wed, 17 May 2023 09:15:49 -0700 Message-Id: <20230517161603.117728-7-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230517161603.117728-1-stephen@networkplumber.org> References: <20230517161603.117728-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..5c075ae60230 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 consitency 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 Wed May 17 16:15:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 126931 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 BFE6D42B2C; Wed, 17 May 2023 18:16:58 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7ED3342D5D; Wed, 17 May 2023 18:16:20 +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 690F141611 for ; Wed, 17 May 2023 18:16:16 +0200 (CEST) Received: by mail-pf1-f175.google.com with SMTP id d2e1a72fcca58-643846c006fso925807b3a.0 for ; Wed, 17 May 2023 09:16:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1684340175; x=1686932175; 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=T7MhSAwzukH5mb94ewYmhPl0jEaGJs1Stj1FkGbbHNs=; b=B5CtR0gHH6+vyeVO/l2l05ZF+8mkEdN61cBUQujmVZgE/KlwvWECmavXZ9vyAGyYl/ L4dkW3AuEylLBbR34ApmDMCHNu4FuqruGvdPZrtfTlG7MLGYaYcrP4lz5cckl72+WS9Y JZkhmxSwFyMCfeT9LPtq2iNzXmw9MkY19e7M+3KUApQa++mH+kbnc4KueST99sen7XBV VGQgMkljMFfr8rYJkydtsAXGS8Qbm0aQRAY1lvNOWyi+ZsBr4SSEqmk8pszCGKWeH60t /MUebwY5sWxib66Rksn61ttYGFr6d7ATrJ4FE8Q2GysbMCwhkgZk+Qb7dE9ICkUU42Dg W2vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684340175; x=1686932175; 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=T7MhSAwzukH5mb94ewYmhPl0jEaGJs1Stj1FkGbbHNs=; b=CIZLj1ipatPzBq4l2qxKRFtvy1P+M/aBeigjeSXcd2Z7q3A2ko/ThkvL3uf2uSv4Sd RRyFot1KG9n1Kakld838CHQkBg6jxBQIEk5Rt3p5rIkuPdnSBlq6+gR4e01mb/QM+m/3 0zx43p3Su6VUKTp7bX/Gkaf45ClqZst8FEBmoOSi0xs/HjNbR3hxc53/hvyn+jM7D/ul wlaKiK8TOqufyV0BrdvG8n5O54LkRQ6D/NX/h0TrvCIsQ7zYvRkrYDbfNApVgj689dYB rt/PcuZzJ4ApIHhBZCPs2BD8P/QTh+y9CfZytzC5n9i8lPqrM4mwuUHbg83962HkyYl2 jinA== X-Gm-Message-State: AC+VfDyR8TbFNMYCOKEcDzRZs6HtKukWeiA9rQus/ETKsqaD7El/qrnI 8l8/b6OysTDQ8JQ2hx0wmi+iOFCO1qU2MO1IFKKh9w== X-Google-Smtp-Source: ACHHUZ4oHjPzlIzTfskYLjNeb9p21SOLZJm8bU7niuRsbq6Uo9sktWNWg1EQ4Up/b4KOJVs5wuNiZw== X-Received: by 2002:a05:6a00:1913:b0:644:ad29:fd5a with SMTP id y19-20020a056a00191300b00644ad29fd5amr207983pfi.21.1684340175403; Wed, 17 May 2023 09:16:15 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id h5-20020a62b405000000b0063f33e216dasm15793009pfn.96.2023.05.17.09.16.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 May 2023 09:16:14 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Chaoyong He , =?utf-8?q?Niklas_S=C3=B6derlund?= Subject: [PATCH 07/20] net/nfp: remove word sanity Date: Wed, 17 May 2023 09:15:50 -0700 Message-Id: <20230517161603.117728-8-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230517161603.117728-1-stephen@networkplumber.org> References: <20230517161603.117728-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 There are two small uses of the non-inclusive term "sanity". One in comment is easily removed, other is in a macro that was defined but never used. Signed-off-by: Stephen Hemminger Reviewed-by: Chaoyong He --- drivers/net/nfp/nfp_flow.c | 2 +- drivers/net/nfp/nfpcore/nfp-common/nfp_resid.h | 13 ------------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c index 41b722f4d898..05507bc3a113 100644 --- a/drivers/net/nfp/nfp_flow.c +++ b/drivers/net/nfp/nfp_flow.c @@ -1944,7 +1944,7 @@ nfp_flow_compile_item_proc(struct nfp_flower_representor *repr, break; } - /* Perform basic sanity checks */ + /* Perform basic checks */ ret = nfp_flow_item_check(item, proc); if (ret != 0) { PMD_DRV_LOG(ERR, "nfp flow item %d check failed", item->type); diff --git a/drivers/net/nfp/nfpcore/nfp-common/nfp_resid.h b/drivers/net/nfp/nfpcore/nfp-common/nfp_resid.h index 394a7628e08a..b7e77d8fa051 100644 --- a/drivers/net/nfp/nfpcore/nfp-common/nfp_resid.h +++ b/drivers/net/nfp/nfpcore/nfp-common/nfp_resid.h @@ -183,19 +183,6 @@ NFP_CPP_ID_ISLAND_of(uint32_t id) (int)(((_a) << 4) | ((_b) + 4)) : -1) \ })) -/* - * Do a general sanity check on the ME ID. - * The check is on the highest possible island ID for the chip family and the - * microengine number must be a master ID. - * @param meid ME ID as created by NFP6000_MEID - */ -#define NFP6000_MEID_IS_VALID(meid) \ - (__extension__ ({ \ - typeof(meid) _a = (meid); \ - ((((_a) >> 4) < 64) && (((_a) >> 4) >= 0) && \ - (((_a) & 0xF) >= 4)) \ - })) - /* * Extract island ID from ME ID. * @param meid ME ID as created by NFP6000_MEID From patchwork Wed May 17 16:15:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 126932 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 C2F0842B2C; Wed, 17 May 2023 18:17:04 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A4D8742D65; Wed, 17 May 2023 18:16:21 +0200 (CEST) Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) by mails.dpdk.org (Postfix) with ESMTP id 51ED142D46 for ; Wed, 17 May 2023 18:16:17 +0200 (CEST) Received: by mail-pf1-f169.google.com with SMTP id d2e1a72fcca58-64354231003so143434b3a.0 for ; Wed, 17 May 2023 09:16:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1684340176; x=1686932176; 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=X23orOuXuMrm5KeYnr2/EnJfD5KYuw8YSugqkmpjKWyIvddM7aoB8Yk0zxrPOHuVqj BoVdE48gp2DxCJlUBSGoqTRHK2kUyzQCge53k9b6LIUqwoN9pFbRLh/9+XRHPLSW25im 1scvmf6PToLuDt7aeCSDNP1ULS+Fs6YVAxdMoBBOB0hgoSY7soYjfiTomrZxjzWajTUD XnpuXkWwCczGzJBHoVn72NkzHiJ0HS0A4/LMW7vJ21hRpo49s7AQrknaUhcVG1jZF2Mf 3j8uIAb3PKEiIWnLsxO+4eseYDcNa4ANUWU+St6jnBEmyUOUAiKPo/YhDcfp37W2SFrj ee7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684340176; x=1686932176; 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=UIDxRfmypT9UZApxBR4s8aI+mLRViXi5XllvufeVQO7Lktc0xj5HWoRj8wO25kduAc M839rhTlKO6FZCLoUoGi/5yM5U5RP348DE3c9YzV2O1BTTb2J8SyULimQKkru19Mk1d9 ywKk+pcSOAGFoBsvbiy7TaHZdiYj/y2DpGGrdNDdV2eilCweDKsexp2V7/IULROQaTGb gRh2yUOwjdkmLkD8SxlTntcWgsNz4IElNhCXzowozLufI8IYI+QacIrIxDrI9+6jrsFj KTO1iK+8ucMqGF8LEcckAS+Fc54LkQ/+4P/yXiw5IByUuvHB8D7GzxGf8SflvQJgCXDQ 7WJg== X-Gm-Message-State: AC+VfDyyq+ihozgTlQKfqPYxwmq9U2ygO82rlkFOnvmTTxCeSJtE+zVh o98WKmD2snFWxsQP8XRRfRqPd8RbAyajLeqybLsXjw== X-Google-Smtp-Source: ACHHUZ7YU42pPlFa9aoh3DJ2hgQ+4449q71k3Alhr6a2G+JjBwc22esax3HfqKfQ9YYQ0RcrrTKI4w== X-Received: by 2002:a05:6a00:2e17:b0:63b:19e5:a96e with SMTP id fc23-20020a056a002e1700b0063b19e5a96emr57105pfb.9.1684340176551; Wed, 17 May 2023 09:16:16 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id h5-20020a62b405000000b0063f33e216dasm15793009pfn.96.2023.05.17.09.16.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 May 2023 09:16:16 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Elena Agostini , Harry van Haaren , Nicolas Chautru Subject: [PATCH 08/20] doc/eventdev_pipeline: remove sanity Date: Wed, 17 May 2023 09:15:51 -0700 Message-Id: <20230517161603.117728-9-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230517161603.117728-1-stephen@networkplumber.org> References: <20230517161603.117728-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 Wed May 17 16:15:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 126933 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 A6AAD42B2C; Wed, 17 May 2023 18:17:10 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C8B9D42D64; Wed, 17 May 2023 18:16:22 +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 5485842D38 for ; Wed, 17 May 2023 18:16:18 +0200 (CEST) Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-644d9bf05b7so741178b3a.3 for ; Wed, 17 May 2023 09:16:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1684340177; x=1686932177; 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=V88f3oV+9syrIfOIR75V3e/pDoZAlU0eqJUQMWxTWZOyjP/6XE6yblFBaS1IO/LKwL Us+ACpfZbULZpGA49b/yuA6yA36CYrI6tGq/DdjAlzUvr2NJVznpofK0y8JzdtglLuSu 8JQbVoUAY7j/ZWrIhLRZM3TuTcx3e5xpsfDaaKfjLXkAlsqF0k7I5gZjBZo6TDQ3AHfm uIX/xRaGI8eKzl5u+Cm73RguESRxX+sJ7SAAOHQIUGoozER/W6UOUzIFRv1eMzmbD2SF fBYETQnFHuLPbIs3p7PF/ijazVy5hbNTJyVsuRIrTamSBowLPFdOxlnHdfNRuRo60Zgc g1jA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684340177; x=1686932177; 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=FjvR3PoFkdDsFGTw/7RouBzqyTyVRtyaUwowdaAnAknyXwsyLhVtswwK3A76E+j10l /GpqZILIhnvO/c90dkDu/L4c+G/7m2LNdLt9XDGC4h1lNPB1PkXJnaQPS8mlyCGCmkIC AvOzEayiqI3JLwd08TgT9HUY1w4LOggFfT1PkAMsMk1VRkBZFKJaXYBEvH/0XDRkIquG 2pQ+YYk2el1vDLr6yZZcfUdF19RtZ///qZr5YfJBcgPg5z5SQ0Re9GFGAHLHD3NDSF3p gyJ+3ZwSyAV7uZu0p3t0+M76HgCdrA1msmfpapgof0V+b78RsVlM2oteKMDlzyvWq9Ve gN4Q== X-Gm-Message-State: AC+VfDzZ6pZw6rKkAmBaJuyXzUTBnQKaE40D3Hst7jrwmCpZM3ojcDWL ZkZ+m7jCNC5+dUrx+Wd54ZWnXMF6WM+XnQNkKCRdzQ== X-Google-Smtp-Source: ACHHUZ71xcJ42lrxRSr7VyoDC+umhF2tXr3JoviJ8VPHcycpGsn9W8AzZCbIX+vQu53IyOEZSeONdQ== X-Received: by 2002:a05:6a20:9184:b0:106:dfc8:6f5b with SMTP id v4-20020a056a20918400b00106dfc86f5bmr8608592pzd.50.1684340177575; Wed, 17 May 2023 09:16:17 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id h5-20020a62b405000000b0063f33e216dasm15793009pfn.96.2023.05.17.09.16.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 May 2023 09:16:17 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Qi Zhang , Xiao Wang , Qiming Yang , Wenjun Wu Subject: [PATCH 09/20] net/fm10k, net/ixgbe: remove word sanity Date: Wed, 17 May 2023 09:15:52 -0700 Message-Id: <20230517161603.117728-10-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230517161603.117728-1-stephen@networkplumber.org> References: <20230517161603.117728-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 Wed May 17 16:15:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 126934 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 8CF1542B2C; Wed, 17 May 2023 18:17:16 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E2DCC42D4D; Wed, 17 May 2023 18:16:23 +0200 (CEST) Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) by mails.dpdk.org (Postfix) with ESMTP id 91AAF42D5A for ; Wed, 17 May 2023 18:16:19 +0200 (CEST) Received: by mail-pf1-f172.google.com with SMTP id d2e1a72fcca58-643bb9cdd6eso981078b3a.1 for ; Wed, 17 May 2023 09:16:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1684340178; x=1686932178; 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=u0mtpPz+Wdos7CWJaGph9+UcxCkR9wUVHJ6lm79oA3KJvWGZkFigM5HSpsTJH1rO/I Lk4vIktVL9a326TYoOdGYit48uUys9SvE+d/eHtpe37ecSsW9BOt4TaRldKhOFPt2TTo qMOfFC0pAKFjDRKKhgpj33CDiuTKCIt0YB1NdMZewk/zRxVkZgBEizzTMkIEIRRiglMJ k6h4AX/w8PiZWrT978AJHKzKu+bi7J/5J3PNam+WbGGKbjg6LL8RcgKOBa8udKzRwZCa N1kwdwt55Cg8C0yEna/3J10Gfqxodzs2I/Aq3UfjUe4NW14Ke+vRJcTrdE/iIPVseBNn d+MA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684340178; x=1686932178; 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=jyzwTvzicFIceuzY6SZVqk9v2+G2t+/iN64DjCC5JP6LsM9hI2Krnpplv2JF0dYbu2 gKMtDkzapeiiOzCJFOvSMUMsA2dr80EPmU4szE62eVg20bpSwB636UsuDcrm8j2ZhisV rup9uN3Sgwhb7QhdwGXKQiSAvW9Bc640LgkaIkcmSsBNuBJxtamQfDqj50GhvT9COK9T nZZtG97C61hwvBBQ/cD83pm0Qx4ZFjMC9uiQVw0p5sIm5gz444DM18rsyICh5F0eN/6h lExBE9wCR7BkuP1Vhiom3TsJNG5aKLB+zBZsnj/MnmnRRXMNUDFdgL2U4OAdqOlIZdQx XSow== X-Gm-Message-State: AC+VfDwTj9G4yPmpFuYbhJgwnVvZT6z47pCs9Lcab+bsB9ltpM+RHjOv zeQiB5hX6FJUY/j2kEUztWYKwHLFL+OZOxTp+Dkfhw== X-Google-Smtp-Source: ACHHUZ4/e7zjsf3SqQfJ8mFi74/A6Rfj2iJgBl/wHUI6MHoiGT7WBzkmt6KmHD3Pkka/cMcLDOeW5Q== X-Received: by 2002:a05:6a00:1891:b0:64c:cd11:c21f with SMTP id x17-20020a056a00189100b0064ccd11c21fmr248094pfh.17.1684340178514; Wed, 17 May 2023 09:16:18 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id h5-20020a62b405000000b0063f33e216dasm15793009pfn.96.2023.05.17.09.16.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 May 2023 09:16:18 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Matan Azrad , Viacheslav Ovsiienko Subject: [PATCH 10/20] net/mlx[45]: remove word sanity Date: Wed, 17 May 2023 09:15:53 -0700 Message-Id: <20230517161603.117728-11-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230517161603.117728-1-stephen@networkplumber.org> References: <20230517161603.117728-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 Wed May 17 16:15:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 126935 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 1625842B2C; Wed, 17 May 2023 18:17:24 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6455542D8A; Wed, 17 May 2023 18:16:25 +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 6A0C042D5A for ; Wed, 17 May 2023 18:16:20 +0200 (CEST) Received: by mail-pf1-f173.google.com with SMTP id d2e1a72fcca58-643b7b8f8ceso699921b3a.1 for ; Wed, 17 May 2023 09:16:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1684340179; x=1686932179; 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=CKH3IIMQaBesFrHtMj8aSKlMdxMzutFfM++iDMakV/4WvTYn0tx0MLcG8xb0Zz5fsn /pxQUvI6Hcif3L1qemWOyVa0UtjP1l0cScLZx+rQJpb2SpzicK9ZapbZxUmMk2cIYVVp Hat+M5UbJ6nOo1/cq7h8JQa8pPodI8MtdahOgdhTyVUeRYQ6WpvEnqfj1pp1r0QE0WCI r3Mciv4CHBRxHtcPseTZe0aHjgJiLmoQhvjSEOHyEK+HGaihXKt4Xtg7B/2jfpiMko+9 ouB/e8Lqjmm+znwjOpy2vj/iErQIr6DitpLNnCEH8eY9s4nmuB4pqOOW5nOLQHOHck+T eRQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684340179; x=1686932179; 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=fN1eINPpm9rVreNghxvL5kQEc0ITcwj5K1kTIYyC3faMzHowJh5CGvXuQnMiin2Z/w y+QKcQYKoXf6OzG/yeZF233OSqLgbmKFHdbjbZ9AmMGSG+aQ9k1g2fkryY+ZMQTvs4pi /4RuiIpEt6kCibbtO2sniZ6ORNvjR2tST8SmcugeuIENw2ThsIGLvl7sskoN7Elr0BVU L1fxBC6UmFC+SAq5XL2A5xtL2rd/Z9XasAmnbvqViOlgZ0icqU7xpLcZ1nvsjLvc8ud4 bOYaEV2cS1NfgFQGY8TD9RrxZC/sA5A70cY9mztfSDGbjspFGzZZfydLJPa094hM34W2 YfIw== X-Gm-Message-State: AC+VfDzLtORuQQheI+lDDp6mYMGMzD1GN5pXpJlqNBMU3CqDIq38vRSm d1cXBc9TayWrEzKIZtHB0mM4ZVyuHOXsKIH4u9CcnQ== X-Google-Smtp-Source: ACHHUZ7355pl7IZdXXyIJqgQCFZntHgC7dPD4u7NnGYZseA9DecI2A2S9GXWlOa1tCEDZAPkfhy1zA== X-Received: by 2002:a05:6a00:2d81:b0:641:558:8e2e with SMTP id fb1-20020a056a002d8100b0064105588e2emr300534pfb.15.1684340179472; Wed, 17 May 2023 09:16:19 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id h5-20020a62b405000000b0063f33e216dasm15793009pfn.96.2023.05.17.09.16.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 May 2023 09:16:19 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Andrew Rybchenko Subject: [PATCH 11/20] net/sfc: remove term "sanity check" Date: Wed, 17 May 2023 09:15:54 -0700 Message-Id: <20230517161603.117728-12-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230517161603.117728-1-stephen@networkplumber.org> References: <20230517161603.117728-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 Acked-by: Andrew Rybchenko --- 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 Wed May 17 16:15:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 126936 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 BAFB542B2C; Wed, 17 May 2023 18:17:29 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 78D3E42D8F; Wed, 17 May 2023 18:16:26 +0200 (CEST) Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) by mails.dpdk.org (Postfix) with ESMTP id 13C8542D62 for ; Wed, 17 May 2023 18:16:21 +0200 (CEST) Received: by mail-pf1-f169.google.com with SMTP id d2e1a72fcca58-64390dc0a7fso142950b3a.1 for ; Wed, 17 May 2023 09:16:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1684340180; x=1686932180; 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=X4B4S61rZnDZmSqNWBkbFr7yZmDlL/ys/yvdCKwHT0oCK2qcobLfEifvvzFRCkrsun ptItqQ9ozqLftWurBUhcDvbqYePiElpHSppgEeEkWMJuMfYmm1ue02nHpW7TYyVKENMh C2i1hRLnHRkG/isart3Xwz1Tmt6KmO9FKE/fJxxtGOzsZTxDGOyPLtoS44Brts6foo8H ukQyrMjwpaiUwkaWmHsxY3jwaR5MfdbRbjWtt+0aUkgRLtYz0xrv9RvFNb4NAulYAPpT U/laA4/NhM/vCLqdUPIO7ftDTPRd5T41I6B4SuUyVFIpa7ifyGdh3si62bUN6OKKR1uK k1SQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684340180; x=1686932180; 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=VFFe2Y0mmIFgUjuz1Vr64GR6qyQK0f9cAhDizSDXtyagA9JgRQp7JdRQoCDegK95UY R6XRQe25PgFlzc++puCID0HZOivYtkFMuXwWFT9eBn3U8RHs+JZz56PbvahD2u2oPkPz +fkrVJH+z7UODoBTRlGxhB5OaMmO5dlhebjtqIBiSU8hthT2YXZP5xuhG9KGbNoXKr+v oPg/O8rpiCsODYI7ScHfaTFcTbxV4ondBYezUlytZBYCzk9192dGyDbR7HFBW8S8MBlG RDq4mXFJjxDoZRH9GaceHrRXSIKO8tNv2eKaGInhJjU2fYCdA7iHnjSt18r6dnxPr8BY XQVA== X-Gm-Message-State: AC+VfDyIkI7z+9sssozlKHEE06VDrMNm7BhPBeBdwRQOtfUL/P8T4V8u FTasI4pbE179Nmyk1H16w2wHY7S7pYHkSUX62iQoKA== X-Google-Smtp-Source: ACHHUZ7asaigyKVeNJejZmmoYx2m3YuprrB6W6h+ssZm/R8V6f9KKpT1dp9lVCtRn3l4VqZWJ8jA1g== X-Received: by 2002:a05:6a00:1341:b0:646:6e40:b421 with SMTP id k1-20020a056a00134100b006466e40b421mr182336pfu.1.1684340180352; Wed, 17 May 2023 09:16:20 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id h5-20020a62b405000000b0063f33e216dasm15793009pfn.96.2023.05.17.09.16.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 May 2023 09:16:19 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Shepard Siegel , Ed Czeck , John Miller Subject: [PATCH 12/20] net/ark: replace use of term sanity Date: Wed, 17 May 2023 09:15:55 -0700 Message-Id: <20230517161603.117728-13-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230517161603.117728-1-stephen@networkplumber.org> References: <20230517161603.117728-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 Wed May 17 16:15:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 126937 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 21EDD42B2C; Wed, 17 May 2023 18:17:35 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 994F042D9B; Wed, 17 May 2023 18:16:27 +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 2D7CF42D64 for ; Wed, 17 May 2023 18:16:22 +0200 (CEST) Received: by mail-pf1-f174.google.com with SMTP id d2e1a72fcca58-6439f186366so700781b3a.2 for ; Wed, 17 May 2023 09:16:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1684340181; x=1686932181; 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=TTiIgaMH3AQ26oqMbefAwkl7mgARNCCcp1NyLZj0ds61QpKBzOUaWu5KQ+91qXoOvD Y//NAqACzXQdQrmLar5zBNAnlHpNio1CM3bkVbnDPzQO6c/tbDRDX8OmFVMgud/ozQAN rhPPUD7XTUsddlrWwinudvcEQvyNG6ILq5hA9V26BsJoTwZLLSM2XORdruiNRqbpTECL S0Kqj/29DcBOh+11itVEi9RutuwUEZ/jz+CLXkW+HHnS7RS5PpdTxB0JAKpR5uIRam01 AQnhxC07FJfSNBGDyHtBaIw/g1G/pIzi0jXGOy2u9ZrW5IDBwe9bLaSZza6b+Gy3yVbe 7ipA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684340181; x=1686932181; 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=Z/SIWk4PoEJCJwpgLJlqIAL2tFxys8BSXrBjKbIco6hjnACqQVGWydOoDz66/ykRZs uNT/X3baAmCzExcmR81VkqmqRt7uZAJhE3EmqvnsRlDXrNRtZYi/Z7pSTsA47XfXeeFx ghwI2c5l/jIlpA9fRM1zXt+N8jaRWNCND6TR+rbZUb1Odh4xo/ZF4MTWXWD3Apo17C0Y cFHdboBJ3d2XObJm1QH6XZGUdltYHx0bpxGAaK1lbhdK0Q2+TTqOEn1jY9C0OQSGTlxR F+lExfqx/TvWOcvrV4X9QuUk9Ws2EnrC0Z1sYpWtYs2ZovI/WdrlnZt5exdtccmkQR/o c++w== X-Gm-Message-State: AC+VfDxCaCm7kwJjv7geQxNbc456WCdgCos+ONJewfxHX10H4bpnd0uh 4qgdGyi423gY4ADvy6TGKvB42V3YoVhELd/QCcJ90w== X-Google-Smtp-Source: ACHHUZ5RYe80/xo6WgsQh1aw6BX8HLvY+P3gELO004cTWFwXt/IIQpLWNoEellt/tGNgA4zeZ2bKqg== X-Received: by 2002:a05:6a20:a121:b0:105:27c3:1c0d with SMTP id q33-20020a056a20a12100b0010527c31c0dmr19435807pzk.46.1684340181455; Wed, 17 May 2023 09:16:21 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id h5-20020a62b405000000b0063f33e216dasm15793009pfn.96.2023.05.17.09.16.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 May 2023 09:16:21 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Ajit Khaparde , Somnath Kotur Subject: [PATCH 13/20] net/bnxt: replace use of term sanity Date: Wed, 17 May 2023 09:15:56 -0700 Message-Id: <20230517161603.117728-14-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230517161603.117728-1-stephen@networkplumber.org> References: <20230517161603.117728-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 Wed May 17 16:15:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 126938 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 4D4BA42B2C; Wed, 17 May 2023 18:17:39 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E068A42DA2; Wed, 17 May 2023 18:16:28 +0200 (CEST) Received: from mail-pg1-f176.google.com (mail-pg1-f176.google.com [209.85.215.176]) by mails.dpdk.org (Postfix) with ESMTP id 7B05B42D6D for ; Wed, 17 May 2023 18:16:23 +0200 (CEST) Received: by mail-pg1-f176.google.com with SMTP id 41be03b00d2f7-5307502146aso637604a12.1 for ; Wed, 17 May 2023 09:16:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1684340182; x=1686932182; 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=ZJSmGWFYqlFnRUN5jchkeAbhW4FcZeL9rppQxgz+kFkgGFrcI6UV9WdzEyOjtqm4tJ ilo5x/FYbjTOOtSvQZmr9hfOYazQEZubCpuM1f+vlPnXe5H0hYJBtzwdwAz4cyWgmtAx zxdtMt2xcyoXTyuhy7Qk8qGa7Y8EdIgPj0cEGNLNGDPiUE8d4YzbXJvdtlLu2uqchqpv CFSjR90dlaD4vnztSUtd+09yZjajC/97KE6O56tqlP96Q1sX3IGIMPGiqlXr9z4JAPyK 6yrY05EL0Uh9xakxfzKrXTLWy7cZS8A9ngBjU05KaA6dzarfHojpqngyhsw1LpkciJo3 mstQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684340182; x=1686932182; 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=GQccQv8GqspYitdKRu8URXcg6svsM/LMg5LMdabqsnD8gaehUAhEEK0H5vTxJlRrBU JnERzKxB8ulnYDT8AyLZq4WEA5fFH694rnjpvoMx+c2mSyeSz1HBfeOQBRzRxIjoPXCI hS7HBmSWvzGUw6DxePU5y06F842wOeGMx+kpmny2fZEH63L+cpyJzlt2/MoT4aa4SzVR qcuIq625gif7fU8+QZribMKeEw3mJDVl3vsgohZADiRnQ+V8yYU2fX4lt+SsMiLMpIkC yKIowLhUu/De3rpTCfeLLLDZWl6CPvrJi0seYySjmoyRF61kJtssAo2P/8GFwDJhMvYs No6Q== X-Gm-Message-State: AC+VfDyb7X/ozhsLBBA15QvZtavrfWkPUE1NoPo+n0PX5Itsy3O4xJAB 12s1kTg2piesFJ/1xZZ9mCDv6CcVq+Jk9rEXFDMPmw== X-Google-Smtp-Source: ACHHUZ7uO8eKIA6m+gGUXLfTwh3z4iX7K5q6sJpxlyFaumFj1UJ6kKDZqhNHmpO40H3KGTH+nnABPA== X-Received: by 2002:a05:6a20:6a2a:b0:f6:d4d:2d with SMTP id p42-20020a056a206a2a00b000f60d4d002dmr47282448pzk.31.1684340182473; Wed, 17 May 2023 09:16:22 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id h5-20020a62b405000000b0063f33e216dasm15793009pfn.96.2023.05.17.09.16.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 May 2023 09:16:22 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Rasesh Mody , Shahed Shaikh Subject: [PATCH 14/20] net/bnx2x: remove reference to sanity Date: Wed, 17 May 2023 09:15:57 -0700 Message-Id: <20230517161603.117728-15-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230517161603.117728-1-stephen@networkplumber.org> References: <20230517161603.117728-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 Wed May 17 16:15:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 126939 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 5641A42B2C; Wed, 17 May 2023 18:17:44 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1F39742DAA; Wed, 17 May 2023 18:16:30 +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 6F42342D79 for ; Wed, 17 May 2023 18:16:24 +0200 (CEST) Received: by mail-pf1-f174.google.com with SMTP id d2e1a72fcca58-643465067d1so755080b3a.0 for ; Wed, 17 May 2023 09:16:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1684340183; x=1686932183; 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=Fcsm8/ABx8nxv5rBHDTTp/DAAKDDZTQnV7uIoWmTs0ddI+TwghXSPAy7dWFWJn5KcB 0i8/Vvm0ntM+nQa1BO1D7+H2FDZvqenvKaJLZZB7yJ/e7SQ12t9avhK97zbuSfPdfS/t Ii5nNuLYsVANy0g+x6hlOuZ7G1gxuCmM5MRfgS2BXaZ6sQyVe4L2w10ygSMb8r4tVezX rp7lbNfEE2kJxIbftylNJHY8/VRgjnrRkRC6dzSUNV06zoJ+ikB3kd1MXiwg/yTo/XuB QAVhbT5F0zG2HO7lpDhlxBMziRsQHtwHphyCB68xVnlDbPDHpmMl/bs4+U5MAh98GHUM 4hYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684340183; x=1686932183; 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=k1fM+QPv9NmHpQjH/PaalaqMzOz9lzQoBeCSYXkWGZuF8IELml+nxEYfN9LkWoeJtJ /ekGMFMWG/ze0GJ9wWGihZG+YdsIwlgN5f5Hp9iPUWBAfTne/nTWjoeVCpKcuMupNdJZ byQX1g3pMIVpsckrZczSOWR/sebehp7WyYNB8Z909fnNj/EZJ7DIju2I9p13ZtaN4R9t rt8M7ahX3p/SFTBtoVYh3yQjwRAovrhfFi4Lqa2affsfS323fH8h8LM5g0ZqiuPAuVIH bKKk++eoK74dIPjkDOza75q1t/LdS3VWYaO97OdSKnfWtV4kGRr7DETxw8XTyzhNzamX gxFQ== X-Gm-Message-State: AC+VfDz3D+tWQ0gzeGe+dZ++MTB9JQ+u7VthOhrP0RILAbbPYFlCwKtE aKZPPtniwHAvgS7TlMgQRmDbd8x0mwX0YMjtNzYaTw== X-Google-Smtp-Source: ACHHUZ5wjXTksLo1rBc9hMdSHZB+mIYzXBKx9cXoSDEhOVWSl5SXAqvreJH07mVMWc2DhHRfgmWNtg== X-Received: by 2002:a05:6a20:4658:b0:ef:95de:b877 with SMTP id eb24-20020a056a20465800b000ef95deb877mr41944372pzb.10.1684340183475; Wed, 17 May 2023 09:16:23 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id h5-20020a62b405000000b0063f33e216dasm15793009pfn.96.2023.05.17.09.16.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 May 2023 09:16:23 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao Subject: [PATCH 15/20] cnxk: replace term sanity Date: Wed, 17 May 2023 09:15:58 -0700 Message-Id: <20230517161603.117728-16-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230517161603.117728-1-stephen@networkplumber.org> References: <20230517161603.117728-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 Wed May 17 16:15:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 126940 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 175C942B2C; Wed, 17 May 2023 18:17:50 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3F44842DAE; Wed, 17 May 2023 18:16:31 +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 71C6B42D8D for ; Wed, 17 May 2023 18:16:25 +0200 (CEST) Received: by mail-pf1-f179.google.com with SMTP id d2e1a72fcca58-643912bca6fso772254b3a.0 for ; Wed, 17 May 2023 09:16:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1684340184; x=1686932184; 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=cZZG8/9Xl5mem+XcdvmWttIB0Sl04cqEsUWhxFNJ7bfdt318hjV3mGgD7TWd7EBzIy 3USBJ7y8dHEN4nZ5oh9aOmjjmvONKJ1aHefhJfxlC4b98CtPCDLzU5Tx9WQtRAZ6grDm FR5CMvja034hhMy20DU7ct0iLutuAzn91ZiUKRrCRFRSYGJ5PFKHCSz51G0dy8Wzp41E WsAgHf8tyvZJW2FYqV4kHBj6e0GHt78D9fGdvXPlYlXH5aOwuYsYrdIaT/MIeHATkbp1 gLe5xGqjw+N9qZ/hbbK+yYltAPTKfbsmgozzVALsKu++ZZuyhXhtliNzI3kaMubkrVw0 ER6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684340184; x=1686932184; 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=AMcN/dmHH1nHob6dhGcK0SEJcP/pNnuDBosWXWmNDSk/R0G7Ppsb5xcm4iQVqUIABb 3JtWB5aJjPgIq83RTYrFkKUGcR/68AL1vhE3FM6eTgkg9RtPNVPwHx3cMeGtW53x3XXR mMVFl5lQTOokLHQW9+DwbvQLwLdUiJYe8M3h664le2V5nzkR4pUopJZHtcmRbDrufksZ WrsmTvBUyqt35L+5xQXbYfQbLqUzRhGqe18DJm2NiM/0Eq826LKOGB8Yo+J8IMzISe9J KZ04dcPsHzmaxye6zbQ8RqI2fi74yIjlxq3y1UYt9s/gpo10VZAYnifFzIBO0dyWlb14 LsWw== X-Gm-Message-State: AC+VfDwVal+f8n+rha5h8R/MMPA5SU16nKrNW6gYqHwgVjHmYik7JsTY iJPi2CGUv7u7MZaKt9WkScE9VnFXttLkYg/jXOGjhg== X-Google-Smtp-Source: ACHHUZ7K1p5896qI++Ehk887EwGTcHHGG89BCfBHx4WRTFV9J6WrF3cubMY9c7lLxYg1PzWioaotjg== X-Received: by 2002:a05:6a00:b95:b0:643:b37d:d350 with SMTP id g21-20020a056a000b9500b00643b37dd350mr144068pfj.31.1684340184429; Wed, 17 May 2023 09:16:24 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id h5-20020a62b405000000b0063f33e216dasm15793009pfn.96.2023.05.17.09.16.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 May 2023 09:16:24 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Liang Ma , Peter Mccarthy Subject: [PATCH 16/20] event/opdl: remove term sanity Date: Wed, 17 May 2023 09:15:59 -0700 Message-Id: <20230517161603.117728-17-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230517161603.117728-1-stephen@networkplumber.org> References: <20230517161603.117728-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 Wed May 17 16:16:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 126941 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 E705A42B2C; Wed, 17 May 2023 18:17:54 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6679242DB5; Wed, 17 May 2023 18:16:32 +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 966F242D94 for ; Wed, 17 May 2023 18:16:26 +0200 (CEST) Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-64359d9c531so712920b3a.3 for ; Wed, 17 May 2023 09:16:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1684340185; x=1686932185; 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=oYAJ0Ca3WyuCl7E8QbT6Pm5WKrFz5YRKCzJPxQnyEUTHi/B+5abr0sfj/KQR3Kw1+o L9Lmlkknd/Q4uF8eJbXC6Pq7SZVW6PWb/cxZ+FRbt9/sNSJsr60sH9eFY8bBg1DxngNy gOrbKhRLqLJMXwyzAW2oZ8L2daELgiqOB1A/0srfa6UM0YMFWhVLCZlNgrozR/q5EMST NFGVARc2H/KVAqDPSYyJ0FwY5pNtCB4zvBWdX08FfSmhx2dEhFlgw45CfAEU4LTI1R40 ibLjBT48bhijWMHDNBG7R2SbNqG+i8Fh+OWWF7VymEyypjHY9laHPFfzHKP/f+LRTR+D IBzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684340185; x=1686932185; 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=HzvgKBnSUW366GdYrgmG2Nz1MxdgpE4tNIDtLmoP8j5OOa6ypkt38ZwDKfHVPj3nqD +f5ilM2OCz8xx7pCEZd09e1hKmDVT9SQDIQhjsZwOA56tIOwwz1CcYtKKA4/l53tbDX4 50/qAX4/4oL8qRk2O9UXUpHbrxyPTgDU/sYu7hpmyYT/yZYvh9cf6nCitvLNRM6Sqzm6 lSn7okNbx8QMAlSIIKtDZ8qEgpktKpbymnRO+wdRFrlcp3G327YLFM6dPeeLBCFy9BRU qV4XLF/PPbPDhu9cdV84UrAxcDvUmmFbt4KTj/kq9BJ4ieMU6PzUfh/oO71f2x9lz3b8 GDjA== X-Gm-Message-State: AC+VfDzMpdcrfOZyF4H/eaG6VOTtOEAH9rsnDnXrh3/IgtiOEC6qaGV9 0hj7CQyqtOoHsX3o4qWBBWXICZ9bZa0WK02/FKFBLw== X-Google-Smtp-Source: ACHHUZ7ov9YRxzELfmnhBTVSmp7wenW2kAuv5uIL+R/9M6cSGm0OHvWshNgthm3iLa7Potscbn/iJg== X-Received: by 2002:a05:6a00:1311:b0:63b:5c82:e209 with SMTP id j17-20020a056a00131100b0063b5c82e209mr336730pfu.10.1684340185579; Wed, 17 May 2023 09:16:25 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id h5-20020a62b405000000b0063f33e216dasm15793009pfn.96.2023.05.17.09.16.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 May 2023 09:16:25 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Jiawen Wu , Jian Wang Subject: [PATCH 17/20] net/txgbe: replace term sanity Date: Wed, 17 May 2023 09:16:00 -0700 Message-Id: <20230517161603.117728-18-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230517161603.117728-1-stephen@networkplumber.org> References: <20230517161603.117728-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 Wed May 17 16:16:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 126942 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 CC8D142B2C; Wed, 17 May 2023 18:18:01 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 52EB642F84; Wed, 17 May 2023 18:16:34 +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 9451A42D94 for ; Wed, 17 May 2023 18:16:27 +0200 (CEST) Received: by mail-pf1-f173.google.com with SMTP id d2e1a72fcca58-643990c5373so916656b3a.1 for ; Wed, 17 May 2023 09:16:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1684340186; x=1686932186; 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=e8Avn0foi1tEmuX0lGMBRV6nC1t1xCS/bUsDbXwA5suDZAebWG/S5pZh/1Y6wZEw3a B3vaeWxFwjWSoZf/PE6MGK2HswbABf6TtG07mcS9a8eJ9vS/dipBuKUM+7YW4nVaK6o8 ZTogrPslG0rX0PGcl7qlD5CaVGf1MqfZ7RfvrKisdASVKzqF5e25wr7xIiH1a5xe6fQq uC9DKj8U1hnMlCUMkZ8dKMVwm4grRReRPBF1uwKBDOUgRKyBE7VGVo5/xObbgH5gIYoI +SkSr3GsV0/dJq153kGNNjA7rblnSyDDgjS6Evk5t6j/k1y/kdPsyqVwLZcQGqnOIpzk 78Pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684340186; x=1686932186; 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=kP0Jd5Fq+vt/j+BkP7G69zPUOwyxxxZOBYUhQsS9ngOBInEduVQVKTnmWShWdWfTi6 1T+6rjAWNCfov7/MvAK6rlJZuOZdXB8xjs/cqXzswDd0AtF3fvfZ8QdDJkYSrfORGeYZ vdDvW0iI3unwKEpr19QveN7TRc1l5AMvYPY1QgLvWwBal7ESuIoM2gKZH1IOvstg3Gmd FryqeUAJmJmCV6jAQerlpBC2UTxnoOAqymOPxFTrJoS/60eTxdp8G6/1PPKriTXzZayO RD4e5xhMl/xmMsec/06DgGwBUOhCluW+JCtxfetnc+fwK/BUoZ0jOeYgq6+afz4KQvui 6ATg== X-Gm-Message-State: AC+VfDyte1lOrM+ZboERZkzCvco5AG6wzrwMtCRVwWg3I9yeI/HFcdeG JDlm3TWaMKy257rY4PzVpn2uDmTL+gMHIjx08sFjtA== X-Google-Smtp-Source: ACHHUZ574WD2Sq081TAFNgFhyP3C4R5cCoFJdG+dlzp9rUKgmrKh/E/pHRq0HtZlH18llpNdM8tcag== X-Received: by 2002:a05:6a00:2ea3:b0:62a:d752:acc5 with SMTP id fd35-20020a056a002ea300b0062ad752acc5mr160454pfb.32.1684340186608; Wed, 17 May 2023 09:16:26 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id h5-20020a62b405000000b0063f33e216dasm15793009pfn.96.2023.05.17.09.16.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 May 2023 09:16:26 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Rahul Lakkireddy Subject: [PATCH 18/20] net/cxgbe: remove use of term sanity Date: Wed, 17 May 2023 09:16:01 -0700 Message-Id: <20230517161603.117728-19-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230517161603.117728-1-stephen@networkplumber.org> References: <20230517161603.117728-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 Wed May 17 16:16:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 126943 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 D85E442B2C; Wed, 17 May 2023 18:18:06 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 79BBA42F88; Wed, 17 May 2023 18:16:35 +0200 (CEST) Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) by mails.dpdk.org (Postfix) with ESMTP id 79CC542DA0 for ; Wed, 17 May 2023 18:16:28 +0200 (CEST) Received: by mail-pf1-f178.google.com with SMTP id d2e1a72fcca58-6439df6c268so704346b3a.0 for ; Wed, 17 May 2023 09:16:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1684340187; x=1686932187; 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=LZ9IZEcB2GRnYJot0fxPSEugWYaAM5956+DdRj4vDE0MormxV/ePNVmYp53dQQ+1K7 9O/xn6wBSY//S2lOTJYx247NAx4QnrjmUModJ+/gmaC1AdK9dNERhwBoaL4HHs0XDLFr QEmTRaa9nsUCjbRLAhWckAkZEn0jwdAdZskgXGvoG9jWk+JC2tTsvL9uoK6K+whbRDKY p3yN+bL5GGqQbnHYmivgV4yF1LKbALgQSZua6XLHM2IW5twYmgOjyTguGmFMqb4WV+8U 9wXtlVu/Zh/AzFLq2DibJzADeplH0/zQyQs91NUXmcdwukyAXCqmk0vu8cZXlG8vyIMT MyGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684340187; x=1686932187; 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=YQC5aky0Cua7gbQUeJ+FWTZVE4qmotYeLqbpx83hi6GfSzLRQ3FCOOwi95IoCYPqUi QrQNBx/m79n/KDBJg2HuMhUmNOJuynDwf+3wtX8L2Tq3uS8L+QNMGgGZ06xvo3/mkXTR EaWknFfRXWwh2RcneMGYSks8GGcepRyVkuLyf4X50FGIA72TJhXlr3NoNln6W/nGRBOi Gv6khsJB8KcJPeicm1yqucDcUUTAkfsRQJD6OJ+rhdUIRaGahFyZIRNIdnRYwAhMjIBK Z57QYWnzY8TMqB1nueRVnvVtyc0ze5yODIrG50cufz7r3VWr0uZpYfBOjqq0kUyIdqwM vGlA== X-Gm-Message-State: AC+VfDz5sCHjVUkrtwkEoBmVhuS3uCMNzsOjzaZaQNbEWNc8yABgsfMq pqL6/r0MXOMNNnJwQKffV/rxVCmIEZC8oA7avXwq0w== X-Google-Smtp-Source: ACHHUZ61/7ZyFCQpAiw19UEOGVl3f9BRB+mUhsFB3XnbJzuCIw2LeY2HXE70/K5S7J2YzAc6qQBNgA== X-Received: by 2002:a05:6a00:2183:b0:643:9b40:103e with SMTP id h3-20020a056a00218300b006439b40103emr137391pfi.30.1684340187521; Wed, 17 May 2023 09:16:27 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id h5-20020a62b405000000b0063f33e216dasm15793009pfn.96.2023.05.17.09.16.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 May 2023 09:16:27 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Ajit Khaparde , Raveendra Padasalagi , Vikas Gupta Subject: [PATCH 19/20] crypto/bcmfs: replace term sanity check Date: Wed, 17 May 2023 09:16:02 -0700 Message-Id: <20230517161603.117728-20-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230517161603.117728-1-stephen@networkplumber.org> References: <20230517161603.117728-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 Wed May 17 16:16:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 126944 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 0576F42B2C; Wed, 17 May 2023 18:18:12 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9B7D042D62; Wed, 17 May 2023 18:16:36 +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 8C6C042DA8 for ; Wed, 17 May 2023 18:16:29 +0200 (CEST) Received: by mail-pf1-f177.google.com with SMTP id d2e1a72fcca58-64388cf3263so693412b3a.3 for ; Wed, 17 May 2023 09:16:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1684340188; x=1686932188; 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=HB9MRjApDRWeCMT3akB8dc88c3aVJIs52nSNjrCQdgk=; b=eDlDPZwTvBmw4r0XTZeHXTD3x7Qg3XYUxAgkT9fYwj0ABbOxhdgbeG0PVKqLGrnFX5 gTII5IHoHmHVxQ14Ti2IdWLCqMMwZRcToHEery8REG2G3quGKGu7wp7cu+KpzAAhdE4f a26iIwCB7sF5gHtJ3TlucAEB9dMnwWwsJC4CTJ8ut/L8lrbABejjsJ7TK9IvQ+STZC/s +hi8e+2bgjJ4/PfbeogtunuWr1C4iEy3K4iemMPGgyLoWGML9PkAImhyj9HqPjA3iFDl rh2W7p5jnwK+nN150BldGISYX9pvKB5QI0Q1trPkNMU8gHP6A1DavToAyo60IRBvCfWu bDsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684340188; x=1686932188; 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=HB9MRjApDRWeCMT3akB8dc88c3aVJIs52nSNjrCQdgk=; b=CsHXPVTu6TyNTmqOsLP8qaBnU2IVT99LiGFVOL523qbonS/IXsFPfgQkS3FoDAL9Cd UHi0x6Se94ZmamVZ05wik1zD4x8ZzUIWdM8RG04m6FtUCenGMW47M6tk3JgLanW5lVz/ 8amXsSRPHJ/RLrSzijBPTbPBZ/3+L8vB1SpRPy63f5aZgBiTMCSQ/Pa6FjOEz87gMRLj 6G5VMohbKIUyZjxau16L2qm+MZCdxshM6xxHvIlHEp/JkkWfOb4Bvbh3MjWoHHhd31z/ OfPbCjqXmzX7GPuVnADiKXk6fNQ/v1g0OkwqPxuhEAOLCcq3WTvNXwcuKo3s5eHMimY2 wsYQ== X-Gm-Message-State: AC+VfDxaU/bwTTv25bAgapMseLaTUNjVz2zCz9xNR6s6Oz04cQDE3gLF GKcn9Jt6qYK7nYiRpB/Ve4qba6SRG0lN+kyjM/x3Vlo4 X-Google-Smtp-Source: ACHHUZ70zXJRzzIChAzxlaQafn/VlpTAVnzCM4IIN3YZ41ZBghUmcBPB0hI+/yl+PSH7ri14hQCy1g== X-Received: by 2002:a05:6a20:7354:b0:101:1d1d:43a4 with SMTP id v20-20020a056a20735400b001011d1d43a4mr38200033pzc.15.1684340188555; Wed, 17 May 2023 09:16:28 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id h5-20020a62b405000000b0063f33e216dasm15793009pfn.96.2023.05.17.09.16.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 May 2023 09:16:28 -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 20/20] Remove use of term sanity check Date: Wed, 17 May 2023 09:16:03 -0700 Message-Id: <20230517161603.117728-21-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230517161603.117728-1-stephen@networkplumber.org> References: <20230517161603.117728-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. Signed-off-by: Stephen Hemminger Acked-by: Hemant Agrawal --- 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..a6da04cf361f 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_check(struct rte_mbuf *mbuf, struct qede_tx_queue *txq) { if (((mbuf->outer_l2_len + mbuf->outer_l3_len) / 2) > 0xff) @@ -2473,7 +2473,7 @@ qede_xmit_pkts(void *p_txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) RTE_MBUF_F_TX_TUNNEL_MPLSINUDP) { mplsoudp_flg = true; #ifdef RTE_LIBRTE_QEDE_DEBUG_TX - qede_mpls_tunn_tx_sanity_check(mbuf, txq); + qede_mpls_tunn_tx_check(mbuf, txq); #endif /* Outer L4 offset in two byte words */ tunn_l4_hdr_start_offset =