[RFC v2 02/13] app/graph: zero-initialize FIB config structs
Maxime Leroy
maxime at leroys.fr
Tue Nov 24 19:02:38 CET 2026
The FIB and FIB6 configurations are filled field by field, which
leaves any field added to struct rte_fib_conf or struct rte_fib6_conf
uninitialized. Zero-initialize them.
Signed-off-by: Maxime Leroy <maxime at leroys.fr>
---
app/graph/l3fwd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/graph/l3fwd.c b/app/graph/l3fwd.c
index fe25e43da8..f077cfea7b 100644
--- a/app/graph/l3fwd.c
+++ b/app/graph/l3fwd.c
@@ -24,7 +24,7 @@
static int
setup_fib(int socket)
{
- struct rte_fib_conf conf;
+ struct rte_fib_conf conf = { 0 };
#define FIB_MAX_ROUTES (UINT16_MAX)
#define FIB_NUM_TBL8 (UINT16_MAX / 2)
@@ -41,7 +41,7 @@ setup_fib(int socket)
static int
setup_fib6(int socket)
{
- struct rte_fib6_conf conf;
+ struct rte_fib6_conf conf = { 0 };
#define FIB6_MAX_ROUTES (UINT16_MAX)
#define FIB6_NUM_TBL8 (UINT16_MAX / 2)
--
2.43.0
More information about the dev
mailing list