From 3a19eeb0c3329905fbb927fdbac90e548061130d Mon Sep 17 00:00:00 2001 From: Alvin Zhang Date: Wed, 29 Apr 2020 14:37:24 +0800 Subject: [PATCH] net/e1000: fix port hotplug for multi-process Enable detach device on secondary process. Fixes: b9eee2cb8c29 ("e1000: support port hotplug") Cc: stable@dpdk.org Signed-off-by: Alvin Zhang Tested-by: Jianwei Mei Reviewed-by: Jeff Guo --- drivers/net/e1000/em_ethdev.c | 2 +- drivers/net/e1000/igb_ethdev.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c index 188cda3508..902b1cdca0 100644 --- a/drivers/net/e1000/em_ethdev.c +++ b/drivers/net/e1000/em_ethdev.c @@ -321,7 +321,7 @@ eth_em_dev_uninit(struct rte_eth_dev *eth_dev) PMD_INIT_FUNC_TRACE(); if (rte_eal_process_type() != RTE_PROC_PRIMARY) - return -EPERM; + return 0; eth_em_close(eth_dev); diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c index 520fba8fab..a5551e8175 100644 --- a/drivers/net/e1000/igb_ethdev.c +++ b/drivers/net/e1000/igb_ethdev.c @@ -923,7 +923,7 @@ eth_igb_dev_uninit(struct rte_eth_dev *eth_dev) PMD_INIT_FUNC_TRACE(); if (rte_eal_process_type() != RTE_PROC_PRIMARY) - return -EPERM; + return 0; eth_igb_close(eth_dev); @@ -1044,7 +1044,7 @@ eth_igbvf_dev_uninit(struct rte_eth_dev *eth_dev) PMD_INIT_FUNC_TRACE(); if (rte_eal_process_type() != RTE_PROC_PRIMARY) - return -EPERM; + return 0; igbvf_dev_close(eth_dev); -- 2.20.1