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

Kevin Traynor ktraynor at redhat.com
Wed Nov 18 17:34:58 CET 2020


Hi,

FYI, your patch has been queued to LTS release 18.11.11

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/24/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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/c577654d95801e9bbe910952e18ba49a9711101c

Thanks.

Kevin.

---
>From c577654d95801e9bbe910952e18ba49a9711101c 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 3e1f65f09a..9c8bf01224 100644
--- a/drivers/net/failsafe/failsafe_ether.c
+++ b/drivers/net/failsafe/failsafe_ether.c
@@ -373,12 +373,21 @@ failsafe_dev_remove(struct rte_eth_dev *dev)
 	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);
+	}
 }
 
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.213465289 +0000
+++ 0012-net-failsafe-fix-state-synchro-cleanup.patch	2020-11-18 16:33:37.914215052 +0000
@@ -1 +1 @@
-From 352074b3a4b1518f3c1ec70865c407f135d8fa4d Mon Sep 17 00:00:00 2001
+From c577654d95801e9bbe910952e18ba49a9711101c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 352074b3a4b1518f3c1ec70865c407f135d8fa4d ]
+
@@ -17 +18,0 @@
-Cc: stable at dpdk.org
@@ -25 +26 @@
-index 7c68bbdec0..f18935a7e2 100644
+index 3e1f65f09a..9c8bf01224 100644
@@ -28 +29 @@
-@@ -384,12 +384,21 @@ failsafe_dev_remove(struct rte_eth_dev *dev)
+@@ -373,12 +373,21 @@ failsafe_dev_remove(struct rte_eth_dev *dev)



More information about the stable mailing list