DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH 00/11] Fixes for clang 15
@ 2022-11-18  8:53 David Marchand
  2022-11-18  8:53 ` [PATCH 01/11] service: fix build with " David Marchand
                   ` (12 more replies)
  0 siblings, 13 replies; 17+ messages in thread
From: David Marchand @ 2022-11-18  8:53 UTC (permalink / raw)
  To: dev

Fedora 37 has just been released with clang 15.
The latter seems more picky wrt unused variable.

Fixes have been tested in GHA with a simple patch I used in my own repo:
https://github.com/david-marchand/dpdk/commit/82cd57ae5490
https://github.com/david-marchand/dpdk/actions/runs/3495454457

-- 
David Marchand

David Marchand (11):
  service: fix build with clang 15
  vhost: fix build with clang 15
  bus/dpaa: fix build with clang 15
  net/atlantic: fix build with clang 15
  net/dpaa2: fix build with clang 15
  net/ice: fix build with clang 15
  app/testpmd: fix build with clang 15
  app/testpmd: fix build with clang 15 in flow code
  test/efd: fix build with clang 15
  test/member: fix build with clang 15
  test/event: fix build with clang 15

 app/test-pmd/config.c               | 14 --------------
 app/test-pmd/noisy_vnf.c            |  2 +-
 app/test/test_efd_perf.c            |  1 -
 app/test/test_event_timer_adapter.c |  2 --
 app/test/test_member.c              |  1 -
 app/test/test_member_perf.c         |  1 -
 drivers/bus/dpaa/base/qbman/bman.h  |  4 +---
 drivers/net/atlantic/atl_rxtx.c     |  5 ++---
 drivers/net/dpaa2/dpaa2_rxtx.c      |  4 +---
 drivers/net/ice/ice_ddp_package.c   |  3 ---
 lib/eal/common/rte_service.c        |  2 --
 lib/vhost/virtio_net.c              |  2 --
 12 files changed, 5 insertions(+), 36 deletions(-)

-- 
2.38.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 01/11] service: fix build with clang 15
  2022-11-18  8:53 [PATCH 00/11] Fixes for clang 15 David Marchand
@ 2022-11-18  8:53 ` David Marchand
  2022-11-18 14:47   ` Van Haaren, Harry
  2022-11-18  8:53 ` [PATCH 02/11] vhost: " David Marchand
                   ` (11 subsequent siblings)
  12 siblings, 1 reply; 17+ messages in thread
From: David Marchand @ 2022-11-18  8:53 UTC (permalink / raw)
  To: dev; +Cc: stable, Harry van Haaren, Jerin Jacob

This variable is not used.

Bugzilla ID: 1130
Fixes: 21698354c832 ("service: introduce service cores concept")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 lib/eal/common/rte_service.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/lib/eal/common/rte_service.c b/lib/eal/common/rte_service.c
index bcc2e19077..42ca1d001d 100644
--- a/lib/eal/common/rte_service.c
+++ b/lib/eal/common/rte_service.c
@@ -107,14 +107,12 @@ rte_service_init(void)
 	}
 
 	int i;
-	int count = 0;
 	struct rte_config *cfg = rte_eal_get_configuration();
 	for (i = 0; i < RTE_MAX_LCORE; i++) {
 		if (lcore_config[i].core_role == ROLE_SERVICE) {
 			if ((unsigned int)i == cfg->main_lcore)
 				continue;
 			rte_service_lcore_add(i);
-			count++;
 		}
 	}
 
