[09/11] net/txgbe: check process type in close operation
Checks
Commit Message
The secondary processes are not allowed to release shared resources.
Only process-private resources should be freed in a secondary process.
Most of the time, there is no process-private resource,
so the close operation is just forbidden in a secondary process.
Fixes: e1698e383c2a ("net/txgbe: add device init and uninit")
Cc: stable@dpdk.org
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/txgbe/txgbe_ethdev.c | 3 +++
1 file changed, 3 insertions(+)
@@ -2052,6 +2052,9 @@ txgbe_dev_close(struct rte_eth_dev *dev)
PMD_INIT_FUNC_TRACE();
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+ return 0;
+
txgbe_pf_reset_hw(hw);
ret = txgbe_dev_stop(dev);