summaryrefslogtreecommitdiffstats
path: root/vnet/vnet/ip/ip4_forward.c
diff options
context:
space:
mode:
authorJohn Lo <loj@cisco.com>2016-11-30 12:51:39 -0500
committerJohn Lo <loj@cisco.com>2016-12-01 19:34:12 +0000
commit37682e1237f83f0f84cdc4f9f92aa74d8fe3c139 (patch)
tree0ca723a11ab786245df26895365521b3f2fae11f /vnet/vnet/ip/ip4_forward.c
parent436d06b1c7d00e8c30ab055560724285a017290b (diff)
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>
Diffstat (limited to 'vnet/vnet/ip/ip4_forward.c')
-rw-r--r--vnet/vnet/ip/ip4_forward.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/vnet/vnet/ip/ip4_forward.c b/vnet/vnet/ip/ip4_forward.c
index fa8ec4e644c..d6fd380815b 100644
--- a/vnet/vnet/ip/ip4_forward.c
+++ b/vnet/vnet/ip/ip4_forward.c
@@ -973,6 +973,12 @@ VNET_FEATURE_INIT (ip4_ipsec, static) = {
VNET_FEATURE_INIT (ip4_vpath, static) = {
.arc_name = "ip4-unicast",
.node_name = "vpath-input-ip4",
+ .runs_before = VNET_FEATURES ("ip4-vxlan-bypass"),
+};
+
+VNET_FEATURE_INIT (ip4_vxlan_bypass, static) = {
+ .arc_name = "ip4-unicast",
+ .node_name = "ip4-vxlan-bypass",
.runs_before = VNET_FEATURES ("ip4-lookup"),
};
@@ -1143,7 +1149,7 @@ typedef struct {
u8 packet_data[64 - 1*sizeof(u32)];
} ip4_forward_next_trace_t;
-static u8 * format_ip4_forward_next_trace (u8 * s, va_list * args)
+u8 * format_ip4_forward_next_trace (u8 * s, va_list * args)
{
CLIB_UNUSED (vlib_main_t * vm) = va_arg (*args, vlib_main_t *);
CLIB_UNUSED (vlib_node_t * node) = va_arg (*args, vlib_node_t *);
@@ -1389,7 +1395,7 @@ ip4_tcp_udp_compute_checksum (vlib_main_t * vm, vlib_buffer_t * p0,
return sum16;
}
-static u32
+u32
ip4_tcp_udp_validate_checksum (vlib_main_t * vm, vlib_buffer_t * p0)
{
ip4_header_t * ip0 = vlib_buffer_get_current (p0);