patch 'app/testpmd: fix build on signed comparison' has been queued to stable release 21.11.8
Kevin Traynor
ktraynor at redhat.com
Fri Aug 23 18:19:13 CEST 2024
Hi,
FYI, your patch has been queued to stable release 21.11.8
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/28/24. 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/b3996257669c9d0e9e716452e92ada9477e3a56c
Thanks.
Kevin
---
>From b3996257669c9d0e9e716452e92ada9477e3a56c Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit at amd.com>
Date: Mon, 22 Jul 2024 03:52:29 -0700
Subject: [PATCH] app/testpmd: fix build on signed comparison
[ upstream commit 1f47f469aac68bc88be24e530b4267d03537de12 ]
Build error:
.../app/test-pmd/config.c: In function 'icmp_echo_config_setup':
.../app/test-pmd/config.c:5159:30:
error: comparison between signed and unsigned integer expressions
[-Werror=sign-compare]
if ((nb_txq * nb_fwd_ports) < nb_fwd_lcores)
^
All 'nb_txq', 'nb_fwd_ports' & 'nb_fwd_lcores' are unsigned variables,
but the warning is related to the integer promotion rules of C:
'nb_txq' -> uint16_t, promoted to 'int'
'nb_fwd_ports' -> uint16_t, promoted to 'int'
(nb_txq * nb_fwd_ports) -> result 'int'
nb_fwd_lcores -> 'uint32_t'
Ends up comparing 'int' vs 'uint32_t'.
Fixing by adding the casting back which was initially part of the patch.
Fixes: 2bf44dd14fa5 ("app/testpmd: fix lcore ID restriction")
Reported-by: Raslan Darawsheh <rasland at nvidia.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit at amd.com>
Tested-by: Ali Alnubani <alialnu at nvidia.com>
---
app/test-pmd/config.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 3afa65036c..e060a1de49 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -3519,5 +3519,5 @@ icmp_echo_config_setup(void)
uint16_t sm_id;
- if ((nb_txq * nb_fwd_ports) < nb_fwd_lcores)
+ if ((lcoreid_t)(nb_txq * nb_fwd_ports) < nb_fwd_lcores)
cur_fwd_config.nb_fwd_lcores = (lcoreid_t)
(nb_txq * nb_fwd_ports);
--
2.46.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-08-23 17:18:13.464627618 +0100
+++ 0125-app-testpmd-fix-build-on-signed-comparison.patch 2024-08-23 17:18:09.890430699 +0100
@@ -1 +1 @@
-From 1f47f469aac68bc88be24e530b4267d03537de12 Mon Sep 17 00:00:00 2001
+From b3996257669c9d0e9e716452e92ada9477e3a56c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1f47f469aac68bc88be24e530b4267d03537de12 ]
+
@@ -24 +25,0 @@
-Cc: stable at dpdk.org
@@ -34 +35 @@
-index 66c3a68c1d..6f0beafa27 100644
+index 3afa65036c..e060a1de49 100644
@@ -37 +38 @@
-@@ -5157,5 +5157,5 @@ icmp_echo_config_setup(void)
+@@ -3519,5 +3519,5 @@ icmp_echo_config_setup(void)
More information about the stable
mailing list