app/test-eventdev: fix issues with clang 21.1.4
PATCH 1/3 app/test-eventdev: fix issues with clang 21.1.4
From: Jerin Jacob <[email protected]>
Fix the following error seen with clang 21.1.4
app/test-eventdev/test_perf_common.c:1340:30: error: variable 'event' is uninitialized when passed as a const pointer argument here [-Werror,-Wuninitialized-const-pointer]
--- app/test-eventdev/test_perf_common.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
app/test-eventdev/test_perf_common.c +4 -3
@@ -1335,13 +1335,14 @@ perf_event_dma_adapter_setup(struct test_perf *t, struct prod_data *p)return -ENOTSUP ; } -if (cap &RTE_EVENT_DMA_ADAPTER_CAP_INTERNAL_PORT_VCHAN_EV_BIND ) +if (cap &RTE_EVENT_DMA_ADAPTER_CAP_INTERNAL_PORT_VCHAN_EV_BIND ) { + event.queue_id = p->queue_id; ret =rte_event_dma_adapter_vchan_add (TEST_PERF_DA_ID , p->da.dma_dev_id, p->da.vchan_id, &event); -else + }else { ret =rte_event_dma_adapter_vchan_add (TEST_PERF_DA_ID , p->da.dma_dev_id, p->da.vchan_id,NULL ); - + }return ret; }
Signature · 1 line
2.51.2
PATCH 2/3 net/iavf: fix issues with clang 21.1.4
From: Jerin Jacob <[email protected]>
Fix the following error seen with clang 21.1.4
drivers/net/intel/iavf/iavf_vchnl.c:123:38: error: variable 'notify_byte' is uninitialized when passed as a const pointer argument here [-Werror,-Wuninitialized-const-pointer]
--- drivers/net/intel/iavf/iavf_vchnl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/intel/iavf/iavf_vchnl.c +1 -1
@@ -102,7 +102,7 @@ iavf_dev_event_post(struct rte_eth_dev *dev, void *param, size_t param_alloc_size) {struct iavf_event_handler *handler = &event_handler; -char notify_byte; +char notify_byte =0 ;struct iavf_event_element *elem =rte_malloc (NULL ,sizeof (*elem) + param_alloc_size,0 );if (!elem)return ;
Signature · 1 line
2.51.2
Re: [dpdk-dev] [PATCH v1 2/3] net/iavf: fix issues with clang 21.1.4
Quoted 29 lines · On 10/28/2025 5:23 PM, [email protected] wrote:
From: Jerin Jacob <[email protected]>
Fix the following error seen with clang 21.1.4
drivers/net/intel/iavf/iavf_vchnl.c:123:38: error: variable 'notify_byte' is uninitialized when passed as a const pointer argument here [-Werror,-Wuninitialized-const-pointer]Fixes cb5c1b91f76f ("net/iavf: add thread for event callbacks")Signed-off-by Jerin Jacob <[email protected]>--- drivers/net/intel/iavf/iavf_vchnl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/intel/iavf/iavf_vchnl.c +1
-1@@ -102,7 +102,7 @@ iavf_dev_event_post(struct rte_eth_dev *dev, void *param, size_t param_alloc_size) {struct iavf_event_handler *handler = &event_handler; -char notify_byte; +char notify_byte =0 ;struct iavf_event_element *elem =rte_malloc (NULL ,sizeof (*elem) + param_alloc_size,0 );if (!elem)return ;
Signature · 2 lines
Regards, Vladimir
Re: [dpdk-dev] [PATCH v1 2/3] net/iavf: fix issues with clang 21.1.4
In reply to [email protected]Quoted 5 lines · On Tue, 28 Oct 2025 at 18:24, <[email protected]> wrote:
From: Jerin Jacob <[email protected]>
Fix the following error seen with clang 21.1.4
Quoted 8 lines
drivers/net/intel/iavf/iavf_vchnl.c:123:38: error: variable 'notify_byte' is uninitialized when passed as a const pointer argument here [-Werror,-Wuninitialized-const-pointer]Fixes cb5c1b91f76f ("net/iavf: add thread for event callbacks")Signed-off-by Jerin Jacob <[email protected]>
Tested on fedora 43.
Signature · 1 line
David Marchand
PATCH 3/3 app/test: fix issues with clang 21.1.4
In reply to [email protected]From: Jerin Jacob <[email protected]>
Fix the following errors seen with clang 21.1.4
app/test/test_event_dma_adapter.c:532:32: error: variable 'event' is uninitialized when passed as a const pointer argument here [-Werror,-Wuninitialized-const-pointer]
app/test/test_trace.c:201:29: error: variable 'tmp' is uninitialized when passed as a const pointer argument here [-Werror,-Wuninitialized-const-pointer]
--- app/test/test_event_dma_adapter.c | 2 ++ app/test/test_trace.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-)
app/test/test_event_dma_adapter.c +2 -0
@@ -144,6 +144,7 @@ test_dma_adapter_params(void)TEST_ASSERT_SUCCESS (err,"Failed to get adapter capabilities\n" );if (cap &RTE_EVENT_DMA_ADAPTER_CAP_INTERNAL_PORT_VCHAN_EV_BIND ) { + event.queue_id =0 ; err =rte_event_dma_adapter_vchan_add (TEST_ADAPTER_ID ,TEST_DMA_DEV_ID ,TEST_DMA_VCHAN_ID , &event); }else
@@ -528,6 +529,7 @@ test_dma_adapter_vchan_add_del(void)TEST_ASSERT_SUCCESS (ret,"Failed to get adapter capabilities\n" );if (cap &RTE_EVENT_DMA_ADAPTER_CAP_INTERNAL_PORT_VCHAN_EV_BIND ) { + event.queue_id =0 ; ret =rte_event_dma_adapter_vchan_add (TEST_ADAPTER_ID ,TEST_DMA_DEV_ID ,TEST_DMA_VCHAN_ID , &event); }else
app/test/test_trace.c +1 -1
@@ -179,7 +179,7 @@ static inttest_generic_trace_points (void) {uint8_t arr[RTE_TRACE_BLOB_LEN_MAX ]; -int tmp; +int tmp =0 ;int i;for (i =0 ; i <RTE_TRACE_BLOB_LEN_MAX ; i++)
Signature · 1 line
2.51.2
RE: [dpdk-dev] [PATCH v1 3/3] app/test: fix issues with clang 21.1.4
Thanks
Quoted 74 lines
-----Original Message-----
From: [email protected] <[email protected]>
Sent: Tuesday, October 28, 2025 10:53 PM
To: Amit Prakash Shukla <[email protected]>; Jerin Jacob <[email protected]>; Sunil Kumar Kori <[email protected]>; Ankur Dwivedi <[email protected]>; Morten Brørup <[email protected]>; Ferruh Yigit <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: [dpdk-dev] [PATCH v1 3/3] app/test: fix issues with clang 21.1.4From: Jerin Jacob <[email protected]>
Fix the following errors seen with clang 21.1.4
app/test/test_event_dma_adapter.c:532:32: error: variable 'event' is uninitialized when passed as a const pointer argument here [-Werror,- Wuninitialized-const-pointer]
app/test/test_trace.c:201:29: error: variable 'tmp' is uninitialized when passed as a const pointer argument here [-Werror,-Wuninitialized-const-pointer]Fixes 4925e15a1614 ("trace: add trace point emit for blob")Fixes a276e7c8fbb3 ("test/event: add DMA adapter auto-test")Signed-off-by Jerin Jacob <[email protected]>--- app/test/test_event_dma_adapter.c | 2 ++ app/test/test_trace.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-)app/test/test_event_dma_adapter.c +1
-0@@ -144,6 +144,7 @@ test_dma_adapter_params(void)TEST_ASSERT_SUCCESS (err,"Failed to get adapter capabilities\n" );if (cap &RTE_EVENT_DMA_ADAPTER_CAP_INTERNAL_PORT_VCHAN_EV_BIND ) { + event.queue_id =0 ; err = rte_event_dma_adapter_vchan_add(TEST_ADAPTER_ID, TEST_DMA_DEV_ID,
TEST_DMA_VCHAN_ID, &event);app/test/test_event_dma_adapter.c +1
-0}else @@ -528,6 +529,7 @@ test_dma_adapter_vchan_add_del(void)TEST_ASSERT_SUCCESS (ret,"Failed to get adapter capabilities\n" );if (cap &RTE_EVENT_DMA_ADAPTER_CAP_INTERNAL_PORT_VCHAN_EV_BIND ) { + event.queue_id =0 ; ret = rte_event_dma_adapter_vchan_add(TEST_ADAPTER_ID, TEST_DMA_DEV_ID,
TEST_DMA_VCHAN_ID, &event);app/test/test_event_dma_adapter.c +0
-0}else app/test/test_trace.c index renamed from app/test/test_trace.c +0
-0
8ea1443044..52b5ba5cbb100644app/test/test_trace.c +1
-2@@ -179,7 +179,7 @@ static inttest_generic_trace_points (void) {uint8_t arr[RTE_TRACE_BLOB_LEN_MAX ]; -int tmp; +int tmp =0 ;int i;for (i =0 ; i <RTE_TRACE_BLOB_LEN_MAX ; i++) --2.51.2
Re: [dpdk-dev] [PATCH v1 3/3] app/test: fix issues with clang 21.1.4
In reply to [email protected]Quoted 9 lines · On Tue, 28 Oct 2025 at 18:25, <[email protected]> wrote:
From: Jerin Jacob <[email protected]>
Fix the following errors seen with clang 21.1.4
app/test/test_event_dma_adapter.c:532:32: error: variable 'event' is uninitialized when passed as a const pointer argument here [-Werror,-Wuninitialized-const-pointer]
Quoted 5 lines
app/test/test_trace.c:201:29: error: variable 'tmp' is uninitialized when passed as a const pointer argument here [-Werror,-Wuninitialized-const-pointer]Fixes 4925e15a1614 ("trace: add trace point emit for blob")
I don't think this Fixes: tag is the right one.
Instead, I would point at 9247e71dfb55 ("test/trace: add functional test cases").
Quoted 22 lines
Fixes a276e7c8fbb3 ("test/event: add DMA adapter auto-test")Signed-off-by Jerin Jacob <[email protected]>--- app/test/test_event_dma_adapter.c | 2 ++ app/test/test_trace.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-)app/test/test_event_dma_adapter.c +1
-0@@ -144,6 +144,7 @@ test_dma_adapter_params(void)TEST_ASSERT_SUCCESS (err,"Failed to get adapter capabilities\n" );if (cap &RTE_EVENT_DMA_ADAPTER_CAP_INTERNAL_PORT_VCHAN_EV_BIND ) { + event.queue_id =0 ; err =rte_event_dma_adapter_vchan_add (TEST_ADAPTER_ID ,TEST_DMA_DEV_ID ,TEST_DMA_VCHAN_ID , &event); }else
app/test/test_event_dma_adapter.c test_dma_adapter_vchan_add_del(void) · line 535
Quoted 7 lines
app/test/test_event_dma_adapter.c +1
-0@@ -528,6 +529,7 @@ test_dma_adapter_vchan_add_del(void)TEST_ASSERT_SUCCESS (ret,"Failed to get adapter capabilities\n" );if (cap &RTE_EVENT_DMA_ADAPTER_CAP_INTERNAL_PORT_VCHAN_EV_BIND ) { + event.queue_id =0 ; ret =rte_event_dma_adapter_vchan_add (TEST_ADAPTER_ID ,TEST_DMA_DEV_ID ,TEST_DMA_VCHAN_ID , &event); }else
Same comment than for the eventdev test app, I would move those event variable declaration in the block where only needed.
Otherwise, this lgtm and was tested on Fedora 43.
Signature · 1 line
David Marchand
Re: [dpdk-dev] [PATCH v1 3/3] app/test: fix issues with clang 21.1.4
Quoted 46 lines · David Marchand
Quoted 9 lines · On Tue, 28 Oct 2025 at 18:25, <[email protected]> wrote:
From: Jerin Jacob <[email protected]>
Fix the following errors seen with clang 21.1.4
app/test/test_event_dma_adapter.c:532:32: error: variable 'event' is uninitialized when passed as a const pointer argument here [-Werror,-Wuninitialized-const-pointer]Quoted 5 lines
app/test/test_trace.c:201:29: error: variable 'tmp' is uninitialized when passed as a const pointer argument here [-Werror,-Wuninitialized-const-pointer]Fixes 4925e15a1614 ("trace: add trace point emit for blob")I don't think this Fixes: tag is the right one.
Instead, I would point at9247e71dfb55("test/trace: add functional test cases").Quoted 24 lines
Fixes a276e7c8fbb3 ("test/event: add DMA adapter auto-test")Signed-off-by Jerin Jacob <[email protected]>--- app/test/test_event_dma_adapter.c | 2 ++ app/test/test_trace.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-)app/test/test_event_dma_adapter.c +1
-0@@ -144,6 +144,7 @@ test_dma_adapter_params(void)TEST_ASSERT_SUCCESS (err,"Failed to get adapter capabilities\n" );if (cap &RTE_EVENT_DMA_ADAPTER_CAP_INTERNAL_PORT_VCHAN_EV_BIND ) { + event.queue_id =0 ; err =rte_event_dma_adapter_vchan_add (TEST_ADAPTER_ID ,TEST_DMA_DEV_ID ,TEST_DMA_VCHAN_ID , &event); }else @@ -528,6 +529,7 @@ test_dma_adapter_vchan_add_del(void)TEST_ASSERT_SUCCESS (ret,"Failed to get adapter capabilities\n" );
Quoted 8 lines
app/test/test_event_dma_adapter.c test_dma_adapter_vchan_add_del(void) · line 535
Quoted 5 lines
app/test/test_event_dma_adapter.c +1
-0if (cap &RTE_EVENT_DMA_ADAPTER_CAP_INTERNAL_PORT_VCHAN_EV_BIND ) { + event.queue_id =0 ; ret =rte_event_dma_adapter_vchan_add (TEST_ADAPTER_ID ,TEST_DMA_DEV_ID ,TEST_DMA_VCHAN_ID , &event); }else Same comment than for the eventdev test app, I would move those event variable declaration in the block where only needed.
I did those suggested changes and applied the series. Thanks.
Signature · 1 line
David Marchand
Quoted 10 lines
Fix the following error seen with clang 21.1.4
app/test-eventdev/test_perf_common.c:1340:30: error: variable 'event' is uninitialized when passed as a const pointer argument here [-Werror,-Wuninitialized-const-pointer]Fixes b25a66c49e8d ("app/eventdev: add DMA adapter performance test")Signed-off-by Jerin Jacob <[email protected]>
Quoted 28 lines
---
app/test-eventdev/test_perf_common.c| 7 ++++---1 file changed, 4 insertions(+), 3 deletions(-)app/test-eventdev/test_perf_common.c +4
-4@@ -1335,13 +1335,14 @@ perf_event_dma_adapter_setup(struct test_perf *t, struct prod_data *p)return -ENOTSUP ; } -if (cap &RTE_EVENT_DMA_ADAPTER_CAP_INTERNAL_PORT_VCHAN_EV_BIND ) +if (cap &RTE_EVENT_DMA_ADAPTER_CAP_INTERNAL_PORT_VCHAN_EV_BIND ) { + event.queue_id = p->queue_id; ret =rte_event_dma_adapter_vchan_add (TEST_PERF_DA_ID , p->da.dma_dev_id, p->da.vchan_id, &event); -else + }else { ret =rte_event_dma_adapter_vchan_add (TEST_PERF_DA_ID , p->da.dma_dev_id, p->da.vchan_id,NULL ); - + }return ret; } --2.51.2
Quoted 22 lines · On Tue, 28 Oct 2025 at 18:24, <[email protected]> wrote:
From: Jerin Jacob <[email protected]>
Fix the following error seen with clang 21.1.4
app/test-eventdev/test_perf_common.c:1340:30: error: variable 'event' is uninitialized when passed as a const pointer argument here [-Werror,-Wuninitialized-const-pointer]Fixes b25a66c49e8d ("app/eventdev: add DMA adapter performance test")Signed-off-by Jerin Jacob <[email protected]>--- app/test-eventdev/test_perf_common.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)app/test-eventdev/test_perf_common.c +0
-0
app/test-eventdev/test_perf_common.c perf_event_dma_adapter_setup(struct test_perf *t, struct prod_data *p) · line 1338
Quoted 5 lines
app/test-eventdev/test_perf_common.c +1
-1@@ -1335,13 +1335,14 @@ perf_event_dma_adapter_setup(struct test_perf *t, struct prod_data *p)return -ENOTSUP ; } -if (cap &RTE_EVENT_DMA_ADAPTER_CAP_INTERNAL_PORT_VCHAN_EV_BIND ) +if (cap &RTE_EVENT_DMA_ADAPTER_CAP_INTERNAL_PORT_VCHAN_EV_BIND ) {
struct rte_event event declaration can be moved in this block.
app/test-eventdev/test_perf_common.c perf_event_dma_adapter_setup(struct test_perf *t, struct prod_data *p) · line 1347
Quoted 11 lines
app/test-eventdev/test_perf_common.c +3
-2+ event.queue_id = p->queue_id; ret =rte_event_dma_adapter_vchan_add (TEST_PERF_DA_ID , p->da.dma_dev_id, p->da.vchan_id, &event); - else + }else { ret =rte_event_dma_adapter_vchan_add (TEST_PERF_DA_ID , p->da.dma_dev_id, p->da.vchan_id,NULL ); - + }return ret; }
Otherwise, this lgtm.
I tested with Fedora 43.
Signature · 1 line
David Marchand