vhost: Fix bug during interface deletion
[vpp.git] / vnet / vnet / devices / virtio / vhost-user.c
index d7256e2..6a7f7e6 100644 (file)
@@ -1719,6 +1719,7 @@ VLIB_REGISTER_NODE (vhost_user_input_node) = {
   .function = vhost_user_input,
   .type = VLIB_NODE_TYPE_INPUT,
   .name = "vhost-user-input",
+  .sibling_of = "device-input",
 
   /* Will be enabled if/when hardware is detected. */
   .state = VLIB_NODE_STATE_DISABLED,
@@ -1728,9 +1729,6 @@ VLIB_REGISTER_NODE (vhost_user_input_node) = {
 
   .n_errors = VHOST_USER_INPUT_FUNC_N_ERROR,
   .error_strings = vhost_user_input_func_error_strings,
-
-  .n_next_nodes = VNET_DEVICE_INPUT_N_NEXT_NODES,
-  .next_nodes = VNET_DEVICE_INPUT_NEXT_NODES,
 };
 
 VLIB_NODE_FUNCTION_MULTIARCH (vhost_user_input_node, vhost_user_input)
@@ -2209,6 +2207,7 @@ vhost_user_delete_if (vnet_main_t * vnm, vlib_main_t * vm, u32 sw_if_index)
   vui->active = 0;
   // disconnect interface sockets
   vhost_user_if_disconnect (vui);
+  vhost_user_update_iface_state (vui);
   // add to inactive interface list
   vec_add1 (vum->vhost_user_inactive_interfaces_index, p[0]);