-- 
2.38.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 02/11] vhost: fix build with clang 15
  2022-11-18  8:53 [PATCH 00/11] Fixes for clang 15 David Marchand
  2022-11-18  8:53 ` [PATCH 01/11] service: fix build with " David Marchand
@ 2022-11-18  8:53 ` David Marchand
  2022-11-18 10:23   ` Maxime Coquelin
  2022-11-18  8:53 ` [PATCH 03/11] bus/dpaa: " David Marchand
                   ` (10 subsequent siblings)
  12 siblings, 1 reply; 17+ messages in thread
From: David Marchand @ 2022-11-18  8:53 UTC (permalink / raw)
  To: dev; +Cc: stable, Maxime Coquelin, Chenbo Xia, Jiayu Hu, Cheng Jiang

This variable is not used.

Fixes: abeb86525577 ("vhost: remove copy threshold for async path")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 lib/vhost/virtio_net.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c
index 4358899718..9abf752f30 100644
--- a/lib/vhost/virtio_net.c
+++ b/lib/vhost/virtio_net.c
@@ -1877,7 +1877,6 @@ virtio_dev_rx_async_submit_packed(struct virtio_net *dev, struct vhost_virtqueue
 	struct rte_mbuf **pkts, uint32_t count, int16_t dma_id, uint16_t vchan_id)
 {
 	uint32_t pkt_idx = 0;
-	uint32_t remained = count;
 	uint16_t n_xfer;
 	uint16_t num_buffers;
 	uint16_t num_descs;
@@ -1903,7 +1902,6 @@ virtio_dev_rx_async_submit_packed(struct virtio_net *dev, struct vhost_virtqueue
 		pkts_info[slot_idx].mbuf = pkts[pkt_idx];
 
 		pkt_idx++;
-		remained--;
 		vq_inc_last_avail_packed(vq, num_descs);
 	} while (pkt_idx < count);
 
-- 
2.38.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 03/11] bus/dpaa: fix build with clang 15
  2022-11-18  8:53 [PATCH 00/11] Fixes for clang 15 David Marchand
  2022-11-18  8:53 ` [PATCH 01/11] service: fix build with " David Marchand
  2022-11-18  8:53 ` [PATCH 02/11] vhost: " David Marchand
@ 2022-11-18  8:53 ` David Marchand
  2022-11-18  8:53 ` [PATCH 04/11] net/atlantic: " David Marchand
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 17+ messages in thread
From: David Marchand @ 2022-11-18  8:53 UTC (permalink / raw)
  To: dev
  Cc: stable, Hemant Agrawal, Sachin Saxena, Shreyansh Jain,
	Roy Pledge, Geoff Thorpe

This variable is not used.

Fixes: f38f61e982f8 ("bus/dpaa: add BMAN hardware interfaces")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 drivers/bus/dpaa/base/qbman/bman.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/bus/dpaa/base/qbman/bman.h b/drivers/bus/dpaa/base/qbman/bman.h
index 21a6bee778..b2aa93e046 100644
--- a/drivers/bus/dpaa/base/qbman/bman.h
+++ b/drivers/bus/dpaa/base/qbman/bman.h
@@ -519,7 +519,6 @@ static inline int bm_shutdown_pool(struct bm_portal *p, u32 bpid)
 	struct bm_mc_command *bm_cmd;
 	struct bm_mc_result *bm_res;
 
-	int aq_count = 0;
 	bool stop = false;
 
 	while (!stop) {
@@ -532,8 +531,7 @@ static inline int bm_shutdown_pool(struct bm_portal *p, u32 bpid)
 		if (!(bm_res->verb & BM_MCR_VERB_ACQUIRE_BUFCOUNT)) {
 			/* Pool is empty */
 			stop = true;
-		} else
-			++aq_count;
+		}
 	};
 	return 0;
 }
-- 
2.38.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 04/11] net/atlantic: fix build with clang 15
  2022-11-18  8:53 [PATCH 00/11] Fixes for clang 15 David Marchand
                   ` (2 preceding siblings ...)
  2022-11-18  8:53 ` [PATCH 03/11] bus/dpaa: " David Marchand
@ 2022-11-18  8:53 ` David Marchand
  2022-11-18  8:53 ` [PATCH 05/11] net/dpaa2: " David Marchand
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 17+ messages in thread
From: David Marchand @ 2022-11-18  8:53 UTC (permalink / raw)
  To: dev; +Cc: stable, Igor Russkikh, Pavel Belous

This variable is not used.

Fixes: 2b1472d7150c ("net/atlantic: implement Tx path")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/atlantic/atl_rxtx.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/atlantic/atl_rxtx.c b/drivers/net/atlantic/atl_rxtx.c
index aeb79bf5a2..cb6f8141a8 100644
--- a/drivers/net/atlantic/atl_rxtx.c
+++ b/drivers/net/atlantic/atl_rxtx.c
@@ -1127,10 +1127,9 @@ atl_xmit_cleanup(struct atl_tx_queue *txq)
 	if (txq != NULL) {
 		sw_ring = txq->sw_ring;
 		int head = txq->tx_head;
-		int cnt;
-		int i;
+		int cnt = head;
 
-		for (i = 0, cnt = head; ; i++) {
+		while (true) {
 			txd = &txq->hw_ring[cnt];
 
 			if (txd->dd)
-- 
2.38.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 05/11] net/dpaa2: fix build with clang 15
  2022-11-18  8:53 [PATCH 00/11] Fixes for clang 15 David Marchand
                   ` (3 preceding siblings ...)
  2022-11-18  8:53 ` [PATCH 04/11] net/atlantic: " David Marchand
@ 2022-11-18  8:53 ` David Marchand
  2022-11-18  8:53 ` [PATCH 06/11] net/ice: " David Marchand
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 17+ messages in thread
From: David Marchand @ 2022-11-18  8:53 UTC (permalink / raw)
  To: dev; +Cc: stable, Hemant Agrawal, Sachin Saxena, Nipun Gupta

This variable is not used.

Fixes: 4690a6114ff6 ("net/dpaa2: enable error queues optionally")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/dpaa2/dpaa2_rxtx.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c
index 5b02260e71..f60e78e1fd 100644
--- a/drivers/net/dpaa2/dpaa2_rxtx.c
+++ b/drivers/net/dpaa2/dpaa2_rxtx.c
@@ -620,7 +620,7 @@ dump_err_pkts(struct dpaa2_queue *dpaa2_q)
 	/* Function receive frames for a given device and VQ */
 	struct qbman_result *dq_storage;
 	uint32_t fqid = dpaa2_q->fqid;
-	int ret, num_rx = 0, num_pulled;
+	int ret, num_rx = 0;
 	uint8_t pending, status;
 	struct qbman_swp *swp;
 	const struct qbman_fd *fd;
@@ -660,7 +660,6 @@ dump_err_pkts(struct dpaa2_queue *dpaa2_q)
 	while (!qbman_check_command_complete(dq_storage))
 		;
 
-	num_pulled = 0;
 	pending = 1;
 	do {
 		/* Loop until the dq_storage is updated with
@@ -695,7 +694,6 @@ dump_err_pkts(struct dpaa2_queue *dpaa2_q)
 
 		dq_storage++;
 		num_rx++;
-		num_pulled++;
 	} while (pending);
 
 	dpaa2_q->err_pkts += num_rx;
-- 
2.38.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 06/11] net/ice: fix build with clang 15
  2022-11-18  8:53 [PATCH 00/11] Fixes for clang 15 David Marchand
                   ` (4 preceding siblings ...)
  2022-11-18  8:53 ` [PATCH 05/11] net/dpaa2: " David Marchand
@ 2022-11-18  8:53 ` David Marchand
  2022-11-18  8:53 ` [PATCH 07/11] app/testpmd: " David Marchand
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 17+ messages in thread
From: David Marchand @ 2022-11-18  8:53 UTC (permalink / raw)
  To: dev; +Cc: stable, Qiming Yang, Qi Zhang, Steve Yang

This variable is not used.

Fixes: 0d8d7bd720ba ("net/ice: support DDP dump switch rule binary")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/ice/ice_ddp_package.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/ice/ice_ddp_package.c b/drivers/net/ice/ice_ddp_package.c
index a27a4a2da2..0aa19eb282 100644
--- a/drivers/net/ice/ice_ddp_package.c
+++ b/drivers/net/ice/ice_ddp_package.c
@@ -439,7 +439,6 @@ ice_dump_switch(struct rte_eth_dev *dev, uint8_t **buff2, uint32_t *size)
 	int i = 0;
 	uint16_t tbl_id = 0;
 	uint32_t tbl_idx = 0;
-	int tbl_cnt = 0;
 	uint8_t *buffer = *buff2;
 
 	hw = ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
@@ -481,10 +480,8 @@ ice_dump_switch(struct rte_eth_dev *dev, uint8_t **buff2, uint32_t *size)
 
 		free(buff);
 
-		tbl_cnt++;
 		if (tbl_idx == 0xffffffff) {
 			tbl_idx = 0;
-			tbl_cnt = 0;
 			memset(buffer, '\n', sizeof(char));
 			buffer++;
 			offset = 0;
-- 
2.38.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 07/11] app/testpmd: fix build with clang 15
  2022-11-18  8:53 [PATCH 00/11] Fixes for clang 15 David Marchand
                   ` (5 preceding siblings ...)
  2022-11-18  8:53 ` [PATCH 06/11] net/ice: " David Marchand
@ 2022-11-18  8:53 ` David Marchand
  2022-11-18  8:53 ` [PATCH 08/11] app/testpmd: fix build with clang 15 in flow code David Marchand
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 17+ messages in thread
From: David Marchand @ 2022-11-18  8:53 UTC (permalink / raw)
  To: dev
  Cc: stable, Aman Singh, Yuying Zhang, Kevin Traynor,
	Bernard Iremonger, Jens Freimann

This variable is used to create some artificial load.

Fixes: 3c156061b938 ("app/testpmd: add noisy neighbour forwarding mode")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 app/test-pmd/noisy_vnf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-pmd/noisy_vnf.c b/app/test-pmd/noisy_vnf.c
index b17a1febd3..c65ec6f06a 100644
--- a/app/test-pmd/noisy_vnf.c
+++ b/app/test-pmd/noisy_vnf.c
@@ -57,8 +57,8 @@ do_write(char *vnf_mem)
 static inline void
 do_read(char *vnf_mem)
 {
+	uint64_t r __rte_unused;
 	uint64_t i = rte_rand();
-	uint64_t r;
 
 	r = vnf_mem[i % ((noisy_lkup_mem_sz * 1024 * 1024) /
 			RTE_CACHE_LINE_SIZE)];
-- 
2.38.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 08/11] app/testpmd: fix build with clang 15 in flow code
  2022-11-18  8:53 [PATCH 00/11] Fixes for clang 15 David Marchand
                   ` (6 preceding siblings ...)
  2022-11-18  8:53 ` [PATCH 07/11] app/testpmd: " David Marchand
@ 2022-11-18  8:53 ` David Marchand
  2022-11-18  8:53 ` [PATCH 09/11] test/efd: fix build with clang 15 David Marchand
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 17+ messages in thread
From: David Marchand @ 2022-11-18  8:53 UTC (permalink / raw)
  To: dev
  Cc: stable, Aman Singh, Yuying Zhang, Olga Shern, Adrien Mazarguil,
	Ajit Khaparde, Ori Kam, Andrey Vesnovaty, Alexander Kozyrev

This variable is not used and has been copy/pasted in a lot of other
code.

Fixes: 938a184a1870 ("app/testpmd: implement basic support for flow API")
Fixes: 55509e3a49fb ("app/testpmd: support shared flow action")
Fixes: 04cc665fab38 ("app/testpmd: add flow template management")
Fixes: c4b38873346b ("app/testpmd: add flow table management")
Fixes: ecdc927b99f2 ("app/testpmd: add async flow create/destroy operations")
Fixes: d906fff51878 ("app/testpmd: add async indirect actions operations")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 app/test-pmd/config.c | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 982549ffed..9103ba6c77 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1787,7 +1787,6 @@ port_action_handle_destroy(portid_t port_id,
 {
 	struct rte_port *port;
 	struct port_indirect_action **tmp;
-	uint32_t c = 0;
 	int ret = 0;
 
 	if (port_id_is_invalid(port_id, ENABLED_WARN) ||
@@ -1822,7 +1821,6 @@ port_action_handle_destroy(portid_t port_id,
 		}
 		if (i == n)
 			tmp = &(*tmp)->next;
-		++c;
 	}
 	return ret;
 }
@@ -2251,7 +2249,6 @@ port_flow_pattern_template_destroy(portid_t port_id, uint32_t n,
 {
 	struct rte_port *port;
 	struct port_template **tmp;
-	uint32_t c = 0;
 	int ret = 0;
 
 	if (port_id_is_invalid(port_id, ENABLED_WARN) ||
@@ -2288,7 +2285,6 @@ port_flow_pattern_template_destroy(portid_t port_id, uint32_t n,
 		}
 		if (i == n)
 			tmp = &(*tmp)->next;
-		++c;
 	}
 	return ret;
 }
@@ -2368,7 +2364,6 @@ port_flow_actions_template_destroy(portid_t port_id, uint32_t n,
 {
 	struct rte_port *port;
 	struct port_template **tmp;
-	uint32_t c = 0;
 	int ret = 0;
 
 	if (port_id_is_invalid(port_id, ENABLED_WARN) ||
@@ -2404,7 +2399,6 @@ port_flow_actions_template_destroy(portid_t port_id, uint32_t n,
 		}
 		if (i == n)
 			tmp = &(*tmp)->next;
-		++c;
 	}
 	return ret;
 }
@@ -2534,7 +2528,6 @@ port_flow_template_table_destroy(portid_t port_id,
 {
 	struct rte_port *port;
 	struct port_table **tmp;
-	uint32_t c = 0;
 	int ret = 0;
 
 	if (port_id_is_invalid(port_id, ENABLED_WARN) ||
@@ -2571,7 +2564,6 @@ port_flow_template_table_destroy(portid_t port_id,
 		}
 		if (i == n)
 			tmp = &(*tmp)->next;
-		++c;
 	}
 	return ret;
 }
@@ -2719,7 +2711,6 @@ port_queue_flow_destroy(portid_t port_id, queueid_t queue_id,
 	struct rte_flow_op_attr op_attr = { .postpone = postpone };
 	struct rte_port *port;
 	struct port_flow **tmp;
-	uint32_t c = 0;
 	int ret = 0;
 	struct queue_job *job;
 
@@ -2768,7 +2759,6 @@ port_queue_flow_destroy(portid_t port_id, queueid_t queue_id,
 		}
 		if (i == n)
 			tmp = &(*tmp)->next;
-		++c;
 	}
 	return ret;
 }
@@ -2836,7 +2826,6 @@ port_queue_action_handle_destroy(portid_t port_id,
 	const struct rte_flow_op_attr attr = { .postpone = postpone};
 	struct rte_port *port;
 	struct port_indirect_action **tmp;
-	uint32_t c = 0;
 	int ret = 0;
 	struct queue_job *job;
 
@@ -2886,7 +2875,6 @@ port_queue_action_handle_destroy(portid_t port_id,
 		}
 		if (i == n)
 			tmp = &(*tmp)->next;
-		++c;
 	}
 	return ret;
 }
@@ -3304,7 +3292,6 @@ port_flow_destroy(portid_t port_id, uint32_t n, const uint32_t *rule)
 {
 	struct rte_port *port;
 	struct port_flow **tmp;
-	uint32_t c = 0;
 	int ret = 0;
 
 	if (port_id_is_invalid(port_id, ENABLED_WARN) ||
@@ -3337,7 +3324,6 @@ port_flow_destroy(portid_t port_id, uint32_t n, const uint32_t *rule)
 		}
 		if (i == n)
 			tmp = &(*tmp)->next;
-		++c;
 	}
 	return ret;
 }
-- 
2.38.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 09/11] test/efd: fix build with clang 15
  2022-11-18  8:53 [PATCH 00/11] Fixes for clang 15 David Marchand
                   ` (7 preceding siblings ...)
  2022-11-18  8:53 ` [PATCH 08/11] app/testpmd: fix build with clang 15 in flow code David Marchand
@ 2022-11-18  8:53 ` David Marchand
  2022-11-18  8:53 ` [PATCH 10/11] test/member: " David Marchand
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 17+ messages in thread
From: David Marchand @ 2022-11-18  8:53 UTC (permalink / raw)
  To: dev
  Cc: stable, Byron Marohn, Yipeng Wang, Saikrishna Edupuganti,
	Karla Saur, Christian Maciocco, Pablo de Lara

This local variable hides the more global one.
The original intent was probably to use the global one.

Fixes: 0e925aef2779 ("app/test: add EFD functional and perf tests")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 app/test/test_efd_perf.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/app/test/test_efd_perf.c b/app/test/test_efd_perf.c
index d7f4d83549..4d04ed93e3 100644
--- a/app/test/test_efd_perf.c
+++ b/app/test/test_efd_perf.c
@@ -153,7 +153,6 @@ setup_keys_and_data(struct efd_perf_params *params, unsigned int cycle)
 		qsort(keys, KEYS_TO_ADD, MAX_KEYSIZE, key_compare);
 
 		/* Sift through the list of keys and look for duplicates */
-		int num_duplicates = 0;
 		for (i = 0; i < KEYS_TO_ADD - 1; i++) {
 			if (memcmp(keys[i], keys[i + 1], params->key_size) == 0) {
 				/* This key already exists, try again */
-- 
2.38.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 10/11] test/member: fix build with clang 15
  2022-11-18  8:53 [PATCH 00/11] Fixes for clang 15 David Marchand
                   ` (8 preceding siblings ...)
  2022-11-18  8:53 ` [PATCH 09/11] test/efd: fix build with clang 15 David Marchand
@ 2022-11-18  8:53 ` David Marchand
  2022-11-18  8:53 ` [PATCH 11/11] test/event: " David Marchand
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 17+ messages in thread
From: David Marchand @ 2022-11-18  8:53 UTC (permalink / raw)
  To: dev; +Cc: stable, Yipeng Wang, Sameh Gobriel, Pablo de Lara

This local variable hides the more global one.
The original intent was probably to use the global one.

Fixes: 0cc67a96e486 ("test/member: add functional and perf tests")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 app/test/test_member.c      | 1 -
 app/test/test_member_perf.c | 1 -
 2 files changed, 2 deletions(-)

diff --git a/app/test/test_member.c b/app/test/test_member.c
index c1b6a7d8b9..4a93f8bff4 100644
--- a/app/test/test_member.c
+++ b/app/test/test_member.c
@@ -573,7 +573,6 @@ setup_keys_and_data(void)
 		qsort(generated_keys, MAX_ENTRIES, KEY_SIZE, key_compare);
 
 		/* Sift through the list of keys and look for duplicates */
-		int num_duplicates = 0;
 		for (i = 0; i < MAX_ENTRIES - 1; i++) {
 			if (memcmp(generated_keys[i], generated_keys[i + 1],
 					KEY_SIZE) == 0) {
diff --git a/app/test/test_member_perf.c b/app/test/test_member_perf.c
index 7b6adf913e..2f79888fbd 100644
--- a/app/test/test_member_perf.c
+++ b/app/test/test_member_perf.c
@@ -178,7 +178,6 @@ setup_keys_and_data(struct member_perf_params *params, unsigned int cycle,
 		qsort(keys, KEYS_TO_ADD, MAX_KEYSIZE, key_compare);
 
 		/* Sift through the list of keys and look for duplicates */
-		int num_duplicates = 0;
 		for (i = 0; i < KEYS_TO_ADD - 1; i++) {
 			if (memcmp(keys[i], keys[i + 1],
 					params->key_size) == 0) {
-- 
2.38.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 11/11] test/event: fix build with clang 15
  2022-11-18  8:53 [PATCH 00/11] Fixes for clang 15 David Marchand
                   ` (9 preceding siblings ...)
  2022-11-18  8:53 ` [PATCH 10/11] test/member: " David Marchand
@ 2022-11-18  8:53 ` David Marchand
  2022-11-21  1:51   ` Gao, DaxueX
       [not found] ` <20221119001318.GA16784@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net>
  2022-11-21 10:23 ` David Marchand
  12 siblings, 1 reply; 17+ messages in thread
From: David Marchand @ 2022-11-18  8:53 UTC (permalink / raw)
  To: dev; +Cc: stable, Erik Gabriel Carrillo, Pavan Nikhilesh

This variable is not used.

Fixes: d1f3385d0076 ("test: add event timer adapter auto-test")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 app/test/test_event_timer_adapter.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/app/test/test_event_timer_adapter.c b/app/test/test_event_timer_adapter.c
index 654c412836..1a440dfd10 100644
--- a/app/test/test_event_timer_adapter.c
+++ b/app/test/test_event_timer_adapter.c
@@ -911,7 +911,6 @@ _cancel_thread(void *args)
 {
 	RTE_SET_USED(args);
 	struct rte_event_timer *ev_tim = NULL;
-	uint64_t cancel_count = 0;
 	uint16_t ret;
 
 	while (!arm_done || rte_ring_count(timer_producer_ring) > 0) {
@@ -921,7 +920,6 @@ _cancel_thread(void *args)
 		ret = rte_event_timer_cancel_burst(timdev, &ev_tim, 1);
 		TEST_ASSERT_EQUAL(ret, 1, "Failed to cancel timer");
 		rte_mempool_put(eventdev_test_mempool, (void *)ev_tim);
-		cancel_count++;
 	}
 
 	return TEST_SUCCESS;
-- 
2.38.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 02/11] vhost: fix build with clang 15
  2022-11-18  8:53 ` [PATCH 02/11] vhost: " David Marchand
