net/e1000: fix port hotplug for multi-process
authorAlvin Zhang <alvinx.zhang@intel.com>
Wed, 29 Apr 2020 06:37:24 +0000 (14:37 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 18 May 2020 18:35:07 +0000 (20:35 +0200)
Enable detach device on secondary process.

Fixes: b9eee2cb8c29 ("e1000: support port hotplug")
Cc: stable@dpdk.org
Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Tested-by: Jianwei Mei <jianweix.mei@intel.com>
Reviewed-by: Jeff Guo <jia.guo@intel.com>
drivers/net/e1000/em_ethdev.c
drivers/net/e1000/igb_ethdev.c

index 188cda3..902b1cd 100644 (file)
@@ -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);
 
index 520fba8..a5551e8 100644 (file)
@@ -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);