summaryrefslogtreecommitdiff
path: root/drivers/net/virtio/virtio_ethdev.c
diff options
context:
space:
mode:
authorQi Zhang <qi.z.zhang@intel.com>2018-10-16 08:16:31 +0800
committerThomas Monjalon <thomas@monjalon.net>2018-10-17 10:16:18 +0200
commit8f62ec38616b16491f8601fc54ad5d643ef0e339 (patch)
treead7518b8c27e4d72604856dfeb244bd8a24f322a /drivers/net/virtio/virtio_ethdev.c
parent4852aa8f6e2125664698afc43b820bd787b02756 (diff)
downloaddpdk-next-eventdev-8f62ec38616b16491f8601fc54ad5d643ef0e339.zip
dpdk-next-eventdev-8f62ec38616b16491f8601fc54ad5d643ef0e339.tar.gz
dpdk-next-eventdev-8f62ec38616b16491f8601fc54ad5d643ef0e339.tar.xz
drivers/net: enable device detach on secondary process
With the enabling for hotplug on multi-process, rte_eth_dev_pci_generic_remove can be used to detach the device from a secondary process also. But we need to take care of the uninit callback parameter to make sure it handles the secondary case correctly. Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Diffstat (limited to 'drivers/net/virtio/virtio_ethdev.c')
-rw-r--r--drivers/net/virtio/virtio_ethdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index b81df0a..730c417 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1697,7 +1697,7 @@ eth_virtio_dev_uninit(struct rte_eth_dev *eth_dev)
PMD_INIT_FUNC_TRACE();
if (rte_eal_process_type() == RTE_PROC_SECONDARY)
- return -EPERM;
+ return 0;
virtio_dev_stop(eth_dev);
virtio_dev_close(eth_dev);