@ 2022-11-18 10:23   ` Maxime Coquelin
  0 siblings, 0 replies; 17+ messages in thread
From: Maxime Coquelin @ 2022-11-18 10:23 UTC (permalink / raw)
  To: David Marchand, dev; +Cc: stable, Chenbo Xia, Jiayu Hu, Cheng Jiang



On 11/18/22 09:53, David Marchand wrote:
> This variable is not used.
> 
> Fixes: abeb86525577 ("vhost: remove copy threshold for async path")
> Cc: stable@dpdk.org
> 
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
>   lib/vhost/virtio_net.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c
> index 4358899718..9abf752f30 100644
> --- a/lib/vhost/virtio_net.c
> +++ b/lib/vhost/virtio_net.c
> @@ -1877,7 +1877,6 @@ virtio_dev_rx_async_submit_packed(struct virtio_net *dev, struct vhost_virtqueue
>   	struct rte_mbuf **pkts, uint32_t count, int16_t dma_id, uint16_t vchan_id)
>   {
>   	uint32_t pkt_idx = 0;
> -	uint32_t remained = count;
>   	uint16_t n_xfer;
>   	uint16_t num_buffers;
>   	uint16_t num_descs;
> @@ -1903,7 +1902,6 @@ virtio_dev_rx_async_submit_packed(struct virtio_net *dev, struct vhost_virtqueue
>   		pkts_info[slot_idx].mbuf = pkts[pkt_idx];
>   
>   		pkt_idx++;
> -		remained--;
>   		vq_inc_last_avail_packed(vq, num_descs);
>   	} while (pkt_idx < count);
>   

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime


^ permalink raw reply	[flat|nested] 17+ messages in thread

* RE: [PATCH 01/11] service: fix build with clang 15
  2022-11-18  8:53 ` [PATCH 01/11] service: fix build with " David Marchand
