patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] net/ice: check process type in close operation
@ 2021-03-05  9:25 dapengx.yu
  0 siblings, 0 replies; only message in thread
From: dapengx.yu @ 2021-03-05  9:25 UTC (permalink / raw)
  To: qiming.yang, wenzhuo.lu; +Cc: stable, Dapeng Yu

From: Dapeng Yu <dapengx.yu@intel.com>

The secondary processes are not allowed to release shared resources.
Only process-private resources should be freed in a secondary process.
So the close operation is just forbidden in a secondary process.

Fixes: bd513ece3c40 ("net/ice: release port upon close")
Cc: stable@dpdk.org

Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
---
 PATCH 19.11.7-rc1

 drivers/net/ice/ice_ethdev.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index c2e659303c..2552bf228c 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -2394,6 +2394,9 @@ ice_dev_close(struct rte_eth_dev *dev)
 	struct ice_adapter *ad =
 		ICE_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
 
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+		return;
+
 	/* Since stop will make link down, then the link event will be
 	 * triggered, disable the irq firstly to avoid the port_infoe etc
 	 * resources deallocation causing the interrupt service thread
-- 
2.27.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-03-05  9:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-05  9:25 [dpdk-stable] [PATCH] net/ice: check process type in close operation dapengx.yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).