summaryrefslogtreecommitdiffstats
path: root/src/vnet/devices/af_packet
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/devices/af_packet')
-rw-r--r--src/vnet/devices/af_packet/af_packet.c7
-rw-r--r--src/vnet/devices/af_packet/node.c2
2 files changed, 6 insertions, 3 deletions
diff --git a/src/vnet/devices/af_packet/af_packet.c b/src/vnet/devices/af_packet/af_packet.c
index 2028510716e..7464d4e629d 100644
--- a/src/vnet/devices/af_packet/af_packet.c
+++ b/src/vnet/devices/af_packet/af_packet.c
@@ -270,9 +270,12 @@ af_packet_create_if (vlib_main_t * vm, u8 * host_if_name, u8 * hw_addr_set,
sw = vnet_get_hw_sw_interface (vnm, apif->hw_if_index);
apif->sw_if_index = sw->sw_if_index;
- vnet_set_device_input_node (apif->hw_if_index, af_packet_input_node.index);
- vnet_device_input_assign_thread (apif->hw_if_index, 0, /* queue */
+ vnet_set_device_input_node (vnm, apif->hw_if_index,
+ af_packet_input_node.index);
+ vnet_device_input_assign_thread (vnm, apif->hw_if_index, 0, /* queue */
~0 /* any cpu */ );
+ vnet_device_input_set_mode (vnm, apif->hw_if_index, 0,
+ VNET_DEVICE_INPUT_MODE_INTERRUPT);
vnet_hw_interface_set_flags (vnm, apif->hw_if_index,
VNET_HW_INTERFACE_FLAG_LINK_UP);
diff --git a/src/vnet/devices/af_packet/node.c b/src/vnet/devices/af_packet/node.c
index 76980102f71..d3af41b5d90 100644
--- a/src/vnet/devices/af_packet/node.c
+++ b/src/vnet/devices/af_packet/node.c
@@ -251,7 +251,7 @@ af_packet_input_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
vnet_device_input_runtime_t *rt = (void *) node->runtime_data;
vnet_device_and_queue_t *dq;
- vec_foreach (dq, rt->devices_and_queues)
+ foreach_device_and_queue (dq, rt->devices_and_queues)
{
af_packet_if_t *apif;
apif = vec_elt_at_index (apm->interfaces, dq->dev_instance);