vhost: Delete thread configuration when interface deleted
It does not make sense to keep interface configuration
when a vhost interface is deleted.
This fix makes sure thread configuration is removed.
Change-Id: I4b3b75d98c15b544c32928f79ef52b7622a86b75
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
diff --git a/vnet/vnet/devices/virtio/vhost-user.c b/vnet/vnet/devices/virtio/vhost-user.c
index 6a7f7e6..decfebb 100644
--- a/vnet/vnet/devices/virtio/vhost-user.c
+++ b/vnet/vnet/devices/virtio/vhost-user.c
@@ -2205,6 +2205,8 @@
// interface is inactive
vui->active = 0;
+ // Delete configured thread pinning
+ vec_reset_length (vui->workers);
// disconnect interface sockets
vhost_user_if_disconnect (vui);
vhost_user_update_iface_state (vui);