patch 'examples/ethtool: fix size of mempool name' has been queued to stable release 24.11.5
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Fri Feb 20 15:55:28 CET 2026
Hi,
FYI, your patch has been queued to stable release 24.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 02/22/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/9a55dc0759c0d33f77e8848c437d7975e4b2f424
Thanks.
Luca Boccassi
---
>From 9a55dc0759c0d33f77e8848c437d7975e4b2f424 Mon Sep 17 00:00:00 2001
From: Shani Peretz <shperetz at nvidia.com>
Date: Mon, 22 Dec 2025 10:38:58 +0200
Subject: [PATCH] examples/ethtool: fix size of mempool name
[ upstream commit b3a5c3281d8accc2d8dc4c0e878302a7b791792c ]
Use RTE_MEMPOOL_NAMESIZE for str_name buffer size instead of the
hardcoded value 16, which was insufficient as the format
string "pkt_pool%i" can produce up to 19 bytes (8 for "pkt_pool",
up to 10 for integer value, and 1 for null terminator).
This issue can be seen when compiling in debug mode (--buildtype=debug):
examples/ethtool/ethtool-app/main.c: In function 'setup_ports':
main.c:115:49: error: '%i' directive output may be truncated
writing between 1 and 10 bytes into a region of size 8
115 | snprintf(str_name, 16, "pkt_pool%i", idx_port);
| ^~
Fixes: bda68ab9d1e7 ("examples/ethtool: add user-space ethtool sample application")
Signed-off-by: Shani Peretz <shperetz at nvidia.com>
Acked-by: Stephen Hemminger <stephen at networkplumber.org>
---
examples/ethtool/ethtool-app/main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/examples/ethtool/ethtool-app/main.c b/examples/ethtool/ethtool-app/main.c
index 1f011a9321..d380f69cea 100644
--- a/examples/ethtool/ethtool-app/main.c
+++ b/examples/ethtool/ethtool-app/main.c
@@ -92,7 +92,7 @@ static void setup_ports(struct app_config *app_cfg, int cnt_ports)
int size_pktpool;
struct rte_eth_conf cfg_port;
struct rte_eth_dev_info dev_info;
- char str_name[16];
+ char str_name[RTE_MEMPOOL_NAMESIZE];
uint16_t nb_rxd = PORT_RX_QUEUE_SIZE;
uint16_t nb_txd = PORT_TX_QUEUE_SIZE;
int ret;
@@ -112,7 +112,7 @@ static void setup_ports(struct app_config *app_cfg, int cnt_ports)
size_pktpool = dev_info.rx_desc_lim.nb_max +
dev_info.tx_desc_lim.nb_max + PKTPOOL_EXTRA_SIZE;
- snprintf(str_name, 16, "pkt_pool%i", idx_port);
+ snprintf(str_name, sizeof(str_name), "pkt_pool%i", idx_port);
ptr_port->pkt_pool = rte_pktmbuf_pool_create(
str_name,
size_pktpool, PKTPOOL_CACHE,
--
2.47.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-02-20 14:55:44.346678715 +0000
+++ 0026-examples-ethtool-fix-size-of-mempool-name.patch 2026-02-20 14:55:43.196190939 +0000
@@ -1 +1 @@
-From b3a5c3281d8accc2d8dc4c0e878302a7b791792c Mon Sep 17 00:00:00 2001
+From 9a55dc0759c0d33f77e8848c437d7975e4b2f424 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b3a5c3281d8accc2d8dc4c0e878302a7b791792c ]
+
@@ -19 +20,0 @@
-Cc: stable at dpdk.org
More information about the stable
mailing list