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

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue Oct 27 12:48:19 CET 2026


Hi,

FYI, your patch has been queued to stable release 24.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 10/29/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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/943b236c09cc7d1fbb370ba897b05f5fff6bf418

Thanks.

Luca Boccassi

---
>From 943b236c09cc7d1fbb370ba897b05f5fff6bf418 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 79116dd8de2..25f3b9a88fc 100644
--- a/.mailmap
+++ b/.mailmap
@@ -407,6 +407,7 @@ Doug Dziggel <douglas.a.dziggel at intel.com>
 Douglas Flint <douglas.flint at broadcom.com>
 Doug Foster <doug.foster at arm.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>
 Dukai Yuan <dukaix.yuan at intel.com>
diff --git a/examples/l2fwd-event/main.c b/examples/l2fwd-event/main.c
index 7600b9e9cfc..75f9aeaf66d 100644
--- a/examples/l2fwd-event/main.c
+++ b/examples/l2fwd-event/main.c
@@ -697,8 +697,7 @@ main(int argc, char **argv)
 		l2fwd_poll_resource_setup(rsrc);
 
 	/* 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 */
 	RTE_ETH_FOREACH_DEV(port_id) {
-- 
2.47.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-10-27 11:43:53.975152650 +0000
+++ 0005-examples-l2fwd-event-fix-port-statistics-memset.patch	2026-10-27 11:43:53.494058830 +0000
@@ -1 +1 @@
-From 02a4f7a278164cc4de9ce8d4abd681efd7c1c071 Mon Sep 17 00:00:00 2001
+From 943b236c09cc7d1fbb370ba897b05f5fff6bf418 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 79116dd8de2..25f3b9a88fc 100644
@@ -28,2 +29 @@
-@@ -428,6 +428,7 @@ Doug Dziggel <douglas.a.dziggel at intel.com>
- Doug Foster <doug.foster at arm.com>
+@@ -407,6 +407,7 @@ Doug Dziggel <douglas.a.dziggel at intel.com>
@@ -30,0 +31 @@
+ Doug Foster <doug.foster at arm.com>
@@ -37 +38 @@
-index 2d31d4c6ad..eff2bee503 100644
+index 7600b9e9cfc..75f9aeaf66d 100644
@@ -40 +41 @@
-@@ -696,8 +696,7 @@ main(int argc, char **argv)
+@@ -697,8 +697,7 @@ main(int argc, char **argv)


More information about the stable mailing list