Improve l2_macs_events API to provide MAC move information
[vpp.git] / src / vat / api_format.c
index 445b496..97e67f9 100644 (file)
@@ -19,7 +19,6 @@
 
 #include <vat/vat.h>
 #include <vppinfra/socket.h>
-#include <svm/memfd.h>
 #include <vlibapi/api.h>
 #include <vlibmemory/api.h>
 #include <vnet/ip/ip.h>
@@ -34,7 +33,7 @@
 #include <vpp/api/vpe_msg_enum.h>
 #include <vnet/l2/l2_classify.h>
 #include <vnet/l2/l2_vtr.h>
-#include <vnet/classify/input_acl.h>
+#include <vnet/classify/in_out_acl.h>
 #include <vnet/classify/policer_classify.h>
 #include <vnet/classify/flow_classify.h>
 #include <vnet/mpls/mpls.h>
@@ -88,9 +87,9 @@ vl (void *p)
 int
 vat_socket_connect (vat_main_t * vam)
 {
-  return vl_socket_client_connect
-    (&vam->socket_client_main, (char *) vam->socket_name,
-     "vpp_api_test(s)", 0 /* default socket rx, tx buffer */ );
+  vam->socket_client_main = &socket_client_main;
+  return vl_socket_client_connect ((char *) vam->socket_name, "vpp_api_test",
+                                  0 /* default socket rx, tx buffer */ );
 }
 #else /* vpp built-in case, we don't do sockets... */
 int
@@ -99,10 +98,23 @@ vat_socket_connect (vat_main_t * vam)
   return 0;
 }
 
-void
-vl_socket_client_read_reply (socket_client_main_t * scm)
+int
+vl_socket_client_read (int wait)
 {
+  return -1;
 };
+
+int
+vl_socket_client_write ()
+{
+  return -1;
+};
+
+void *
+vl_socket_client_msg_alloc (int nbytes)
+{
+  return 0;
+}
 #endif
 
 
@@ -1336,9 +1348,9 @@ vl_api_l2_macs_event_t_handler (vl_api_l2_macs_event_t * mp)
   for (i = 0; i < n_macs; i++)
     {
       vl_api_mac_entry_t *mac = &mp->mac[i];
-      errmsg (" [%d] sw_if_index %d  mac_addr %U  is_del %d \n",
+      errmsg (" [%d] sw_if_index %d  mac_addr %U  action %d \n",
              i + 1, ntohl (mac->sw_if_index),
-             format_ethernet_address, mac->mac_addr, mac->is_del);
+             format_ethernet_address, mac->mac_addr, mac->action);
       if (i == 1000)
        break;
     }
@@ -1464,7 +1476,8 @@ static void vl_api_control_ping_reply_t_handler
       vam->retval = retval;
       vam->result_ready = 1;
     }
-  vam->socket_client_main.control_pings_outstanding--;
+  if (vam->socket_client_main)
+    vam->socket_client_main->control_pings_outstanding--;
 }
 
 static void vl_api_control_ping_reply_t_handler_json
@@ -1970,6 +1983,7 @@ static void vl_api_vxlan_add_del_tunnel_reply_t_handler
       vam->sw_if_index = ntohl (mp->sw_if_index);
       vam->result_ready = 1;
     }
+  vam->regenerate_interface_table = 1;
 }
 
 static void vl_api_vxlan_add_del_tunnel_reply_t_handler_json
@@ -2038,6 +2052,7 @@ static void vl_api_vxlan_gpe_add_del_tunnel_reply_t_handler
       vam->sw_if_index = ntohl (mp->sw_if_index);
       vam->result_ready = 1;
     }
+  vam->regenerate_interface_table = 1;
 }
 
 static void vl_api_vxlan_gpe_add_del_tunnel_reply_t_handler_json
@@ -2106,6 +2121,7 @@ static void vl_api_create_vhost_user_if_reply_t_handler
       vam->sw_if_index = ntohl (mp->sw_if_index);
       vam->result_ready = 1;
     }
+  vam->regenerate_interface_table = 1;
 }
 
 static void vl_api_create_vhost_user_if_reply_t_handler_json
@@ -2186,10 +2202,10 @@ static void vl_api_memfd_segment_create_reply_t_handler
 #if VPP_API_TEST_BUILTIN == 0
   vat_main_t *vam = &vat_main;
   api_main_t *am = &api_main;
