patch 'ethdev: make telemetry parameter parsing thread-safe' has been queued to stable release 24.11.7

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Jun 11 15:20:43 CEST 2026


Hi,

FYI, your patch has been queued to stable release 24.11.7

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

Thanks.

Luca Boccassi

---
>From ca4fcfe8ddbc65de7ba4c4a03bac5a91f68ac8d8 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen at networkplumber.org>
Date: Fri, 5 Jun 2026 13:50:59 -0700
Subject: [PATCH] ethdev: make telemetry parameter parsing thread-safe

[ upstream commit d9b281c9c53767ab33efe86eb54cd1088e16f990 ]

The ethdev telemetry handlers run in a per-connection thread.
Two of the parameter parsers used strtok(), which keeps its state in a
process-global static shared across threads.
Use strtok_r() with a local save pointer.

Also pass an unsigned char to isdigit(),
which is undefined for characters with high-bit set.

Fixes: 9e7533aeb80a ("ethdev: add telemetry command for TM level capabilities")
Fixes: f38f62650f7b ("ethdev: add Rx queue telemetry query")

Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
Acked-by: Chengwen Feng <fengchengwen at huawei.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
---
 lib/ethdev/rte_ethdev_telemetry.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/lib/ethdev/rte_ethdev_telemetry.c b/lib/ethdev/rte_ethdev_telemetry.c
index 5e6c4172d3..84f3584e6e 100644
--- a/lib/ethdev/rte_ethdev_telemetry.c
+++ b/lib/ethdev/rte_ethdev_telemetry.c
@@ -31,7 +31,7 @@ eth_dev_parse_port_params(const char *params, uint16_t *port_id,
 	uint64_t pi;
 
 	if (params == NULL || strlen(params) == 0 ||
-		!isdigit(*params) || port_id == NULL)
+		!isdigit((unsigned char)*params) || port_id == NULL)
 		return -EINVAL;
 
 	pi = strtoul(params, end_param, 0);
@@ -477,6 +477,7 @@ ethdev_parse_queue_params(const char *params, bool is_rx,
 	const char *qid_param;
 	uint16_t nb_queues;
 	char *end_param;
+	char *saveptr = NULL;
 	uint64_t qid;
 	int ret;
 
@@ -489,8 +490,8 @@ ethdev_parse_queue_params(const char *params, bool is_rx,
 	if (nb_queues == 1 && *end_param == '\0')
 		qid = 0;
 	else {
-		qid_param = strtok(end_param, ",");
-		if (!qid_param || strlen(qid_param) == 0 || !isdigit(*qid_param))
+		qid_param = strtok_r(end_param, ",", &saveptr);
+		if (!qid_param || strlen(qid_param) == 0 || !isdigit((unsigned char)*qid_param))
 			return -EINVAL;
 
 		qid = strtoul(qid_param, &end_param, 0);
@@ -1221,10 +1222,11 @@ static int
 eth_dev_parse_tm_params(char *params, uint32_t *result)
 {
 	const char *splited_param;
+	char *saveptr = NULL;
 	uint64_t ret;
 
-	splited_param = strtok(params, ",");
-	if (!splited_param || strlen(splited_param) == 0 || !isdigit(*splited_param))
+	splited_param = strtok_r(params, ",", &saveptr);
+	if (!splited_param || strlen(splited_param) == 0 || !isdigit((unsigned char)*splited_param))
 		return -EINVAL;
 
 	ret = strtoul(splited_param, &params, 0);
-- 
2.47.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-06-11 14:20:05.026932490 +0100
+++ 0094-ethdev-make-telemetry-parameter-parsing-thread-safe.patch	2026-06-11 14:20:01.338748996 +0100
@@ -1 +1 @@
-From d9b281c9c53767ab33efe86eb54cd1088e16f990 Mon Sep 17 00:00:00 2001
+From ca4fcfe8ddbc65de7ba4c4a03bac5a91f68ac8d8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d9b281c9c53767ab33efe86eb54cd1088e16f990 ]
+
@@ -16 +17,0 @@
-Cc: stable at dpdk.org
@@ -26 +27 @@
-index a910864bc5..ca7f4681c9 100644
+index 5e6c4172d3..84f3584e6e 100644
@@ -29 +30 @@
-@@ -32,7 +32,7 @@ eth_dev_parse_port_params(const char *params, uint16_t *port_id,
+@@ -31,7 +31,7 @@ eth_dev_parse_port_params(const char *params, uint16_t *port_id,
@@ -38 +39 @@
-@@ -459,6 +459,7 @@ ethdev_parse_queue_params(const char *params, bool is_rx,
+@@ -477,6 +477,7 @@ ethdev_parse_queue_params(const char *params, bool is_rx,
@@ -46 +47 @@
-@@ -471,8 +472,8 @@ ethdev_parse_queue_params(const char *params, bool is_rx,
+@@ -489,8 +490,8 @@ ethdev_parse_queue_params(const char *params, bool is_rx,
@@ -57 +58 @@
-@@ -1207,10 +1208,11 @@ static int
+@@ -1221,10 +1222,11 @@ static int


More information about the stable mailing list