@ 2022-11-18 14:47   ` Van Haaren, Harry
  0 siblings, 0 replies; 17+ messages in thread
From: Van Haaren, Harry @ 2022-11-18 14:47 UTC (permalink / raw)
  To: David Marchand, dev; +Cc: stable, Jerin Jacob

> -----Original Message-----
> From: David Marchand <david.marchand@redhat.com>
> Sent: Friday, November 18, 2022 8:53 AM
> To: dev@dpdk.org
> Cc: stable@dpdk.org; Van Haaren, Harry <harry.van.haaren@intel.com>; Jerin Jacob
> <jerinj@marvell.com>
> Subject: [PATCH 01/11] service: fix build with clang 15
> 
> This variable is not used.
> 
> Bugzilla ID: 1130
> Fixes: 21698354c832 ("service: introduce service cores concept")
> Cc: stable@dpdk.org
> 
> Signed-off-by: David Marchand <david.marchand@redhat.com>

Acked-by: Harry van Haaren <harry.van.haaren@intel.com>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* RE: [PATCH 11/11] test/event: fix build with clang 15
  2022-11-18  8:53 ` [PATCH 11/11] test/event: " David Marchand
@ 2022-11-21  1:51   ` Gao, DaxueX
  0 siblings, 0 replies; 17+ messages in thread
From: Gao, DaxueX @ 2022-11-21  1:51 UTC (permalink / raw)
  To: David Marchand, dev; +Cc: stable, Carrillo, Erik G, Pavan Nikhilesh

> -----Original Message-----
> From: David Marchand <david.marchand@redhat.com>
> Sent: 2022年11月18日 16:53
> To: dev@dpdk.org
> Cc: stable@dpdk.org; Carrillo, Erik G <erik.g.carrillo@intel.com>; Pavan
> Nikhilesh <pbhagavatula@caviumnetworks.com>
> Subject: [PATCH 11/11] test/event: fix build with clang 15
> 
> This variable is not used.
> 
> Fixes: d1f3385d0076 ("test: add event timer adapter auto-test")
> Cc: stable@dpdk.org
> 
> Signed-off-by: David Marchand <david.marchand@redhat.com>

Tested-by: Daxue Gao <daxuex.gao@intel.com>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 00/11] Fixes for clang 15
       [not found] ` <20221119001318.GA16784@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net>
