[dpdk-stable] patch 'net/failsafe: fix state synchro cleanup' has been queued to stable release 19.11.6

luca.boccassi at gmail.com luca.boccassi at gmail.com
Wed Oct 28 11:45:35 CET 2020


Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 10/30/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 382958f4fef1a0d857939a460f98200fc8b8a635 Mon Sep 17 00:00:00 2001
From: Gaetan Rivet <grive at u256.net>
Date: Mon, 12 Oct 2020 16:19:04 +0200
Subject: [PATCH] net/failsafe: fix state synchro cleanup

[ upstream commit 352074b3a4b1518f3c1ec70865c407f135d8fa4d ]

During a hotplug attempt, failsafe will try to bring a subdevice that
just appeared to its internal state. On error, the subdevice is marked
for removal and will be cleaned up.

However failsafe_dev_remove() only remove active devices. Devices that
failed during probe will be stuck in DEV_PARSED state repeatedly.

Consider all devices when doing a removal round, but limit burst control
and stats saving to active devices.

Fixes: 598fb8aec6f6 ("net/failsafe: support device removal")

Signed-off-by: Gaetan Rivet <grive at u256.net>
---
 drivers/net/failsafe/failsafe_ether.c | 23 ++++++++++++++++-------
 1 file changed, 16 insertions(+), 7 deletions(-)

diff --git a/drivers/net/failsafe/failsafe_ether.c b/drivers/net/failsafe/failsafe_ether.c
index 6c27645b96..98fbdefc50 100644
--- a/drivers/net/failsafe/failsafe_ether.c
+++ b/drivers/net/failsafe/failsafe_ether.c
@@ -383,14 +383,23 @@ failsafe_dev_remove(struct rte_eth_dev *dev)
 	struct sub_device *sdev;
 	uint8_t i;
 
-	FOREACH_SUBDEV_STATE(sdev, i, dev, DEV_ACTIVE)
-		if (sdev->remove && fs_rxtx_clean(sdev)) {
-			if (fs_lock(dev, 1) != 0)
-				return;
+	FOREACH_SUBDEV(sdev, i, dev) {
+		if (!sdev->remove)
+			continue;
+
+		/* Active devices must have finished their burst and
+		 * their stats must be saved.
+		 */
+		if (sdev->state >= DEV_ACTIVE &&
+		    fs_rxtx_clean(sdev) == 0)
+			continue;
+		if (fs_lock(dev, 1) != 0)
+			return;
+		if (sdev->state >= DEV_ACTIVE)
 			fs_dev_stats_save(sdev);
-			fs_dev_remove(sdev);
-			fs_unlock(dev, 1);
-		}
+		fs_dev_remove(sdev);
+		fs_unlock(dev, 1);
+	}
 }
 
 static int
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:17.181223024 +0000
+++ 0176-net-failsafe-fix-state-synchro-cleanup.patch	2020-10-28 10:35:11.784834145 +0000
@@ -1,8 +1,10 @@
-From 352074b3a4b1518f3c1ec70865c407f135d8fa4d Mon Sep 17 00:00:00 2001
+From 382958f4fef1a0d857939a460f98200fc8b8a635 Mon Sep 17 00:00:00 2001
 From: Gaetan Rivet <grive at u256.net>
 Date: Mon, 12 Oct 2020 16:19:04 +0200
 Subject: [PATCH] net/failsafe: fix state synchro cleanup
 
+[ upstream commit 352074b3a4b1518f3c1ec70865c407f135d8fa4d ]
+
 During a hotplug attempt, failsafe will try to bring a subdevice that
 just appeared to its internal state. On error, the subdevice is marked
 for removal and will be cleaned up.
@@ -14,7 +16,6 @@
 and stats saving to active devices.
 
 Fixes: 598fb8aec6f6 ("net/failsafe: support device removal")
-Cc: stable at dpdk.org
 
 Signed-off-by: Gaetan Rivet <grive at u256.net>
 ---
@@ -22,7 +23,7 @@
  1 file changed, 16 insertions(+), 7 deletions(-)
 
 diff --git a/drivers/net/failsafe/failsafe_ether.c b/drivers/net/failsafe/failsafe_ether.c
-index 7c68bbdec0..f18935a7e2 100644
+index 6c27645b96..98fbdefc50 100644
 --- a/drivers/net/failsafe/failsafe_ether.c
 +++ b/drivers/net/failsafe/failsafe_ether.c
 @@ -383,14 +383,23 @@ failsafe_dev_remove(struct rte_eth_dev *dev)


More information about the stable mailing list