diff options
author | Ciara Loftus <ciara.loftus@intel.com> | 2015-10-21 14:50:36 +0100 |
---|---|---|
committer | Daniele Di Proietto <diproiettod@vmware.com> | 2015-10-22 11:57:59 -0700 |
commit | e04f7e4f2f574500334326dbda1bb808cf25c721 (patch) | |
tree | ca4b51e8df85093627189d0be4869da15cf24d14 | |
parent | 3cdb27d3142eb1a2d827edf6c802d3419273718e (diff) |
netdev-dpdk: Clean-up after vHost User port delete
Unregister and delete the socket associated with a vhost-user
port when the port is deleted and/or the switch is brought down.
Do not delete the socket if the vhost-user device is still attached
to the guest.
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Acked-by: Daniele Di Proietto <diproiettod@vmware.com>
-rw-r--r-- | lib/netdev-dpdk.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index ea2d9f35c..4658416dc 100644 --- a/lib/netdev-dpdk.c +++ b/lib/netdev-dpdk.c @@ -749,6 +749,10 @@ netdev_dpdk_vhost_destruct(struct netdev *netdev_) return; } + if (rte_vhost_driver_unregister(dev->vhost_id)) { + VLOG_ERR("Unable to remove vhost-user socket %s", dev->vhost_id); + } + ovs_mutex_lock(&dpdk_mutex); list_remove(&dev->list_node); dpdk_mp_put(dev->dpdk_mp); |