Add vxlan-bypass feature to IP4 forwarding path
Added vxlan-bypass feature which can be enabled on the underlay
interface which receive VXLAN packets to accelerate VXLAN decap
processing. The CLI to enable it is:
set interface ip vxlan-bypass <interface> [del]
With this feature enabled on an interface, there is an overhead for
non-VXLAN packets at about 13 clocks per packet.
The API is created to support vxlan-bypass for both VXLANoIPv4 and
VXLANoIPv6. With this change, vxlan-bypass is only implemented for
IPv4 forwarding path.
Change-Id: Ica7239f642010b231eade7fd5009aa4b42c119d3
Signed-off-by: John Lo <loj@cisco.com>
diff --git a/vnet/vnet/vxlan/vxlan.h b/vnet/vnet/vxlan/vxlan.h
index 28ce2a9..3041df2 100644
--- a/vnet/vnet/vxlan/vxlan.h
+++ b/vnet/vnet/vxlan/vxlan.h
@@ -141,6 +141,11 @@
uword * vxlan4_tunnel_by_key; /* keyed on ipv4.dst + vni */
uword * vxlan6_tunnel_by_key; /* keyed on ipv6.dst + vni */
+ /* local VTEP IPs used by vxlan-bypass node to check if received
+ VXLAN packet DIP matches any local VTEP address */
+ uword * vtep4; /* local ip4 VTEPs keyed on their ip4 addr */
+ uword * vtep6; /* local ip6 VTEPs keyed on their ip6 addr */
+
/* Free vlib hw_if_indices */
u32 * free_vxlan_tunnel_hw_if_indices;