-  socket_client_main_t *scm = &vam->socket_client_main;
+  socket_client_main_t *scm = vam->socket_client_main;
   int my_fd = -1;
   clib_error_t *error;
-  memfd_private_t memfd;
+  ssvm_private_t memfd;
   i32 retval = ntohl (mp->retval);
 
   if (retval == 0)
@@ -2207,7 +2223,7 @@ static void vl_api_memfd_segment_create_reply_t_handler
       vam->client_index_invalid = 1;
 
       /* Note: this closes memfd.fd */
-      retval = memfd_slave_init (&memfd);
+      retval = ssvm_slave_init_memfd (&memfd);
       if (retval)
        clib_warning ("WARNING: segment map returned %d", retval);
 
@@ -2224,8 +2240,7 @@ static void vl_api_memfd_segment_create_reply_t_handler
                                        32 /* input_queue_length */ );
       vam->vl_input_queue = am->shmem_hdr->vl_input_queue;
 
-      vl_socket_client_enable_disable (&vam->socket_client_main,
-                                      0 /* disable socket */ );
+      vl_socket_client_enable_disable (0 /* disable socket */ );
     }
 
 out:
@@ -5149,6 +5164,7 @@ static void vl_api_ipsec_gre_add_del_tunnel_reply_t_handler
       vam->sw_if_index = ntohl (mp->sw_if_index);
       vam->result_ready = 1;
     }
+  vam->regenerate_interface_table = 1;
 }
 
 static void vl_api_ipsec_gre_add_del_tunnel_reply_t_handler_json
@@ -5375,7 +5391,8 @@ _(tcp_configure_src_addresses_reply)                      \
 _(dns_enable_disable_reply)                             \
 _(dns_name_server_add_del_reply)                       \
 _(session_rule_add_del_reply)                          \
-_(ip_container_proxy_add_del_reply)
+_(ip_container_proxy_add_del_reply)                     \
+_(output_acl_set_interface_reply)
 
 #define _(n)                                    \
     static void vl_api_##n##_t_handler          \
@@ -5703,6 +5720,7 @@ _(DNS_RESOLVE_IP_REPLY, dns_resolve_ip_reply)                             \
 _(SESSION_RULE_ADD_DEL_REPLY, session_rule_add_del_reply)              \
 _(SESSION_RULES_DETAILS, session_rules_details)                                \
 _(IP_CONTAINER_PROXY_ADD_DEL_REPLY, ip_container_proxy_add_del_reply)  \
+_(OUTPUT_ACL_SET_INTERFACE_REPLY, output_acl_set_interface_reply)       \
 
 #define foreach_standalone_reply_msg                                   \
 _(SW_INTERFACE_EVENT, sw_interface_event)                               \
@@ -6316,73 +6334,12 @@ api_sw_interface_dump (vat_main_t * vam)
   /* recreate the interface name hash table */
   vam->sw_if_index_by_interface_name = hash_create_string (0, sizeof (uword));
 
