patch 'app/testpmd: make quit flag volatile' has been queued to stable release 20.11.7

luca.boccassi at gmail.com luca.boccassi at gmail.com
Fri Nov 18 00:08:29 CET 2022


Hi,

FYI, your patch has been queued to stable release 20.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 11/19/22. 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/4716a35952589c702ba625af7fbba9c289ac0c68

Thanks.

Luca Boccassi

---
>From 4716a35952589c702ba625af7fbba9c289ac0c68 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen at networkplumber.org>
Date: Tue, 8 Nov 2022 10:07:43 -0800
Subject: [PATCH] app/testpmd: make quit flag volatile

[ upstream commit 4c243bd4a8762163a7a1ba321bc8b8ff924c6358 ]

Since f_quit is set in a signal handler it needs to be marked
volatile.  Otherwise, compiler is allowed to optimize the loop because
it can assume the value never changes. The flag can also be made local
to the file it is used in.

Fixes: d9a191a00e81 ("app/testpmd: fix quitting in container")

Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
Reviewed-by: Ruifeng Wang <ruifeng.wang at arm.com>
---
 app/test-pmd/testpmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index d0cd11fe4e..13d8c1c72a 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -216,7 +216,7 @@ uint16_t stats_period; /**< Period to show statistics (disabled by default) */
  * In container, it cannot terminate the process which running with 'stats-period'
  * option. Set flag to exit stats period loop after received SIGINT/SIGTERM.
  */
-uint8_t f_quit;
+static volatile uint8_t f_quit;
 uint8_t cl_quit; /* Quit testpmd from cmdline. */
 
 /*
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-11-17 23:07:55.748054017 +0000
+++ 0005-app-testpmd-make-quit-flag-volatile.patch	2022-11-17 23:07:55.436329106 +0000
@@ -1 +1 @@
-From 4c243bd4a8762163a7a1ba321bc8b8ff924c6358 Mon Sep 17 00:00:00 2001
+From 4716a35952589c702ba625af7fbba9c289ac0c68 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4c243bd4a8762163a7a1ba321bc8b8ff924c6358 ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
@@ -21 +22 @@
-index 7381dfd9e5..295856f1a8 100644
+index d0cd11fe4e..13d8c1c72a 100644
@@ -24 +25 @@
-@@ -231,7 +231,7 @@ unsigned int xstats_display_num; /**< Size of extended statistics to show */
+@@ -216,7 +216,7 @@ uint16_t stats_period; /**< Period to show statistics (disabled by default) */


More information about the stable mailing list