summaryrefslogtreecommitdiffstats
path: root/vnet/vnet/devices/af_packet/node.c
diff options
context:
space:
mode:
Diffstat (limited to 'vnet/vnet/devices/af_packet/node.c')
-rw-r--r--vnet/vnet/devices/af_packet/node.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/vnet/vnet/devices/af_packet/node.c b/vnet/vnet/devices/af_packet/node.c
index 3a3807d8b10..f086b8da1df 100644
--- a/vnet/vnet/devices/af_packet/node.c
+++ b/vnet/vnet/devices/af_packet/node.c
@@ -23,6 +23,7 @@
#include <vlib/unix/unix.h>
#include <vnet/ip/ip.h>
#include <vnet/ethernet/ethernet.h>
+#include <vnet/feature/feature.h>
#include <vnet/devices/af_packet/af_packet.h>
@@ -164,7 +165,7 @@ af_packet_device_input_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
tph = (struct tpacket2_hdr *) (block_start + rx_frame * frame_size);
while ((tph->tp_status & TP_STATUS_USER) && (n_free_bufs > min_bufs))
{
- vlib_buffer_t *b0, *first_b0 = 0;
+ vlib_buffer_t *b0 = 0, *first_b0 = 0;
u32 next0 = next_index;
u32 n_left_to_next;
@@ -236,6 +237,11 @@ af_packet_device_input_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
tr->hw_if_index = apif->hw_if_index;
clib_memcpy (&tr->tph, tph, sizeof (struct tpacket2_hdr));
}
+
+ /* redirect if feature path enabled */
+ vnet_feature_device_input_redirect_x1 (node, apif->sw_if_index,
+ &next0, b0, 0);
+
/* enque and take next packet */
vlib_validate_buffer_enqueue_x1 (vm, node, next_index, to_next,
n_left_to_next, first_bi0, next0);