diff options
Diffstat (limited to 'vpp')
-rw-r--r-- | vpp/vpp-api/api.c | 24 | ||||
-rw-r--r-- | vpp/vpp-api/custom_dump.c | 25 | ||||
-rw-r--r-- | vpp/vpp-api/vpe.api | 26 |
3 files changed, 73 insertions, 2 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) { diff --git a/vpp/vpp-api/custom_dump.c b/vpp/vpp-api/custom_dump.c index 2a9fd741..28d3341d 100644 --- a/vpp/vpp-api/custom_dump.c +++ b/vpp/vpp-api/custom_dump.c @@ -171,9 +171,29 @@ static void *vl_api_sw_interface_set_vpath_t_print s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); if (mp->enable) - s = format (s, "vPath enable "); + s = format (s, "enable "); + else + s = format (s, "disable "); + + FINISH; +} + +static void *vl_api_sw_interface_set_vxlan_bypass_t_print + (vl_api_sw_interface_set_vxlan_bypass_t * mp, void *handle) +{ + u8 *s; + + s = format (0, "SCRIPT: sw_interface_set_vxlan_bypass "); + + s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index)); + + if (mp->is_ipv6) + s = format (s, "ip6"); + + if (mp->enable) + s = format (s, "enable "); else - s = format (s, "vPath disable "); + s = format (s, "disable "); FINISH; } @@ -2929,6 +2949,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) \ _(TAP_CONNECT, tap_connect) \ _(TAP_MODIFY, tap_modify) \ _(TAP_DELETE, tap_delete) \ diff --git a/vpp/vpp-api/vpe.api b/vpp/vpp-api/vpe.api index 69648afc..5ab21029 100644 --- a/vpp/vpp-api/vpe.api +++ b/vpp/vpp-api/vpe.api @@ -1480,6 +1480,32 @@ define sw_interface_set_vpath_reply i32 retval; }; +/** \brief Interface set vxlan-bypass request + @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request + @param sw_if_index - interface used to reach neighbor + @param is_ipv6 - if non-zero, enable ipv6-vxlan-bypass, else ipv4-vxlan-bypass + @param enable - if non-zero enable, else disable +*/ +define sw_interface_set_vxlan_bypass +{ + u32 client_index; + u32 context; + u32 sw_if_index; + u8 is_ipv6; + u8 enable; +}; + +/** \brief Interface set vxlan-bypass response + @param context - sender context, to match reply w/ request + @param retval - return code for the request +*/ +define sw_interface_set_vxlan_bypass_reply +{ + u32 context; + i32 retval; +}; + /** \brief MPLS Ethernet add / del tunnel request @param client_index - opaque cookie to identify the sender @param context - sender context, to match reply w/ request |