summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Lo <loj@cisco.com>2016-12-20 16:59:02 -0500
committerJohn Lo <loj@cisco.com>2016-12-20 17:13:31 -0500
commit7714b300285a9ebd075819075e977f96b2ba7676 (patch)
tree29438fff09a6ceabdafa9fdbb380f174a33d411c
parent3be6b2845485d8740410293322c8b4bf373878e7 (diff)
Always set start_of_ethernet_header in ethernet-input speed path
The speed path of ethernet-input node is setting the packet context field start_of_ethernet_header for L2 only. This is also needed for L3 path because of IPv4 ARP processing which need to know the start of ethernet header of the incoming ARP packet. Change-Id: I98ee88c482f8536e4fccc0b8afcb8811d63f4435 Signed-off-by: John Lo <loj@cisco.com>
-rwxr-xr-xvnet/vnet/ethernet/node.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/vnet/vnet/ethernet/node.c b/vnet/vnet/ethernet/node.c
index c48e3f4237b..6d57da31708 100755
--- a/vnet/vnet/ethernet/node.c
+++ b/vnet/vnet/ethernet/node.c
@@ -394,16 +394,18 @@ ethernet_input_inline (vlib_main_t * vm,
subint0 = &intf0->untagged_subint;
cached_is_l2 = is_l20 = subint0->flags & SUBINT_CONFIG_L2;
}
+
+ vnet_buffer (b0)->ethernet.start_of_ethernet_header =
+ b0->current_data;
+ vnet_buffer (b1)->ethernet.start_of_ethernet_header =
+ b1->current_data;
+
if (PREDICT_TRUE (is_l20 != 0))
{
next0 = em->l2_next;
vnet_buffer (b0)->l2.l2_len = sizeof (ethernet_header_t);
- vnet_buffer (b0)->ethernet.start_of_ethernet_header =
- b0->current_data;
next1 = em->l2_next;
vnet_buffer (b1)->l2.l2_len = sizeof (ethernet_header_t);
- vnet_buffer (b1)->ethernet.start_of_ethernet_header =
- b1->current_data;
}
else
{
@@ -606,12 +608,14 @@ ethernet_input_inline (vlib_main_t * vm,
subint0 = &intf0->untagged_subint;
cached_is_l2 = is_l20 = subint0->flags & SUBINT_CONFIG_L2;
}
+
+ vnet_buffer (b0)->ethernet.start_of_ethernet_header =
+ b0->current_data;
+
if (PREDICT_TRUE (is_l20 != 0))
{
next0 = em->l2_next;
vnet_buffer (b0)->l2.l2_len = sizeof (ethernet_header_t);
- vnet_buffer (b0)->ethernet.start_of_ethernet_header =
- b0->current_data;
}
else
{