patch 'examples/l2fwd-event: fix port statistics memset' has been queued to stable release 25.11.5

Kevin Traynor ktraynor at redhat.com
Thu Dec 3 13:58:50 CET 2026


Hi,

FYI, your patch has been queued to stable release 25.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/08/26. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/6bb6269fe77633477ab57b42902f46fa5033b06a

Thanks.

Kevin

---
>From 6bb6269fe77633477ab57b42902f46fa5033b06a Mon Sep 17 00:00:00 2001
From: Dragos Tarcatu <dragos.tarcatu at keysight.com>
Date: Wed, 29 Jul 2026 10:32:36 +0000
Subject: [PATCH] examples/l2fwd-event: fix port statistics memset

[ upstream commit 02a4f7a278164cc4de9ce8d4abd681efd7c1c071 ]

port_stats is declared as struct l2fwd_port_statistics[RTE_MAX_ETHPORTS],
but the memset passed sizeof(struct l2fwd_port_statistics) -- the size
of a single element -- leaving ports 1 through RTE_MAX_ETHPORTS-1 with
uninitialized stats. Use sizeof(rsrc->port_stats) to clear the whole
array regardless of RTE_MAX_ETHPORTS.

Surfaced as a -Wmemset-elt-size warning when building with
-Dmax_ethports=64 -Dexamples=all.

Fixes: 4ff457986f76 ("examples/l2fwd-event: add default poll mode routines")

Signed-off-by: Dragos Tarcatu <dragos.tarcatu at keysight.com>
---
 .mailmap                    | 1 +
 examples/l2fwd-event/main.c | 3 +--
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.mailmap b/.mailmap
index 93c70da6b6..ba64651fad 100644
--- a/.mailmap
+++ b/.mailmap
@@ -424,4 +424,5 @@ Doug Foster <doug.foster at arm.com>
 Douglas Flint <douglas.flint at broadcom.com>
 Dr. David Alan Gilbert <dgilbert at redhat.com>
+Dragos Tarcatu <dragos.tarcatu at keysight.com>
 Drocula Lambda <quzeyao at gmail.com>
 Dror Birkman <dror.birkman at lightcyber.com>
diff --git a/examples/l2fwd-event/main.c b/examples/l2fwd-event/main.c
index 7600b9e9cf..75f9aeaf66 100644
--- a/examples/l2fwd-event/main.c
+++ b/examples/l2fwd-event/main.c
@@ -698,6 +698,5 @@ main(int argc, char **argv)
 
 	/* initialize port stats */
-	memset(&rsrc->port_stats, 0,
-					sizeof(struct l2fwd_port_statistics));
+	memset(rsrc->port_stats, 0, sizeof(rsrc->port_stats));
 
 	/* All settings are done. Now enable eth devices */
-- 
2.56.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-12-03 12:52:39.473792120 +0000
+++ 0004-examples-l2fwd-event-fix-port-statistics-memset.patch	2026-12-03 12:52:39.013938561 +0000
@@ -1 +1 @@
-From 02a4f7a278164cc4de9ce8d4abd681efd7c1c071 Mon Sep 17 00:00:00 2001
+From 6bb6269fe77633477ab57b42902f46fa5033b06a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 02a4f7a278164cc4de9ce8d4abd681efd7c1c071 ]
+
@@ -16 +17,0 @@
-Cc: stable at dpdk.org
@@ -25 +26 @@
-index 9b7713b6df..52d19bde6b 100644
+index 93c70da6b6..ba64651fad 100644
@@ -28 +29 @@
-@@ -429,4 +429,5 @@ Doug Foster <doug.foster at arm.com>
+@@ -424,4 +424,5 @@ Doug Foster <doug.foster at arm.com>
@@ -35 +36 @@
-index 2d31d4c6ad..eff2bee503 100644
+index 7600b9e9cf..75f9aeaf66 100644
@@ -38 +39 @@
-@@ -697,6 +697,5 @@ main(int argc, char **argv)
+@@ -698,6 +698,5 @@ main(int argc, char **argv)



More information about the stable mailing list