ip4-input: fix prefetch data issue for tunnel decap cases 57/15757/4
authorZhiyong Yang <zhiyong.yang@intel.com>
Wed, 7 Nov 2018 05:04:28 +0000 (00:04 -0500)
committerDamjan Marion <dmarion@me.com>
Thu, 15 Nov 2018 17:20:28 +0000 (17:20 +0000)
commite01f6ef9efced0b89df4618a7f5e8894c70bbac7
tree2ab79881aede6ed59d4f790834aa0ff094e568e7
parentb4d3053445499a115f0f4debde6a8c7b29a8c071
ip4-input: fix prefetch data issue for tunnel decap cases

There are two reasons to modify the existing code ip4_input_inline.

1. For many tunnel decap cases, inner ip header or its part is possible
in the second cacheline, not first cacheline only after the field "data",
and this will cause data cache miss once the second cacheline is needed
to access. e.g vxlan-gpe.
2. For most of cases, "data" is the starting address of ethernet
header, not IP header. The existing code causes misunderstanding
from code readability perspective.

Change-Id: I43e119b899dbde95803bccbac54259729fd2cddf
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Signed-off-by: Yuwei Zhang <yuwei1.zhang@intel.com>
src/vnet/ip/ip4_input.c