aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ethernet
diff options
context:
space:
mode:
authorAndrew Yourtchenko <ayourtch@gmail.com>2018-10-10 16:15:55 +0200
committerMarco Varlese <marco.varlese@suse.de>2018-10-12 13:22:08 +0000
commite78bca16af86014b2340a1561ad8eacff86cbbaf (patch)
tree121cecc3431160142bdcf34b213aced36a145071 /src/vnet/ethernet
parent75b9f45a15bfae423b114dfcaa6eb114c91527eb (diff)
vnet: complete the fix for l3_hdr_offset calculation for single loop fastpass case (VPP-1444)
20e6d36b has moved the calculation of the l3_hdr_offset into the determine_next_node() function, with the assumption that the current_data in the buffer is at the L3 header. This is not the case for the single loop fastpath, where the vlib_buffer_advance() call is made after the call to determine_next_node(), as a day1 behavior. As a result - that path incorrectly sets the l3_hdr_offset. Solution: move the vlib_buffer_advance() call to before determine_next_node() Change-Id: Id5eaa084c43fb6564f8239df4a0b3dc0412b15de Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com> (cherry picked from commit 376414f4c3f53af44da4e82ee5d0b1843b291f8e)
Diffstat (limited to 'src/vnet/ethernet')
-rwxr-xr-xsrc/vnet/ethernet/node.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vnet/ethernet/node.c b/src/vnet/ethernet/node.c
index 0034577694c..53d5b4eb02d 100755
--- a/src/vnet/ethernet/node.c
+++ b/src/vnet/ethernet/node.c
@@ -657,9 +657,9 @@ ethernet_input_inline (vlib_main_t * vm,
(hi->hw_address != 0) &&
!eth_mac_equal ((u8 *) e0, hi->hw_address))
error0 = ETHERNET_ERROR_L3_MAC_MISMATCH;
+ vlib_buffer_advance (b0, sizeof (ethernet_header_t));
determine_next_node (em, variant, 0, type0, b0,
&error0, &next0);
- vlib_buffer_advance (b0, sizeof (ethernet_header_t));
}
goto ship_it0;
}