@ 2022-11-21  8:12   ` David Marchand
  0 siblings, 0 replies; 17+ messages in thread
From: David Marchand @ 2022-11-21  8:12 UTC (permalink / raw)
  To: dev; +Cc: Tyler Retzlaff

On Sat, Nov 19, 2022 at 1:13 AM Tyler Retzlaff
<roretzla@linux.microsoft.com> wrote:
>
> On Fri, Nov 18, 2022 at 09:53:02AM +0100, David Marchand wrote:
> > Fedora 37 has just been released with clang 15.
> > The latter seems more picky wrt unused variable.
> >
> > Fixes have been tested in GHA with a simple patch I used in my own repo:
> > https://github.com/david-marchand/dpdk/commit/82cd57ae5490
> > https://github.com/david-marchand/dpdk/actions/runs/3495454457
> >
> > --
>
> Series-Acked-By: Tyler Retzlaff <roretzla@linux.microsoft.com>

Thanks for the ack.
Re-adding dev@.


-- 
David Marchand


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 00/11] Fixes for clang 15
  2022-11-18  8:53 [PATCH 00/11] Fixes for clang 15 David Marchand
                   ` (11 preceding siblings ...)
       [not found] ` <20221119001318.GA16784@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net>
@ 2022-11-21 10:23 ` David Marchand
  12 siblings, 0 replies; 17+ messages in thread
