avf: api fix
[vpp.git] / src / plugins / avf / device.c
index be2205b..0e9a8bf 100644 (file)
@@ -1171,7 +1171,7 @@ avf_create_if (vlib_main_t * vm, avf_create_if_args_t * args)
     goto error;
 
   vnet_sw_interface_t *sw = vnet_get_hw_sw_interface (vnm, ad->hw_if_index);
-  ad->sw_if_index = sw->sw_if_index;
+  args->sw_if_index = ad->sw_if_index = sw->sw_if_index;
 
   vnet_hw_interface_t *hw = vnet_get_hw_interface (vnm, ad->hw_if_index);
   hw->flags |= VNET_HW_INTERFACE_FLAG_SUPPORTS_INT_MODE;