-  /* Get list of ethernets */
-  M (SW_INTERFACE_DUMP, mp);
-  mp->name_filter_valid = 1;
-  strncpy ((char *) mp->name_filter, "Ether", sizeof (mp->name_filter) - 1);
-  S (mp);
-
-  /* and local / loopback interfaces */
-  M (SW_INTERFACE_DUMP, mp);
-  mp->name_filter_valid = 1;
-  strncpy ((char *) mp->name_filter, "lo", sizeof (mp->name_filter) - 1);
-  S (mp);
-
-  /* and packet-generator interfaces */
-  M (SW_INTERFACE_DUMP, mp);
-  mp->name_filter_valid = 1;
-  strncpy ((char *) mp->name_filter, "pg", sizeof (mp->name_filter) - 1);
-  S (mp);
-
-  /* and vxlan-gpe tunnel interfaces */
-  M (SW_INTERFACE_DUMP, mp);
-  mp->name_filter_valid = 1;
-  strncpy ((char *) mp->name_filter, "vxlan_gpe",
-          sizeof (mp->name_filter) - 1);
-  S (mp);
-
-  /* and vxlan tunnel interfaces */
-  M (SW_INTERFACE_DUMP, mp);
-  mp->name_filter_valid = 1;
-  strncpy ((char *) mp->name_filter, "vxlan", sizeof (mp->name_filter) - 1);
-  S (mp);
-
-  /* and geneve tunnel interfaces */
-  M (SW_INTERFACE_DUMP, mp);
-  mp->name_filter_valid = 1;
-  strncpy ((char *) mp->name_filter, "geneve", sizeof (mp->name_filter) - 1);
-  S (mp);
-
-  /* and host (af_packet) interfaces */
-  M (SW_INTERFACE_DUMP, mp);
-  mp->name_filter_valid = 1;
-  strncpy ((char *) mp->name_filter, "host", sizeof (mp->name_filter) - 1);
-  S (mp);
-
-  /* and l2tpv3 tunnel interfaces */
-  M (SW_INTERFACE_DUMP, mp);
-  mp->name_filter_valid = 1;
-  strncpy ((char *) mp->name_filter, "l2tpv3_tunnel",
-          sizeof (mp->name_filter) - 1);
-  S (mp);
-
-  /* and GRE tunnel interfaces */
-  M (SW_INTERFACE_DUMP, mp);
-  mp->name_filter_valid = 1;
-  strncpy ((char *) mp->name_filter, "gre", sizeof (mp->name_filter) - 1);
-  S (mp);
-
-  /* and LISP-GPE interfaces */
-  M (SW_INTERFACE_DUMP, mp);
-  mp->name_filter_valid = 1;
-  strncpy ((char *) mp->name_filter, "lisp_gpe",
-          sizeof (mp->name_filter) - 1);
-  S (mp);
-
-  /* and IPSEC tunnel interfaces */
+  /*
+   * Ask for all interface names. Otherwise, the epic catalog of
+   * name filters becomes ridiculously long, and vat ends up needing
+   * to be taught about new interface types.
+   */
   M (SW_INTERFACE_DUMP, mp);
-  mp->name_filter_valid = 1;
-  strncpy ((char *) mp->name_filter, "ipsec", sizeof (mp->name_filter) - 1);
   S (mp);
 
   /* Use a control ping for synchronization */
@@ -7817,11 +7774,15 @@ api_tap_create_v2 (vat_main_t * vam)
   u8 host_mac_addr_set = 0;
   u8 *host_bridge = 0;
   ip4_address_t host_ip4_addr;
+  ip4_address_t host_ip4_gw;
+  u8 host_ip4_gw_set = 0;
   u32 host_ip4_prefix_len = 0;
   ip6_address_t host_ip6_addr;
+  ip6_address_t host_ip6_gw;
+  u8 host_ip6_gw_set = 0;
   u32 host_ip6_prefix_len = 0;
   int ret;
-  int rx_ring_sz = 0, tx_ring_sz = 0;
+  u32 rx_ring_sz = 0, tx_ring_sz = 0;
 
   memset (mac_address, 0, sizeof (mac_address));
 
@@ -7832,7 +7793,7 @@ api_tap_create_v2 (vat_main_t * vam)
        {
          random_mac = 0;
        }
-      else if (unformat (i, "id %s", &id))
+      else if (unformat (i, "id %u", &id))
        ;
       else if (unformat (i, "host-if-name %s", &host_if_name))
        ;
@@ -7849,6 +7810,12 @@ api_tap_create_v2 (vat_main_t * vam)
       else if (unformat (i, "host-ip6-addr %U/%d", unformat_ip6_address,
                         &host_ip6_addr, &host_ip6_prefix_len))
        ;
+      else if (unformat (i, "host-ip4-gw %U", unformat_ip4_address,
+                        &host_ip4_gw))
+       host_ip4_gw_set = 1;
+      else if (unformat (i, "host-ip6-gw %U", unformat_ip6_address,
+                        &host_ip6_gw))
+       host_ip6_gw_set = 1;
       else if (unformat (i, "rx-ring-size %d", &rx_ring_sz))
        ;
       else if (unformat (i, "tx-ring-size %d", &tx_ring_sz))
@@ -7908,15 +7875,15 @@ api_tap_create_v2 (vat_main_t * vam)
 
   mp->use_random_mac = random_mac;
 
-  mp->id = id;
+  mp->id = ntohl (id);
   mp->host_namespace_set = host_ns != 0;
   mp->host_bridge_set = host_bridge != 0;
   mp->host_ip4_addr_set = host_ip4_prefix_len != 0;
   mp->host_ip6_addr_set = host_ip6_prefix_len != 0;
-  mp->rx_ring_sz = rx_ring_sz;
-  mp->tx_ring_sz = tx_ring_sz;
+  mp->rx_ring_sz = ntohs (rx_ring_sz);
+  mp->tx_ring_sz = ntohs (tx_ring_sz);
 
