ip: avoid fib lookup for consecutive pkts having same source IP 92/24192/4
authorNitin Saxena <nsaxena@marvell.com>
Sat, 4 Jan 2020 06:58:42 +0000 (12:28 +0530)
committerFlorin Coras <florin.coras@gmail.com>
Sat, 11 Jan 2020 16:53:41 +0000 (16:53 +0000)
commit2d18d2ea9f0e3d6c47d365ec135af651b14e8165
tree251f0dcd684503f1419379e4db3fb64afcb24859
parentdfb3e4106f8013d40522570362a776d096f51413
ip: avoid fib lookup for consecutive pkts having same source IP

Type: fix
Fixes: be2286b0

This patch does following:

- If terminating frame has consecutive packets with same source IP, this patch
  avoids fib lookup for those packets in ip4-local node. This drops cycle count
  for ip4-local node on both ARM and x86. It being done by enabling dead code in
  else {} case of ip4_local_check_src_x2() and ip4_local_check_src() functions.

- In case all packets in terminating frame have unique source IP (e.g:
  incrementing), ip4-local is costlier by 2 cycles (broadwell)

Change-Id: I472ddc324716cec8bfe601568b8aeb7565f97ab3
Signed-off-by: Nitin Saxena <nsaxena@marvell.com>
src/vnet/ip/ip4_forward.c