summaryrefslogtreecommitdiffstats
path: root/src/vnet/devices/af_packet
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2017-04-05 18:15:45 +0200
committerNeale Ranns <nranns@cisco.com>2017-04-10 12:47:33 +0000
commit153646e89c3be70c68348bdd497f8edd2b212a9c (patch)
tree201d82257d82b166fc3003b7f201966b465dd17a /src/vnet/devices/af_packet
parentc3827738daf0955445212ad622e7259ad9480141 (diff)
Common device-input interrupt infra
Change-Id: I23b588eb56a3f5690158449a1f9bc8053cd3d251 Signed-off-by: Damjan Marion <damarion@cisco.com>
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);