From: David Marchand @ 2022-11-21 10:23 UTC (permalink / raw)
  To: dev
  Cc: Thomas Monjalon, Tyler Retzlaff, Van Haaren Harry,
	Maxime Coquelin, Gao, DaxueX

On Fri, Nov 18, 2022 at 9:55 AM David Marchand
<david.marchand@redhat.com> wrote:
>
> Fedora 37 has just been released with clang 15.
> The latter seems more picky wrt unused variable.
>
> Fixes have been tested in GHA with a simple patch I used in my own repo:
> https://github.com/david-marchand/dpdk/commit/82cd57ae5490
> https://github.com/david-marchand/dpdk/actions/runs/3495454457
>
> --
> David Marchand
>
> David Marchand (11):
>   service: fix build with clang 15
>   vhost: fix build with clang 15
>   bus/dpaa: fix build with clang 15
>   net/atlantic: fix build with clang 15
>   net/dpaa2: fix build with clang 15
>   net/ice: fix build with clang 15
>   app/testpmd: fix build with clang 15
>   app/testpmd: fix build with clang 15 in flow code
>   test/efd: fix build with clang 15
>   test/member: fix build with clang 15
>   test/event: fix build with clang 15
>
>  app/test-pmd/config.c               | 14 --------------
>  app/test-pmd/noisy_vnf.c            |  2 +-
>  app/test/test_efd_perf.c            |  1 -
>  app/test/test_event_timer_adapter.c |  2 --
>  app/test/test_member.c              |  1 -
>  app/test/test_member_perf.c         |  1 -
>  drivers/bus/dpaa/base/qbman/bman.h  |  4 +---
>  drivers/net/atlantic/atl_rxtx.c     |  5 ++---
>  drivers/net/dpaa2/dpaa2_rxtx.c      |  4 +---
>  drivers/net/ice/ice_ddp_package.c   |  3 ---
>  lib/eal/common/rte_service.c        |  2 --
>  lib/vhost/virtio_net.c              |  2 --
>  12 files changed, 5 insertions(+), 36 deletions(-)

