From: Alvin Zhang Date: Wed, 29 Apr 2020 06:37:24 +0000 (+0800) Subject: net/e1000: fix port hotplug for multi-process X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=3a19eeb0c3329905fbb927fdbac90e548061130d;p=dpdk.git 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 --- 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);