Skip to content

Commit

Permalink
netdev-dpdk: Clean-up after vHost User port delete
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Daniele Di Proietto <[email protected]>
  • Loading branch information
cloftus authored and ddiproietto committed Oct 22, 2015
1 parent 3cdb27d commit e04f7e4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/netdev-dpdk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e04f7e4

Please sign in to comment.