]> git.droids-corp.org - dpdk.git/commitdiff
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 188cda3508beed41f06beaafcfb838e6fe0780f9..902b1cdca07463d7b60c2722af1b26fe1b11ea42 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 520fba8fab52a27c3061c768d215b78cf9910c10..a5551e8175e36034838c7c2028ea2490bd1a58fc 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);