summaryrefslogtreecommitdiffstats
path: root/vpp/vpp-api/api.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 /vpp/vpp-api/api.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 'vpp/vpp-api/api.c')
-rw-r--r--vpp/vpp-api/api.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/vpp/vpp-api/api.c b/vpp/vpp-api/api.c
index 1da0729f..2c0256cc 100644
--- a/vpp/vpp-api/api.c
+++ b/vpp/vpp-api/api.c
@@ -155,6 +155,7 @@ _(SW_INTERFACE_ADD_DEL_ADDRESS, sw_interface_add_del_address) \
_(SW_INTERFACE_SET_TABLE, sw_interface_set_table) \
_(SW_INTERFACE_SET_MPLS_ENABLE, sw_interface_set_mpls_enable) \
_(SW_INTERFACE_SET_VPATH, sw_interface_set_vpath) \
+_(SW_INTERFACE_SET_VXLAN_BYPASS, sw_interface_set_vxlan_bypass) \
_(SW_INTERFACE_SET_L2_XCONNECT, sw_interface_set_l2_xconnect) \
_(SW_INTERFACE_SET_L2_BRIDGE, sw_interface_set_l2_bridge) \
_(SW_INTERFACE_SET_DPDK_HQOS_PIPE, sw_interface_set_dpdk_hqos_pipe) \
@@ -1465,6 +1466,29 @@ vl_api_sw_interface_set_vpath_t_handler (vl_api_sw_interface_set_vpath_t * mp)
}
static void
+ vl_api_sw_interface_set_vxlan_bypass_t_handler
+ (vl_api_sw_interface_set_vxlan_bypass_t * mp)
+{
+ vl_api_sw_interface_set_vxlan_bypass_reply_t *rmp;
+ int rv = 0;
+ u32 sw_if_index = ntohl (mp->sw_if_index);
+
+ VALIDATE_SW_IF_INDEX (mp);
+
+ if (mp->is_ipv6)
+ {
+ /* not yet implemented */
+ }
+ else
+ vnet_feature_enable_disable ("ip4-unicast", "ip4-vxlan-bypass",
+ sw_if_index, mp->enable, 0, 0);
+
+ BAD_SW_IF_INDEX_LABEL;
+
+ REPLY_MACRO (VL_API_SW_INTERFACE_SET_VXLAN_BYPASS_REPLY);
+}
+
+static void
vl_api_sw_interface_set_l2_xconnect_t_handler
(vl_api_sw_interface_set_l2_xconnect_t * mp)
{