patch 'examples/l3fwd: fix socket ID check' has been queued to stable release 24.11.2
Kevin Traynor
ktraynor at redhat.com
Thu Feb 13 10:59:24 CET 2025
Hi,
FYI, your patch has been queued to stable release 24.11.2
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/17/25. 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/240570228ec5cea1bbfa64a21de1bc8ded10e3b8
Thanks.
Kevin
---
>From 240570228ec5cea1bbfa64a21de1bc8ded10e3b8 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen at networkplumber.org>
Date: Wed, 5 Feb 2025 08:23:19 -0800
Subject: [PATCH] examples/l3fwd: fix socket ID check
[ upstream commit a7216f081767c7259dd3fba5eda0ca7b0bcb4595 ]
The expression:
if ((socketid = rte_lcore_to_socket_id(lcore) != 0) &&
gets evaluated as socketid = (rte_lcore_to_socket_id(lcore) != 0)
which is not what was intended. This is goes all the way back
to first release.
Link: https://pvs-studio.com/en/blog/posts/cpp/1183/
Fixes: af75078fece3 ("first public release")
Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
---
examples/l3fwd-power/main.c | 4 ++--
examples/l3fwd/main.c | 5 +++--
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
index ae8b55924e..7957ea6c95 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -1413,6 +1413,6 @@ check_lcore_params(void)
return -1;
}
- if ((socketid = rte_lcore_to_socket_id(lcore) != 0) &&
- (numa_on == 0)) {
+ socketid = rte_lcore_to_socket_id(lcore);
+ if (socketid != 0 && numa_on == 0) {
printf("warning: lcore %u is on socket %d with numa "
"off\n", lcore, socketid);
diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c
index 994b7dd8e5..ae3b4f6439 100644
--- a/examples/l3fwd/main.c
+++ b/examples/l3fwd/main.c
@@ -312,6 +312,7 @@ check_lcore_params(void)
return -1;
}
- if ((socketid = rte_lcore_to_socket_id(lcore) != 0) &&
- (numa_on == 0)) {
+
+ socketid = rte_lcore_to_socket_id(lcore);
+ if (socketid != 0 && numa_on == 0) {
printf("warning: lcore %u is on socket %d with numa off\n",
lcore, socketid);
--
2.48.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-02-12 17:29:46.862694090 +0000
+++ 0117-examples-l3fwd-fix-socket-ID-check.patch 2025-02-12 17:29:34.659947773 +0000
@@ -1 +1 @@
-From a7216f081767c7259dd3fba5eda0ca7b0bcb4595 Mon Sep 17 00:00:00 2001
+From 240570228ec5cea1bbfa64a21de1bc8ded10e3b8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a7216f081767c7259dd3fba5eda0ca7b0bcb4595 ]
+
@@ -16 +17,0 @@
-Cc: stable at dpdk.org
@@ -25 +26 @@
-index d279e664b3..e27b8531b5 100644
+index ae8b55924e..7957ea6c95 100644
More information about the stable
mailing list