vxlan: reuse inner packet flow hash for tunnel outer header load balance 05/24105/1
authorShawn Ji <xiaji@tethrnet.com>
Wed, 18 Dec 2019 02:10:54 +0000 (10:10 +0800)
committerShawn Ji <xiaji@tethrnet.com>
Sat, 21 Dec 2019 05:36:21 +0000 (05:36 +0000)
commitd0bb569621b9f0608c8eac448aec07cd010d4706
treefb82739b5fc38fd775d94e5da07907c111b68a3f
parent2eb13c295427405208ad9d13d562d2a084a46da7
vxlan: reuse inner packet flow hash for tunnel outer header load balance

Type: fix

Several tunnels encapsulation use udp as outer header and udp src port
is set by inner header flow hash, such as gtpu, geneve, vxlan, vxlan-gbd
Since flow hash of inner header is already been calculated, keeping it
to vnet_buffere[b]->ip.flow_hash should save load-balance node work to
select ECMP uplinks.

Change-Id: I0e4e2b27178f4fcc5785e221d6d1f3e8747d0d59
Signed-off-by: Shawn Ji <xiaji@tethrnet.com>
(cherry picked from commit 623b4f85e6ee4611ae15bb3103fe30725ca977ed)
src/plugins/gtpu/gtpu_encap.c
src/vnet/geneve/encap.c
src/vnet/vxlan-gbp/encap.c
src/vnet/vxlan/encap.c