l2: performance enhancement in l2input 91/27191/9
authorZhiyong Yang <zhiyong.yang@intel.com>
Fri, 15 May 2020 14:32:34 +0000 (22:32 +0800)
committerDamjan Marion <dmarion@me.com>
Sat, 27 Jun 2020 10:26:13 +0000 (10:26 +0000)
commit975a3cbb130fe7f3d5415dee7c05ea5e7bc59daf
tree7e4cc9763ac70b365a4ca2665d254b024dba04e1
parentd352bf8276f33f33e4af5e8a7b85dad8187f531d
l2: performance enhancement in l2input

Short Load/Stores combined with prefetching in the beginning of the loop
place too much pressure on AGUs and memory accesses.
The patch interleaves load/store operations with computational operations
to alleviate the pain point.

vlib_get_buffers is also leveraged.

Redefine u8 dst_and_src[12] instead of dst[6] and src[6] in struct
l2input_trace_t in order to merge two copys into one.

Type: improvement

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Change-Id: I7d3df7732c476069235e3019c68f0f53bca9637e
src/vnet/l2/l2_input.c