patch 'app/testpmd: fix build on signed comparison' has been queued to stable release 23.11.2
Xueming Li
xuemingl at nvidia.com
Mon Aug 12 14:50:13 CEST 2024
Hi,
FYI, your patch has been queued to stable release 23.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 08/14/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=ca12727f09f74f8524e346d3e9c9c472e6b4dd10
Thanks.
Xueming Li <xuemingl at nvidia.com>
---
>From ca12727f09f74f8524e346d3e9c9c472e6b4dd10 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
Cc: Xueming Li <xuemingl at nvidia.com>
[ 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 a09aa3bb85..40e4e83fb8 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -4980,7 +4980,7 @@ icmp_echo_config_setup(void)
lcoreid_t lc_id;
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);
else
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-08-12 20:44:06.811800757 +0800
+++ 0136-app-testpmd-fix-build-on-signed-comparison.patch 2024-08-12 20:44:02.545069383 +0800
@@ -1 +1 @@
-From 1f47f469aac68bc88be24e530b4267d03537de12 Mon Sep 17 00:00:00 2001
+From ca12727f09f74f8524e346d3e9c9c472e6b4dd10 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 1f47f469aac68bc88be24e530b4267d03537de12 ]
@@ -24 +26,0 @@
-Cc: stable at dpdk.org
@@ -34 +36 @@
-index 66c3a68c1d..6f0beafa27 100644
+index a09aa3bb85..40e4e83fb8 100644
@@ -37 +39 @@
-@@ -5156,7 +5156,7 @@ icmp_echo_config_setup(void)
+@@ -4980,7 +4980,7 @@ icmp_echo_config_setup(void)
More information about the stable
mailing list