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>
This commit is contained in:
@ -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
|
||||
{
|
||||
|
Reference in New Issue
Block a user