[dpdk-stable] patch 'net/failsafe: fix Tx sub device deactivating' has been queued to stable release 17.08.1

Yuanhan Liu yliu at fridaylinux.org
Tue Nov 21 14:15:55 CET 2017


Hi,

FYI, your patch has been queued to stable release 17.08.1

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/17. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From ea6118d474a03fa6bd66a502258b7d43020d6a7b Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan at mellanox.com>
Date: Wed, 16 Aug 2017 17:19:28 +0300
Subject: [PATCH] net/failsafe: fix Tx sub device deactivating

[ upstream commit d8d89966c9595e3db1c7312fe94f3c8235b4ccfe ]

The corrupted code couldn't recognize that all sub devices
were not ready for Tx traffic when failsafe PMD was trying
to switch device because of an unreachable condition using.

Hence, the current Tx sub device variable was not updated
correctly.

The fix removed the unreachable branch and added new one
in the right place respecting the original intent.

Fixes: ebea83f899d8 ("net/failsafe: add plug-in support")
Fixes: 598fb8aec6f6 ("net/failsafe: support device removal")

Signed-off-by: Matan Azrad <matan at mellanox.com>
Acked-by: Gaetan Rivet <gaetan.rivet at 6wind.com>
---
 drivers/net/failsafe/failsafe_private.h | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/net/failsafe/failsafe_private.h b/drivers/net/failsafe/failsafe_private.h
index 0361cf4..ef646db 100644
--- a/drivers/net/failsafe/failsafe_private.h
+++ b/drivers/net/failsafe/failsafe_private.h
@@ -334,7 +334,7 @@ fs_switch_dev(struct rte_eth_dev *dev,
 	} else if ((txd && txd->state < req_state) ||
 		   txd == NULL ||
 		   txd == banned) {
-		struct sub_device *sdev;
+		struct sub_device *sdev = NULL;
 		uint8_t i;
 
 		/* Using acceptable device */
@@ -346,9 +346,10 @@ fs_switch_dev(struct rte_eth_dev *dev,
 			PRIV(dev)->subs_tx = i;
 			break;
 		}
-	} else if (txd && txd->state < req_state) {
-		DEBUG("No device ready, deactivating tx_dev");
-		PRIV(dev)->subs_tx = PRIV(dev)->subs_tail;
+		if (i >= PRIV(dev)->subs_tail || sdev == NULL) {
+			DEBUG("No device ready, deactivating tx_dev");
+			PRIV(dev)->subs_tx = PRIV(dev)->subs_tail;
+		}
 	} else {
 		return;
 	}
-- 
2.7.4



More information about the stable mailing list