Series applied for rc4, thanks.


-- 
David Marchand


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2022-11-21 10:24 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-18  8:53 [PATCH 00/11] Fixes for clang 15 David Marchand
2022-11-18  8:53 ` [PATCH 01/11] service: fix build with " David Marchand
2022-11-18 14:47   ` Van Haaren, Harry
2022-11-18  8:53 ` [PATCH 02/11] vhost: " David Marchand
2022-11-18 10:23   ` Maxime Coquelin
2022-11-18  8:53 ` [PATCH 03/11] bus/dpaa: " David Marchand
2022-11-18  8:53 ` [PATCH 04/11] net/atlantic: " David Marchand
2022-11-18  8:53 ` [PATCH 05/11] net/dpaa2: " David Marchand
2022-11-18  8:53 ` [PATCH 06/11] net/ice: " David Marchand
2022-11-18  8:53 ` [PATCH 07/11] app/testpmd: " David Marchand
2022-11-18  8:53 ` [PATCH 08/11] app/testpmd: fix build with clang 15 in flow code David Marchand
2022-11-18  8:53 ` [PATCH 09/11] test/efd: fix build with clang 15 David Marchand
2022-11-18  8:53 ` [PATCH 10/11] test/member: " David Marchand
2022-11-18  8:53 ` [PATCH 11/11] test/event: " David Marchand
2022-11-21  1:51   ` Gao, DaxueX
     [not found] ` <20221119001318.GA16784@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net>
2022-11-21  8:12   ` [PATCH 00/11] Fixes for " David Marchand
2022-11-21 10:23 ` David Marchand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).