-  if (random_mac)
+  if (random_mac == 0)
     clib_memcpy (mp->mac_address, mac_address, 6);
   if (host_mac_addr_set)
     clib_memcpy (mp->host_mac_addr, host_mac_addr, 6);
@@ -7930,7 +7897,10 @@ api_tap_create_v2 (vat_main_t * vam)
     clib_memcpy (mp->host_ip4_addr, &host_ip4_addr, 4);
   if (host_ip4_prefix_len)
     clib_memcpy (mp->host_ip6_addr, &host_ip6_addr, 16);
-
+  if (host_ip4_gw_set)
+    clib_memcpy (mp->host_ip4_gw, &host_ip4_gw, 4);
+  if (host_ip6_gw_set)
+    clib_memcpy (mp->host_ip6_gw, &host_ip6_gw, 16);
 
   vec_free (host_ns);
   vec_free (host_if_name);
@@ -8902,7 +8872,7 @@ api_bier_route_add_del (vat_main_t * vam)
     }
 
   /* Construct the API message */
-  M2 (BIER_ROUTE_ADD_DEL, mp, sizeof (vl_api_fib_path3_t));
+  M2 (BIER_ROUTE_ADD_DEL, mp, sizeof (vl_api_fib_path_t));
 
   mp->br_is_add = is_add;
   mp->br_tbl_id.bt_set = set;
@@ -8911,7 +8881,7 @@ api_bier_route_add_del (vat_main_t * vam)
   mp->br_bp = ntohs (bp);
   mp->br_n_paths = 1;
   mp->br_paths[0].n_labels = 1;
-  mp->br_paths[0].label_stack[0] = ntohl (next_hop_out_label);
+  mp->br_paths[0].label_stack[0].label = ntohl (next_hop_out_label);
   mp->br_paths[0].afi = (next_hop_proto_is_ip4 ? 0 : 1);
 
   if (next_hop_proto_is_ip4)
