From 3d81267945a732753b0dbd0a83a50ab0625b448a Mon Sep 17 00:00:00 2001 From: Ole Troan Date: Tue, 15 Sep 2020 10:53:34 +0200 Subject: vat: add infrastructure to align vnet test code and plugin test code Split vat/api_format.c also for VNET features. Use auto-generated VAT test code and support dynamic message ID allocation as for plugins. The arp and geneve features as Guinea pigs. Type: improvement Signed-off-by: Ole Troan Change-Id: I461591496766bdf10c5f950fd30f1a0ae05909da Signed-off-by: Ole Troan --- src/vpp/api/custom_dump.c | 70 ----------------------------------------------- 1 file changed, 70 deletions(-) (limited to 'src/vpp/api/custom_dump.c') diff --git a/src/vpp/api/custom_dump.c b/src/vpp/api/custom_dump.c index 5f022952cfa..87729721fea 100644 --- a/src/vpp/api/custom_dump.c +++ b/src/vpp/api/custom_dump.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include @@ -264,26 +263,6 @@ static void *vl_api_sw_interface_set_vxlan_bypass_t_print FINISH; } -static void *vl_api_sw_interface_set_geneve_bypass_t_print - (vl_api_sw_interface_set_geneve_bypass_t * mp, void *handle) -{ - u8 *s; - - s = format (0, "SCRIPT: sw_interface_set_geneve_bypass "); - - s = format (s, "sw_if_index %d ", (mp->sw_if_index)); - - if (mp->is_ipv6) - s = format (s, "ip6 "); - - if (mp->enable) - s = format (s, "enable "); - else - s = format (s, "disable "); - - FINISH; -} - static void *vl_api_sw_interface_set_l2_xconnect_t_print (vl_api_sw_interface_set_l2_xconnect_t * mp, void *handle) { @@ -1654,52 +1633,6 @@ static void *vl_api_sw_interface_set_vxlan_gbp_bypass_t_print FINISH; } -static void *vl_api_geneve_add_del_tunnel_t_print - (vl_api_geneve_add_del_tunnel_t * mp, void *handle) -{ - u8 *s; - s = format (0, "SCRIPT: geneve_add_del_tunnel "); - - ip46_address_t local; - ip46_address_t remote; - ip_address_decode (&mp->remote_address, &remote); - ip_address_decode (&mp->local_address, &local); - - u8 is_grp = ip46_address_is_multicast (&remote); - char *remote_name = is_grp ? "group" : "dst"; - - s = format (s, "src %U ", format_ip46_address, &local, IP46_TYPE_ANY); - s = format (s, "%s %U ", remote_name, format_ip46_address, - &remote, IP46_TYPE_ANY); - - if (is_grp) - s = format (s, "mcast_sw_if_index %d ", (mp->mcast_sw_if_index)); - - if (mp->encap_vrf_id) - s = format (s, "encap-vrf-id %d ", (mp->encap_vrf_id)); - - s = format (s, "decap-next %d ", (mp->decap_next_index)); - - s = format (s, "vni %d ", (mp->vni)); - - if (mp->is_add == 0) - s = format (s, "del "); - - FINISH; -} - -static void *vl_api_geneve_tunnel_dump_t_print - (vl_api_geneve_tunnel_dump_t * mp, void *handle) -{ - u8 *s; - - s = format (0, "SCRIPT: geneve_tunnel_dump "); - - s = format (s, "sw_if_index %d ", (mp->sw_if_index)); - - FINISH; -} - static void *vl_api_gre_tunnel_add_del_t_print (vl_api_gre_tunnel_add_del_t * mp, void *handle) { @@ -3612,7 +3545,6 @@ _(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_GENEVE_BYPASS, sw_interface_set_geneve_bypass) \ _(BOND_CREATE, bond_create) \ _(BOND_CREATE2, bond_create2) \ _(BOND_DELETE, bond_delete) \ @@ -3669,8 +3601,6 @@ _(SW_IF_L2TPV3_TUNNEL_DUMP, sw_if_l2tpv3_tunnel_dump) \ _(VXLAN_ADD_DEL_TUNNEL, vxlan_add_del_tunnel) \ _(VXLAN_TUNNEL_DUMP, vxlan_tunnel_dump) \ _(VXLAN_OFFLOAD_RX, vxlan_offload_rx) \ -_(GENEVE_ADD_DEL_TUNNEL, geneve_add_del_tunnel) \ -_(GENEVE_TUNNEL_DUMP, geneve_tunnel_dump) \ _(GRE_TUNNEL_ADD_DEL, gre_tunnel_add_del) \ _(GRE_TUNNEL_DUMP, gre_tunnel_dump) \ _(L2_FIB_CLEAR_TABLE, l2_fib_clear_table) \ -- cgit 1.2.3-korg