- vnet_hw_interface_set_rx_mode (vnm, apif->hw_if_index, 0,
- VNET_HW_INTERFACE_RX_MODE_INTERRUPT);
+ vnet_hw_if_set_rx_queue_mode (vnm, apif->queue_index,
+ VNET_HW_IF_RX_MODE_INTERRUPT);
+ vnet_hw_if_update_runtime_data (vnm, apif->hw_if_index);
+ {
+ clib_file_t template = { 0 };
+ template.read_function = af_packet_fd_read_ready;
+ template.file_descriptor = fd;
+ template.private_data = if_index;
+ template.flags = UNIX_FILE_EVENT_EDGE_TRIGGERED;
+ template.description =
+ format (0, "%U", format_af_packet_device_name, if_index);
+ apif->clib_file_index = clib_file_add (&file_main, &template);
+ }
+ vnet_hw_if_set_rx_queue_file_index (vnm, apif->queue_index,
+ apif->clib_file_index);