@@ -9576,7 +9546,7 @@ vl_api_dhcp_proxy_details_t_handler (vl_api_dhcp_proxy_details_t * mp)
   if (mp->is_ipv6)
     print (vam->ofp,
           "RX Table-ID %d, Source Address %U, VSS Type %d, "
-          "VSS VPN-ID '%s', VSS FIB-ID %d, VSS OUI %d",
+          "VSS ASCII VPN-ID '%s', VSS RFC2685 VPN-ID (oui:id) %d:%d",
           ntohl (mp->rx_vrf_id),
           format_ip6_address, mp->dhcp_src_address,
           mp->vss_type, mp->vss_vpn_ascii_id,
@@ -9584,7 +9554,7 @@ vl_api_dhcp_proxy_details_t_handler (vl_api_dhcp_proxy_details_t * mp)
   else
     print (vam->ofp,
           "RX Table-ID %d, Source Address %U, VSS Type %d, "
-          "VSS VPN-ID '%s', VSS FIB-ID %d, VSS OUI %d",
+          "VSS ASCII VPN-ID '%s', VSS RFC2685 VPN-ID (oui:id) %d:%d",
           ntohl (mp->rx_vrf_id),
           format_ip4_address, mp->dhcp_src_address,
           mp->vss_type, mp->vss_vpn_ascii_id,
@@ -12542,6 +12512,7 @@ api_vxlan_add_del_tunnel (vat_main_t * vam)
   u8 src_set = 0;
   u8 dst_set = 0;
   u8 grp_set = 0;
+  u32 instance = ~0;
   u32 mcast_sw_if_index = ~0;
   u32 encap_vrf_id = 0;
   u32 decap_next_index = ~0;
@@ -12556,6 +12527,8 @@ api_vxlan_add_del_tunnel (vat_main_t * vam)
     {
       if (unformat (line_input, "del"))
        is_add = 0;
+      else if (unformat (line_input, "instance %d", &instance))
+       ;
       else
        if (unformat (line_input, "src %U", unformat_ip4_address, &src.ip4))
        {
@@ -12675,6 +12648,8 @@ api_vxlan_add_del_tunnel (vat_main_t * vam)
       clib_memcpy (mp->src_address, &src.ip4, sizeof (src.ip4));
       clib_memcpy (mp->dst_address, &dst.ip4, sizeof (dst.ip4));
     }
+
+  mp->instance = htonl (instance);
   mp->encap_vrf_id = ntohl (encap_vrf_id);
   mp->decap_next_index = ntohl (decap_next_index);
   mp->mcast_sw_if_index = ntohl (mcast_sw_if_index);
@@ -12694,8 +12669,9 @@ static void vl_api_vxlan_tunnel_details_t_handler
   ip46_address_t src = to_ip46 (mp->is_ipv6, mp->dst_address);
   ip46_address_t dst = to_ip46 (mp->is_ipv6, mp->src_address);
 
-  print (vam->ofp, "%11d%24U%24U%14d%18d%13d%19d",
+  print (vam->ofp, "%11d%11d%24U%24U%14d%18d%13d%19d",
         ntohl (mp->sw_if_index),
+        ntohl (mp->instance),
         format_ip46_address, &src, IP46_TYPE_ANY,
         format_ip46_address, &dst, IP46_TYPE_ANY,
         ntohl (mp->encap_vrf_id),
@@ -12718,6 +12694,9 @@ static void vl_api_vxlan_tunnel_details_t_handler_json
 
   vat_json_init_object (node);
   vat_json_object_add_uint (node, "sw_if_index", ntohl (mp->sw_if_index));
+
+  vat_json_object_add_uint (node, "instance", ntohl (mp->instance));
+
   if (mp->is_ipv6)
     {
       struct in6_addr ip6;
@@ -12771,8 +12750,8 @@ api_vxlan_tunnel_dump (vat_main_t * vam)
 
   if (!vam->json_output)
     {
-      print (vam->ofp, "%11s%24s%24s%14s%18s%13s%19s",
-            "sw_if_index", "src_address", "dst_address",
+      print (vam->ofp, "%11s%11s%24s%24s%14s%18s%13s%19s",
+            "sw_if_index", "instance", "src_address", "dst_address",
             "encap_vrf_id", "decap_next_index", "vni", "mcast_sw_if_index");
     }
 
@@ -13076,10 +13055,12 @@ api_gre_add_del_tunnel (vat_main_t * vam)
   u8 is_add = 1;
   u8 ipv4_set = 0;
   u8 ipv6_set = 0;
-  u8 teb = 0;
+  u8 t_type = GRE_TUNNEL_TYPE_L3;
   u8 src_set = 0;
   u8 dst_set = 0;
   u32 outer_fib_id = 0;
+  u32 session_id = 0;
+  u32 instance = ~0;
   int ret;
 
   memset (&src4, 0, sizeof src4);
@@ -13091,6 +13072,8 @@ api_gre_add_del_tunnel (vat_main_t * vam)
     {
       if (unformat (line_input, "del"))
        is_add = 0;
+      else if (unformat (line_input, "instance %d", &instance))
+       ;
       else if (unformat (line_input, "src %U", unformat_ip4_address, &src4))
        {
          src_set = 1;
@@ -13114,7 +13097,9 @@ api_gre_add_del_tunnel (vat_main_t * vam)
       else if (unformat (line_input, "outer-fib-id %d", &outer_fib_id))
        ;
       else if (unformat (line_input, "teb"))
-       teb = 1;
+       t_type = GRE_TUNNEL_TYPE_TEB;
+      else if (unformat (line_input, "erspan %d", &session_id))
+       t_type = GRE_TUNNEL_TYPE_ERSPAN;
       else
        {
          errmsg ("parse error '%U'", format_unformat_error, line_input);
@@ -13151,9 +13136,11 @@ api_gre_add_del_tunnel (vat_main_t * vam)
       clib_memcpy (&mp->src_address, &src6, 16);
       clib_memcpy (&mp->dst_address, &dst6, 16);
     }
-  mp->outer_fib_id = ntohl (outer_fib_id);
+  mp->instance = htonl (instance);
+  mp->outer_fib_id = htonl (outer_fib_id);
   mp->is_add = is_add;
-  mp->teb = teb;
+  mp->session_id = htons ((u16) session_id);
+  mp->tunnel_type = t_type;
   mp->is_ipv6 = ipv6_set;
 
   S (mp);
@@ -13168,11 +13155,12 @@ static void vl_api_gre_tunnel_details_t_handler
   ip46_address_t src = to_ip46 (mp->is_ipv6, mp->src_address);
   ip46_address_t dst = to_ip46 (mp->is_ipv6, mp->dst_address);
 
-  print (vam->ofp, "%11d%24U%24U%6d%14d",
+  print (vam->ofp, "%11d%11d%24U%24U%13d%14d%12d",
         ntohl (mp->sw_if_index),
+        ntohl (mp->instance),
         format_ip46_address, &src, IP46_TYPE_ANY,
         format_ip46_address, &dst, IP46_TYPE_ANY,
-        mp->teb, ntohl (mp->outer_fib_id));
+        mp->tunnel_type, ntohl (mp->outer_fib_id), ntohl (mp->session_id));
 }
 
 static void vl_api_gre_tunnel_details_t_handler_json
@@ -13192,6 +13180,7 @@ static void vl_api_gre_tunnel_details_t_handler_json
 
   vat_json_init_object (node);
   vat_json_object_add_uint (node, "sw_if_index", ntohl (mp->sw_if_index));
+  vat_json_object_add_uint (node, "instance", ntohl (mp->instance));
   if (!mp->is_ipv6)
     {
       clib_memcpy (&ip4, &mp->src_address, sizeof (ip4));
@@ -13206,9 +13195,10 @@ static void vl_api_gre_tunnel_details_t_handler_json
       clib_memcpy (&ip6, &mp->dst_address, sizeof (ip6));
       vat_json_object_add_ip6 (node, "dst_address", ip6);
     }
-  vat_json_object_add_uint (node, "teb", mp->teb);
+  vat_json_object_add_uint (node, "tunnel_type", mp->tunnel_type);
   vat_json_object_add_uint (node, "outer_fib_id", ntohl (mp->outer_fib_id));
   vat_json_object_add_uint (node, "is_ipv6", mp->is_ipv6);
+  vat_json_object_add_uint (node, "session_id", mp->session_id);
 }
 
 static int
@@ -13237,9 +13227,9 @@ api_gre_tunnel_dump (vat_main_t * vam)
 
   if (!vam->json_output)
     {
-      print (vam->ofp, "%11s%24s%24s%6s%14s",
-            "sw_if_index", "src_address", "dst_address", "teb",
-            "outer_fib_id");
+      print (vam->ofp, "%11s%11s%24s%24s%13s%14s%12s",
+            "sw_if_index", "instance", "src_address", "dst_address",
+            "tunnel_type", "outer_fib_id", "session_id");
     }
 
   /* Get list of gre-tunnel interfaces */
@@ -14170,6 +14160,59 @@ api_input_acl_set_interface (vat_main_t * vam)
   return ret;
 }
 
+static int
+api_output_acl_set_interface (vat_main_t * vam)
+{
+  unformat_input_t *i = vam->input;
+  vl_api_output_acl_set_interface_t *mp;
+  u32 sw_if_index;
+  int sw_if_index_set;
+  u32 ip4_table_index = ~0;
+  u32 ip6_table_index = ~0;
+  u32 l2_table_index = ~0;
+  u8 is_add = 1;
+  int ret;
+
+  while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
+    {
+      if (unformat (i, "%U", api_unformat_sw_if_index, vam, &sw_if_index))
+       sw_if_index_set = 1;
+      else if (unformat (i, "sw_if_index %d", &sw_if_index))
+       sw_if_index_set = 1;
+      else if (unformat (i, "del"))
+       is_add = 0;
+      else if (unformat (i, "ip4-table %d", &ip4_table_index))
+       ;
+      else if (unformat (i, "ip6-table %d", &ip6_table_index))
+       ;
+      else if (unformat (i, "l2-table %d", &l2_table_index))
+       ;
+      else
+       {
+         clib_warning ("parse error '%U'", format_unformat_error, i);
+         return -99;
+       }
+    }
+
+  if (sw_if_index_set == 0)
+    {
+      errmsg ("missing interface name or sw_if_index");
+      return -99;
+    }
+
+  M (OUTPUT_ACL_SET_INTERFACE, mp);
+
+  mp->sw_if_index = ntohl (sw_if_index);
+  mp->ip4_table_index = ntohl (ip4_table_index);
+  mp->ip6_table_index = ntohl (ip6_table_index);
+  mp->l2_table_index = ntohl (l2_table_index);
+  mp->is_add = is_add;
+
+  S (mp);
+  W (ret);
+  return ret;
+}
+
 static int
 api_ip_address_dump (vat_main_t * vam)
 {
@@ -19591,7 +19634,7 @@ api_netmap_delete (vat_main_t * vam)
 }
 
 static void
-vl_api_mpls_fib_path_print (vat_main_t * vam, vl_api_fib_path2_t * fp)
+vl_api_mpls_fib_path_print (vat_main_t * vam, vl_api_fib_path_t * fp)
 {
   if (fp->afi == IP46_TYPE_IP6)
     print (vam->ofp,
@@ -19611,7 +19654,7 @@ vl_api_mpls_fib_path_print (vat_main_t * vam, vl_api_fib_path2_t * fp)
 
 static void
 vl_api_mpls_fib_path_json_print (vat_json_node_t * node,
-                                vl_api_fib_path2_t * fp)
+                                vl_api_fib_path_t * fp)
 {
   struct in_addr ip4;
   struct in6_addr ip6;
@@ -19640,7 +19683,7 @@ vl_api_mpls_tunnel_details_t_handler (vl_api_mpls_tunnel_details_t * mp)
 {
   vat_main_t *vam = &vat_main;
   int count = ntohl (mp->mt_count);
-  vl_api_fib_path2_t *fp;
+  vl_api_fib_path_t *fp;
   i32 i;
 
   print (vam->ofp, "[%d]: sw_if_index %d via:",
@@ -19664,7 +19707,7 @@ vl_api_mpls_tunnel_details_t_handler_json (vl_api_mpls_tunnel_details_t * mp)
   vat_main_t *vam = &vat_main;
   vat_json_node_t *node = NULL;
   int count = ntohl (mp->mt_count);
-  vl_api_fib_path2_t *fp;
+  vl_api_fib_path_t *fp;
   i32 i;
 
   if (VAT_JSON_ARRAY != vam->json_tree.type)
@@ -19730,7 +19773,7 @@ vl_api_mpls_fib_details_t_handler (vl_api_mpls_fib_details_t * mp)
 {
   vat_main_t *vam = &vat_main;
   int count = ntohl (mp->count);
-  vl_api_fib_path2_t *fp;
+  vl_api_fib_path_t *fp;
   int i;
 
   print (vam->ofp,
@@ -19750,7 +19793,7 @@ static void vl_api_mpls_fib_details_t_handler_json
   vat_main_t *vam = &vat_main;
   int count = ntohl (mp->count);
   vat_json_node_t *node = NULL;
-  vl_api_fib_path2_t *fp;
+  vl_api_fib_path_t *fp;
   int i;
 
   if (VAT_JSON_ARRAY != vam->json_tree.type)
@@ -20479,8 +20522,9 @@ vl_api_sw_interface_span_details_t_handler (vl_api_sw_interface_span_details_t
       }
   }));
   /* *INDENT-ON* */
-  print (vam->ofp, "%20s => %20s (%s)",
-        sw_if_from_name, sw_if_to_name, states[mp->state]);
+  print (vam->ofp, "%20s => %20s (%s) %s",
+        sw_if_from_name, sw_if_to_name, states[mp->state],
+        mp->is_l2 ? "l2" : "device");
 }
 
 static void
@@ -20529,6 +20573,7 @@ static void
       vat_json_object_add_string_copy (node, "dst-if-name", sw_if_to_name);
     }
   vat_json_object_add_uint (node, "state", mp->state);
+  vat_json_object_add_uint (node, "is-l2", mp->is_l2);
 }
 
 static int
@@ -21865,6 +21910,46 @@ api_memfd_segment_create (vat_main_t * vam)
 #endif
 }
 
+static int
+api_sock_init_shm (vat_main_t * vam)
+{
+#if VPP_API_TEST_BUILTIN == 0
+  unformat_input_t *i = vam->input;
+  vl_api_shm_elem_config_t *config = 0;
+  u64 size = 64 << 20;
+  int rv;
+
+  while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
+    {
+      if (unformat (i, "size %U", unformat_memory_size, &size))
+       ;
+      else
+       break;
+    }
+
+  /* Try customized config to see if it works */
+  vec_validate (config, 3);
+  config[0].type = VL_API_VLIB_RING;
+  config[0].count = 256;
+  config[0].size = 256;
+  config[1].type = VL_API_CLIENT_RING;
+  config[1].count = 256;
+  config[1].size = 1024;
+  config[2].type = VL_API_CLIENT_RING;
+  config[2].count = 8;
+  config[2].size = 4096;
+  config[3].type = VL_API_QUEUE;
+  config[3].count = 256;
+  config[3].size = sizeof (uword);
+  rv = vl_socket_client_init_shm (config);
+  if (!rv)
+    vam->client_index_invalid = 1;
+  return rv;
+#else
+  return -99;
+#endif
+}
+
 static int
 api_dns_enable_disable (vat_main_t * vam)
 {
@@ -22518,7 +22603,7 @@ get_msg_id (vat_main_t * vam)
 
   if (unformat (vam->input, "%s", &name_and_crc))
     {
-      message_index = vl_api_get_msg_index (name_and_crc);
+      message_index = vl_msg_api_get_msg_index (name_and_crc);
       if (message_index == ~0)
        {
          print (vam->ofp, " '%s' not found", name_and_crc);
@@ -22693,7 +22778,7 @@ _(tap_delete,                                                           \
   "<vpp-if-name> | sw_if_index <id>")                                   \
 _(sw_interface_tap_dump, "")                                            \
 _(tap_create_v2,                                                        \
-  "name <name> [hw-addr <mac-addr>] [host-ns <name>] [rx-ring-size <num> [tx-ring-size <num>]") \
+  "id <num> [hw-addr <mac-addr>] [host-ns <name>] [rx-ring-size <num> [tx-ring-size <num>]") \
 _(tap_delete_v2,                                                        \
   "<vpp-if-name> | sw_if_index <id>")                                   \
 _(sw_interface_tap_v2_dump, "")                                         \
@@ -22804,7 +22889,7 @@ _(l2tpv3_set_lookup_key,                                                \
 _(sw_if_l2tpv3_tunnel_dump, "")                                         \
 _(vxlan_add_del_tunnel,                                                 \
   "src <ip-addr> { dst <ip-addr> | group <mcast-ip-addr>\n"             \
-  "{ <intfc> | mcast_sw_if_index <nn> } }\n"                            \
+  "{ <intfc> | mcast_sw_if_index <nn> } [instance <id>]}\n"            \
   "vni <vni> [encap-vrf-id <nn>] [decap-next <l2|nn>] [del]")           \
 _(geneve_add_del_tunnel,                                                \
   "src <ip-addr> { dst <ip-addr> | group <mcast-ip-addr>\n"             \
@@ -22813,7 +22898,8 @@ _(geneve_add_del_tunnel,                                                \
 _(vxlan_tunnel_dump, "[<intfc> | sw_if_index <nn>]")                    \
 _(geneve_tunnel_dump, "[<intfc> | sw_if_index <nn>]")                   \
 _(gre_add_del_tunnel,                                                   \
-  "src <ip-addr> dst <ip-addr> [outer-fib-id <nn>] [teb] [del]\n")    \
+  "src <ip-addr> dst <ip-addr> [outer-fib-id <nn>] [instance <n>]\n"    \
+  "[teb | erspan <session-id>] [del]")                                 \
 _(gre_tunnel_dump, "[<intfc> | sw_if_index <nn>]")                      \
 _(l2_fib_clear_table, "")                                               \
 _(l2_interface_efp_filter, "sw_if_index <nn> enable | disable")         \
@@ -23093,6 +23179,7 @@ _(sw_interface_set_lldp, "<intfc> | sw_if_index <nn> [port-desc <description>]\n
   " [mgmt-ip4 <ip4>] [mgmt-ip6 <ip6>] [mgmt-oid <object id>] [disable]") \
 _(tcp_configure_src_addresses, "<ip4|6>first-<ip4|6>last [vrf <id>]")  \
 _(memfd_segment_create,"size <nnn>")                                   \
+_(sock_init_shm, "size <nnn>")                                         \
 _(app_namespace_add_del, "[add] id <ns-id> secret <nn> sw_if_index <nn>")\
 _(dns_enable_disable, "[enable][disable]")                             \
 _(dns_name_server_add_del, "<ip-address> [del]")                       \
@@ -23104,6 +23191,9 @@ _(session_rule_add_del, "[add|del] proto <tcp/udp> <lcl-ip>/<plen> "    \
   "<lcl-port> <rmt-ip>/<plen> <rmt-port> action <nn>")                 \
 _(session_rules_dump, "")                                              \
 _(ip_container_proxy_add_del, "[add|del] <address> <sw_if_index>")     \
+_(output_acl_set_interface,                                             \
+  "<intfc> | sw_if_index <nn> [ip4-table <nn>] [ip6-table <nn>]\n"      \
+  "  [l2-table <nn>] [del]")                                            \
 
 /* List of command functions, CLI names map directly to functions */
 #define foreach_cli_function                                    \