vhost: Delete thread configuration when interface deleted 99/3899/2
authorPierre Pfister <ppfister@cisco.com>
Mon, 21 Nov 2016 12:50:38 +0000 (12:50 +0000)
committerDamjan Marion <dmarion.lists@gmail.com>
Thu, 24 Nov 2016 09:34:56 +0000 (09:34 +0000)
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>
vnet/vnet/devices/virtio/vhost-user.c

index 6a7f7e6..decfebb 100644 (file)
@@ -2205,6 +2205,8 @@ vhost_user_delete_if (vnet_main_t * vnm, vlib_main_t * vm, u32 sw_if_index)
 
   // 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);