[dpdk-stable] [PATCH] net/ice: check process type in close operation

dapengx.yu at intel.com dapengx.yu at intel.com
Fri Mar 5 10:25:09 CET 2021

From: Dapeng Yu <dapengx.yu at 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 at dpdk.org

Signed-off-by: Dapeng Yu <dapengx.yu at 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 =
+	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

More information about the stable mailing list