[dpdk-stable] patch 'ethdev: fix port removal notification timing' has been queued to stable release 18.02.2

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue May 15 15:47:19 CEST 2018


Hi,

FYI, your patch has been queued to stable release 18.02.2

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

Thanks.

Luca Boccassi

---
>From aa0eb1b25c376c01c186a31056fcb84e414082bc Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan at mellanox.com>
Date: Fri, 11 May 2018 01:58:36 +0200
Subject: [PATCH] ethdev: fix port removal notification timing

[ upstream commit bafa9aa0d7bb07f78cdad518647a61c808945f4e ]

When an ethdev port is released, a destroy event is triggered to notify
the users about the released port.

A bit before the destroy event is triggered, the port becomes invalid
by changing its state to UNUSED and cleaning its data. Therefore, the
port is invalid for the destroy event callback process and the users
may get a wrong information of the port.

Move the destroy event emitting to be called before the port
invalidation.

Fixes: 133b54779aa1 ("ethdev: fix port data reset timing")
Fixes: 29aa41e36de7 ("ethdev: add notifications for probing and removal")

Signed-off-by: Matan Azrad <matan at mellanox.com>
Acked-by: Thomas Monjalon <thomas at monjalon.net>
Reviewed-by: Ferruh Yigit <ferruh.yigit at intel.com>
Reviewed-by: Andrew Rybchenko <arybchenko at solarflare.com>
Reviewed-by: Stephen Hemminger <stephen at networkplumber.org>
---
 lib/librte_ether/rte_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
index e7f2b809c..25fd3bc46 100644
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -358,6 +358,8 @@ rte_eth_dev_release_port(struct rte_eth_dev *eth_dev)
 
 	rte_eth_dev_shared_data_prepare();
 
+	_rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_DESTROY, NULL);
+
 	rte_spinlock_lock(&rte_eth_dev_shared_data->ownership_lock);
 
 	eth_dev->state = RTE_ETH_DEV_UNUSED;
@@ -366,8 +368,6 @@ rte_eth_dev_release_port(struct rte_eth_dev *eth_dev)
 
 	rte_spinlock_unlock(&rte_eth_dev_shared_data->ownership_lock);
 
-	_rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_DESTROY, NULL);
-
 	return 0;
 }
 
-- 
2.14.2



More information about the stable mailing list