examples/ip_pipeline: fix build issue with GCC 13
PATCH 1/1 examples/ip_pipeline: fix build issue with GCC 13
From: Jerin Jacob <[email protected]>
Fix the following build issue by initializing req to NULL for the local variable.
In function 'thread_msg_handle', inlined from 'thread_main' at ../examples/ip_pipeline/thread.c:3130:6:../examples/ip_pipeline/thread.c:535:20: warning: 'req' may be used uninitialized [-Wmaybe-uninitialized]
535 | if (req == NULL)
| ^../examples/ip_pipeline/thread.c: In function 'thread_main':../examples/ip_pipeline/thread.c:433:32: note: 'req' was declared here
433 | struct thread_msg_req *req;
Bugzilla ID: 1220
--- examples/ip_pipeline/thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
examples/ip_pipeline/thread.c +1 -1
@@ -430,7 +430,7 @@ thread_pipeline_disable(uint32_t thread_id,static inline struct thread_msg_req *thread_msg_recv (struct rte_ring *msgq_req) { -struct thread_msg_req *req; +struct thread_msg_req *req =NULL ;int status =rte_ring_sc_dequeue (msgq_req, (void **) &req);
Signature · 1 line
2.40.1
PATCH 1/1 examples/ntb: fix build issue with GCC 13
From: Jerin Jacob <[email protected]>
Fix the following build issue by not allowing nb_ids to be zero. nb_ids can be zero based on rte_rawdev_xstats_get() API documentation but it is not valid for the case when second argument is NULL.
examples/ntb/ntb_fwd.c: In function 'ntb_stats_display':examples/ntb/ntb_fwd.c:945:23: error: 'rte_rawdev_xstats_get' accessing 8 bytes in a region of size 0 [-Werror=stringop-overflow=]
945 | if (nb_ids != rte_rawdev_xstats_get(dev_id, ids, values, nb_ids)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~examples/ntb/ntb_fwd.c:945:23: note: referencing argument 3 of type 'uint64_t[0]' {aka 'long unsigned int[]'} In file included from ../examples/ntb/ntb_fwd.c:17:lib/rawdev/rte_rawdev.h:504:1: note: in a call to function 'rte_rawdev_xstats_get'
504 | rte_rawdev_xstats_get(uint16_t dev_id,
--- examples/ntb/ntb_fwd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
examples/ntb/ntb_fwd.c +1 -1
@@ -923,7 +923,7 @@ ntb_stats_display(void)/* Get NTB dev stats and stats names */ nb_ids =rte_rawdev_xstats_names_get (dev_id,NULL ,0 ); -if (nb_ids <0 ) { +if (nb_ids <=0 ) {printf ("Error: Cannot get count of xstats\n" );return ; }
Signature · 1 line
2.40.1
Quoted 26 lines
-----Original Message-----
From: [email protected] <[email protected]>
Sent: Tuesday, May 2, 2023 4:49 PM
To: [email protected]
Cc: NBU-Contact-Thomas Monjalon (EXTERNAL) <[email protected]>; [email protected]; [email protected]; [email protected]; Jerin Jacob <[email protected]>; [email protected]
Subject: [dpdk-dev] [PATCH v1] examples/ip_pipeline: fix build issue with GCC 13From: Jerin Jacob <[email protected]>
Fix the following build issue by initializing req to NULL for the local variable.
In function '
thread_msg_handle', inlined from 'thread_main' at../examples/ip_pipeline/thread.c:3130:6:../examples/ip_pipeline/thread.c:535:20: warning: 'req' may be used uninitialized [-Wmaybe-uninitialized]
535 | if (req == NULL)
| ^../examples/ip_pipeline/thread.c: In function 'thread_main':../examples/ip_pipeline/thread.c:433:32: note: 'req' was declared here
433 | structthread_msg_req*req;
Quoted 6 lines
Bugzilla ID: 1220
Fixes a8bd581de397 ("examples/ip_pipeline: add thread runtime")Signed-off-by Jerin Jacob <[email protected]>---
Resolves the warning I see in Bugzilla 1220, thanks.
Now I see a failure in another example app:
"""examples/ntb/ntb_fwd.c:945:23: error: 'rte_rawdev_xstats_get' accessing 8 bytes in a region of size 0 [-Werror=stringop-overflow=] """
Will open a separate issue for that.
Quoted 43 lines
-----Original Message-----
From: Ali Alnubani
Sent: Wednesday, May 3, 2023 11:30 AM
To: '[email protected]' <[email protected]>; [email protected]
Cc: NBU-Contact-Thomas Monjalon (EXTERNAL) <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]
Subject: RE: [dpdk-dev] [PATCH v1] examples/ip_pipeline: fix build issue with GCC 13Quoted 26 lines
-----Original Message-----
From: [email protected] <[email protected]>
Sent: Tuesday, May 2, 2023 4:49 PM
To: [email protected]
Cc: NBU-Contact-Thomas Monjalon (EXTERNAL) <[email protected]>; [email protected]; [email protected]; [email protected]; Jerin Jacob <[email protected]>; [email protected]
Subject: [dpdk-dev] [PATCH v1] examples/ip_pipeline: fix build issue with GCC 13From: Jerin Jacob <[email protected]>
Fix the following build issue by initializing req to NULL for the local variable.
In function '
thread_msg_handle', inlined from 'thread_main' at../examples/ip_pipeline/thread.c:3130:6:../examples/ip_pipeline/thread.c:535:20: warning: 'req' may be used uninitialized [-Wmaybe-uninitialized]
535 | if (req == NULL)
| ^../examples/ip_pipeline/thread.c: In function 'thread_main':../examples/ip_pipeline/thread.c:433:32: note: 'req' was declared here
433 | structthread_msg_req*req;Quoted 6 lines
Bugzilla ID: 1220
Fixes a8bd581de397 ("examples/ip_pipeline: add thread runtime")Signed-off-by Jerin Jacob <[email protected]>---
Quoted 8 lines
Resolves the warning I see in Bugzilla 1220, thanks.
Now I see a failure in another example app:
"""examples/ntb/ntb_fwd.c:945:23: error: 'rte_rawdev_xstats_get' accessing 8 bytes in a region of size 0 [-Werror=stringop-overflow=]
"""
Will open a separate issue for that.
Nevermind, I see it's already addressed in this patch:
https://patches.dpdk.org/project/dpdk/patch/[email protected]/
Thanks!