[dpdk-stable] patch 'net/failsafe: fix Rx clean race' has been queued to stable release 17.08.1

Yuanhan Liu yliu at fridaylinux.org
Tue Nov 21 14:18:31 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 c4803dd1ad0aa2e1bea862f2f16659c03035cb75 Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan at mellanox.com>
Date: Sun, 22 Oct 2017 05:51:08 +0000
Subject: [PATCH] net/failsafe: fix Rx clean race

[ upstream commit 295f7ed2dd452aba090080f380c2981b366aa2da ]

When removing a device, the fail-safe checks that it is not within its
datapath before cleaning it.

When checking whether an Rx burst should be performed on a device, the
remove flag is not checked. Thus the port could still enter its datapath
and miss a removal round. Furthermore, there is a race between the
thread removing the device and the polling thread.

Check the remove flag before entering a sub-device Rx burst when in safe
mode. This check mitigates the aforementioned race condition.

Fixes: 72a57bfd9a0e ("net/failsafe: add fast burst functions")

Signed-off-by: Matan Azrad <matan at mellanox.com>
Acked-by: Gaetan Rivet <gaetan.rivet at 6wind.com>
---
 drivers/net/failsafe/failsafe_rxtx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/failsafe/failsafe_rxtx.c b/drivers/net/failsafe/failsafe_rxtx.c
index 7311421..70157c8 100644
--- a/drivers/net/failsafe/failsafe_rxtx.c
+++ b/drivers/net/failsafe/failsafe_rxtx.c
@@ -43,7 +43,8 @@ fs_rx_unsafe(struct sub_device *sdev)
 {
 	return (ETH(sdev) == NULL) ||
 		(ETH(sdev)->rx_pkt_burst == NULL) ||
-		(sdev->state != DEV_STARTED);
+		(sdev->state != DEV_STARTED) ||
+		(sdev->remove != 0);
 }
 
 static inline int
-- 
2.7.4



More information about the stable mailing list