From 7a91b46e03f8d67d2669050fdb890ef11c31de79 Mon Sep 17 00:00:00 2001 From: Pierre Pfister Date: Mon, 21 Nov 2016 12:50:38 +0000 Subject: [PATCH] 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 --- vnet/vnet/devices/virtio/vhost-user.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vnet/vnet/devices/virtio/vhost-user.c b/vnet/vnet/devices/virtio/vhost-user.c index 6a7f7e600ba..decfebba1c3 100644 --- a/vnet/vnet/devices/virtio/vhost-user.c +++ b/vnet/vnet/devices/virtio/vhost-user.c @@ -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); -- 2.16.6