vxlan:ip4 decap:remove access to tunnel object 98/15098/5
authorEyal Bari <ebari@cisco.com>
Tue, 2 Oct 2018 09:23:06 +0000 (12:23 +0300)
committerJohn Lo <loj@cisco.com>
Fri, 5 Oct 2018 03:25:39 +0000 (03:25 +0000)
commitefd9cf302ff6cbaf3c51e69bb9ea6c29e2325a10
treeef945cf9c7a19f46720b3a1aa9d9619743ca698e
parentdc7b1aa1e3c451b0ffc18543f06aa03eae56a087
vxlan:ip4 decap:remove access to tunnel object

store local/remote addresses + vrf + vni in hash key
store complete decap info in hash value (sw_if_index + next_index +
error)

this removes the need to access the tunnel object when matching both
unicast and mcast.

however for mcast handling it requires 3 hash lookups:
* one failed unicast lookup (by src+dst addrs)
* lookup by mcast(dst) addr .
* unicast lookup (tunnel local ip as dst + pkt's src addr)

where previously it needed 2:
* lookup by src to find unicast tunnel + compare dst to local addr
(failing for mcast)
* lookup by mcast to find the mcast tunnel

Change-Id: I7a3485d130a54194b8f7e2df0431258db36eceeb
Signed-off-by: Eyal Bari <ebari@cisco.com>
src/vnet/vxlan/decap.c
src/vnet/vxlan/vxlan.c
src/vnet/vxlan/vxlan.h