[dpdk-stable] patch 'net/ixgbe: fix link state timing on fiber ports' has been queued to stable release 19.11.3

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue May 19 15:05:37 CEST 2020


Hi,

FYI, your patch has been queued to stable release 19.11.3

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

Thanks.

Luca Boccassi

---
>From 53038c47603c0998c117d416894bf63b46b77f24 Mon Sep 17 00:00:00 2001
From: Phil Yang <phil.yang at arm.com>
Date: Fri, 8 May 2020 18:28:27 +0800
Subject: [PATCH] net/ixgbe: fix link state timing on fiber ports

[ upstream commit d70a869db27871db90f86e108fdbb9a22fc6d8c7 ]

In ixgbe_dev_link_update_share(), if the media type is fiber and the
link is down, a flag (IXGBE_FLAG_NEED_LINK_CONFIG) is set. A callback
to ixgbe_dev_setup_link_thread_handler() is scheduled which should
try to set up the link and clear the flag afterwards. This flag works
as a guard variable between threads.

To avoid potential race condition between threads, set the
IXGBE_FLAG_NEED_LINK_CONFIG flag only when there is no link thread
running.

Bugzilla ID: 388
Fixes: 819d0d1d57f1 ("net/ixgbe: fix blocking system events")

Signed-off-by: Phil Yang <phil.yang at arm.com>
Reviewed-by: Lijian Zhang <lijian.zhang at arm.com>
Acked-by: Xiaolong Ye <xiaolong.ye at intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index e0f59e307d..ce0c05fcc2 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -4277,9 +4277,13 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
 
 	if (link_up == 0) {
 		if (ixgbe_get_media_type(hw) == ixgbe_media_type_fiber) {
-			intr->flags |= IXGBE_FLAG_NEED_LINK_CONFIG;
 			ixgbe_dev_wait_setup_link_complete(dev, 0);
 			if (rte_atomic32_test_and_set(&ad->link_thread_running)) {
+				/* To avoid race condition between threads, set
+				 * the IXGBE_FLAG_NEED_LINK_CONFIG flag only
+				 * when there is no link thread running.
+				 */
+				intr->flags |= IXGBE_FLAG_NEED_LINK_CONFIG;
 				if (rte_ctrl_thread_create(&ad->link_thread_tid,
 					"ixgbe-link-handler",
 					NULL,
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:52.847816797 +0100
+++ 0202-net-ixgbe-fix-link-state-timing-on-fiber-ports.patch	2020-05-19 14:04:44.580654971 +0100
@@ -1,8 +1,10 @@
-From d70a869db27871db90f86e108fdbb9a22fc6d8c7 Mon Sep 17 00:00:00 2001
+From 53038c47603c0998c117d416894bf63b46b77f24 Mon Sep 17 00:00:00 2001
 From: Phil Yang <phil.yang at arm.com>
 Date: Fri, 8 May 2020 18:28:27 +0800
 Subject: [PATCH] net/ixgbe: fix link state timing on fiber ports
 
+[ upstream commit d70a869db27871db90f86e108fdbb9a22fc6d8c7 ]
+
 In ixgbe_dev_link_update_share(), if the media type is fiber and the
 link is down, a flag (IXGBE_FLAG_NEED_LINK_CONFIG) is set. A callback
 to ixgbe_dev_setup_link_thread_handler() is scheduled which should
@@ -15,7 +17,6 @@
 
 Bugzilla ID: 388
 Fixes: 819d0d1d57f1 ("net/ixgbe: fix blocking system events")
-Cc: stable at dpdk.org
 
 Signed-off-by: Phil Yang <phil.yang at arm.com>
 Reviewed-by: Lijian Zhang <lijian.zhang at arm.com>
@@ -25,10 +26,10 @@
  1 file changed, 5 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
-index cf5f1fe709..a4e5c539de 100644
+index e0f59e307d..ce0c05fcc2 100644
 --- a/drivers/net/ixgbe/ixgbe_ethdev.c
 +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
-@@ -4281,9 +4281,13 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
+@@ -4277,9 +4277,13 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
  
  	if (link_up == 0) {
  		if (ixgbe_get_media_type(hw) == ixgbe_media_type_fiber) {


More information about the stable mailing list