X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=vnet%2Fvnet%2Fdevices%2Faf_packet%2Faf_packet.c;h=b41eaf3ba8214895f61a590a279979d117ac8b1b;hb=78ea9c2869967693b77949ec154deef6340d01f5;hp=20c61295bb03386fce5621776cd558e817661b9b;hpb=53f09e36f97a28a42a2e3eb58032c75691de4f4c;p=vpp.git diff --git a/vnet/vnet/devices/af_packet/af_packet.c b/vnet/vnet/devices/af_packet/af_packet.c index 20c61295bb0..b41eaf3ba82 100644 --- a/vnet/vnet/devices/af_packet/af_packet.c +++ b/vnet/vnet/devices/af_packet/af_packet.c @@ -162,7 +162,7 @@ error: } int -af_packet_create_if(vlib_main_t * vm, u8 * host_if_name, u8 * hw_addr_set) +af_packet_create_if(vlib_main_t * vm, u8 * host_if_name, u8 * hw_addr_set, u32 *sw_if_index) { af_packet_main_t * apm = &af_packet_main; int ret, fd = -1; @@ -258,7 +258,8 @@ af_packet_create_if(vlib_main_t * vm, u8 * host_if_name, u8 * hw_addr_set) VNET_HW_INTERFACE_FLAG_LINK_UP); mhash_set_mem (&apm->if_index_by_host_if_name, host_if_name, &if_index, 0); - + if (sw_if_index) + *sw_if_index = apif->sw_if_index; return 0; error: