lldp: Move to plugin
[vpp.git] / src / vat / api_format.c
index cc0f5be..0d0ec59 100644 (file)
@@ -29,7 +29,6 @@
 #include <vnet/l2/l2_input.h>
 #include <vnet/l2tp/l2tp.h>
 #include <vnet/vxlan/vxlan.h>
-#include <vnet/geneve/geneve.h>
 #include <vnet/gre/gre.h>
 #include <vnet/vxlan-gpe/vxlan_gpe.h>
 #include <vnet/lisp-gpe/lisp_gpe.h>
@@ -1828,6 +1827,41 @@ static void vl_api_virtio_pci_create_reply_t_handler_json
 
 }
 
+static void
+  vl_api_virtio_pci_create_v2_reply_t_handler
+  (vl_api_virtio_pci_create_v2_reply_t * mp)
+{
+  vat_main_t *vam = &vat_main;
+  i32 retval = ntohl (mp->retval);
+  if (vam->async_mode)
+    {
+      vam->async_errors += (retval < 0);
+    }
+  else
+    {
+      vam->retval = retval;
+      vam->sw_if_index = ntohl (mp->sw_if_index);
+      vam->result_ready = 1;
+    }
+}
+
+static void vl_api_virtio_pci_create_v2_reply_t_handler_json
+  (vl_api_virtio_pci_create_v2_reply_t * mp)
+{
+  vat_main_t *vam = &vat_main;
+  vat_json_node_t node;
+
+  vat_json_init_object (&node);
+  vat_json_object_add_int (&node, "retval", ntohl (mp->retval));
+  vat_json_object_add_uint (&node, "sw_if_index", ntohl (mp->sw_if_index));
+
+  vat_json_print (vam->ofp, &node);
+  vat_json_free (&node);
+
+  vam->retval = ntohl (mp->retval);
+  vam->result_ready = 1;
+}
+
 static void
 vl_api_virtio_pci_delete_reply_t_handler (vl_api_virtio_pci_delete_reply_t *
                                          mp)
@@ -1896,6 +1930,41 @@ static void vl_api_bond_create_reply_t_handler_json
   vam->result_ready = 1;
 }
 
+static void
+vl_api_bond_create2_reply_t_handler (vl_api_bond_create2_reply_t * mp)
+{
+  vat_main_t *vam = &vat_main;
+  i32 retval = ntohl (mp->retval);
+
+  if (vam->async_mode)
+    {
+      vam->async_errors += (retval < 0);
+    }
+  else
+    {
+      vam->retval = retval;
+      vam->sw_if_index = ntohl (mp->sw_if_index);
+      vam->result_ready = 1;
+    }
+}
+
+static void vl_api_bond_create2_reply_t_handler_json
+  (vl_api_bond_create2_reply_t * mp)
+{
+  vat_main_t *vam = &vat_main;
+  vat_json_node_t node;
+
+  vat_json_init_object (&node);
+  vat_json_object_add_int (&node, "retval", ntohl (mp->retval));
+  vat_json_object_add_uint (&node, "sw_if_index", ntohl (mp->sw_if_index));
+
+  vat_json_print (vam->ofp, &node);
+  vat_json_free (&node);
+
+  vam->retval = ntohl (mp->retval);
+  vam->result_ready = 1;
+}
+
 static void
 vl_api_bond_delete_reply_t_handler (vl_api_bond_delete_reply_t * mp)
 {
@@ -2453,40 +2522,6 @@ static void vl_api_vxlan_offload_rx_reply_t_handler_json
   vam->result_ready = 1;
 }
 
-static void vl_api_geneve_add_del_tunnel_reply_t_handler
-  (vl_api_geneve_add_del_tunnel_reply_t * mp)
-{
-  vat_main_t *vam = &vat_main;
-  i32 retval = ntohl (mp->retval);
-  if (vam->async_mode)
-    {
-      vam->async_errors += (retval < 0);
-    }
-  else
-    {
-      vam->retval = retval;
-      vam->sw_if_index = ntohl (mp->sw_if_index);
-      vam->result_ready = 1;
-    }
-}
-
-static void vl_api_geneve_add_del_tunnel_reply_t_handler_json
-  (vl_api_geneve_add_del_tunnel_reply_t * mp)
-{
-  vat_main_t *vam = &vat_main;
-  vat_json_node_t node;
-
-  vat_json_init_object (&node);
-  vat_json_object_add_int (&node, "retval", ntohl (mp->retval));
-  vat_json_object_add_uint (&node, "sw_if_index", ntohl (mp->sw_if_index));
-
-  vat_json_print (vam->ofp, &node);
-  vat_json_free (&node);
-
-  vam->retval = ntohl (mp->retval);
-  vam->result_ready = 1;
-}
-
 static void vl_api_vxlan_gpe_add_del_tunnel_reply_t_handler
   (vl_api_vxlan_gpe_add_del_tunnel_reply_t * mp)
 {
@@ -5052,7 +5087,6 @@ _(sw_interface_set_table_reply)                         \
 _(sw_interface_set_mpls_enable_reply)                   \
 _(sw_interface_set_vpath_reply)                         \
 _(sw_interface_set_vxlan_bypass_reply)                  \
-_(sw_interface_set_geneve_bypass_reply)                 \
 _(sw_interface_set_vxlan_gpe_bypass_reply)              \
 _(sw_interface_set_l2_bridge_reply)                     \
 _(sw_interface_set_bond_weight_reply)                   \
@@ -5149,6 +5183,7 @@ _(flow_classify_set_interface_reply)                    \
 _(sw_interface_span_enable_disable_reply)               \
 _(pg_capture_reply)                                     \
 _(pg_enable_disable_reply)                              \
+_(pg_interface_enable_disable_coalesce_reply)           \
 _(ip_source_and_port_range_check_add_del_reply)         \
 _(ip_source_and_port_range_check_interface_add_del_reply)\
 _(delete_subif_reply)                                   \
@@ -5161,13 +5196,12 @@ _(sw_interface_add_del_mac_address_reply)               \
 _(hw_interface_set_mtu_reply)                           \
 _(p2p_ethernet_add_reply)                               \
 _(p2p_ethernet_del_reply)                               \
-_(lldp_config_reply)                                    \
-_(sw_interface_set_lldp_reply)                         \
 _(tcp_configure_src_addresses_reply)                   \
 _(session_rule_add_del_reply)                          \
 _(ip_container_proxy_add_del_reply)                     \
 _(output_acl_set_interface_reply)                       \
-_(qos_record_enable_disable_reply)
+_(qos_record_enable_disable_reply)                     \
+_(flow_add_reply)
 
 #define _(n)                                    \
     static void vl_api_##n##_t_handler          \
@@ -5222,7 +5256,6 @@ _(SW_INTERFACE_SET_TABLE_REPLY, sw_interface_set_table_reply)             \
 _(SW_INTERFACE_SET_MPLS_ENABLE_REPLY, sw_interface_set_mpls_enable_reply) \
 _(SW_INTERFACE_SET_VPATH_REPLY, sw_interface_set_vpath_reply)          \
 _(SW_INTERFACE_SET_VXLAN_BYPASS_REPLY, sw_interface_set_vxlan_bypass_reply) \
-_(SW_INTERFACE_SET_GENEVE_BYPASS_REPLY, sw_interface_set_geneve_bypass_reply) \
 _(SW_INTERFACE_SET_VXLAN_GPE_BYPASS_REPLY, sw_interface_set_vxlan_gpe_bypass_reply) \
 _(SW_INTERFACE_SET_L2_XCONNECT_REPLY,                                   \
   sw_interface_set_l2_xconnect_reply)                                   \
@@ -5240,9 +5273,11 @@ _(TAP_CREATE_V2_REPLY, tap_create_v2_reply)                              \
 _(TAP_DELETE_V2_REPLY, tap_delete_v2_reply)                            \
 _(SW_INTERFACE_TAP_V2_DETAILS, sw_interface_tap_v2_details)             \
 _(VIRTIO_PCI_CREATE_REPLY, virtio_pci_create_reply)                    \
+_(VIRTIO_PCI_CREATE_V2_REPLY, virtio_pci_create_v2_reply)              \
 _(VIRTIO_PCI_DELETE_REPLY, virtio_pci_delete_reply)                    \
 _(SW_INTERFACE_VIRTIO_PCI_DETAILS, sw_interface_virtio_pci_details)     \
 _(BOND_CREATE_REPLY, bond_create_reply)                                        \
+_(BOND_CREATE2_REPLY, bond_create2_reply)                              \
 _(BOND_DELETE_REPLY, bond_delete_reply)                                        \
 _(BOND_ADD_MEMBER_REPLY, bond_add_member_reply)                                \
 _(BOND_DETACH_MEMBER_REPLY, bond_detach_member_reply)                  \
@@ -5293,9 +5328,7 @@ _(L2TPV3_SET_LOOKUP_KEY_REPLY, l2tpv3_set_lookup_key_reply)             \
 _(SW_IF_L2TPV3_TUNNEL_DETAILS, sw_if_l2tpv3_tunnel_details)             \
 _(VXLAN_ADD_DEL_TUNNEL_REPLY, vxlan_add_del_tunnel_reply)               \
 _(VXLAN_OFFLOAD_RX_REPLY, vxlan_offload_rx_reply)               \
-_(GENEVE_ADD_DEL_TUNNEL_REPLY, geneve_add_del_tunnel_reply)             \
 _(VXLAN_TUNNEL_DETAILS, vxlan_tunnel_details)                           \
-_(GENEVE_TUNNEL_DETAILS, geneve_tunnel_details)                         \
 _(GRE_TUNNEL_ADD_DEL_REPLY, gre_tunnel_add_del_reply)                   \
 _(GRE_TUNNEL_DETAILS, gre_tunnel_details)                               \
 _(L2_FIB_CLEAR_TABLE_REPLY, l2_fib_clear_table_reply)                   \
@@ -5438,6 +5471,7 @@ _(GET_NEXT_INDEX_REPLY, get_next_index_reply)                           \
 _(PG_CREATE_INTERFACE_REPLY, pg_create_interface_reply)                 \
 _(PG_CAPTURE_REPLY, pg_capture_reply)                                   \
 _(PG_ENABLE_DISABLE_REPLY, pg_enable_disable_reply)                     \
+_(PG_INTERFACE_ENABLE_DISABLE_COALESCE_REPLY, pg_interface_enable_disable_coalesce_reply) \
 _(IP_SOURCE_AND_PORT_RANGE_CHECK_ADD_DEL_REPLY,                         \
  ip_source_and_port_range_check_add_del_reply)                          \
 _(IP_SOURCE_AND_PORT_RANGE_CHECK_INTERFACE_ADD_DEL_REPLY,               \
@@ -5456,15 +5490,14 @@ _(HW_INTERFACE_SET_MTU_REPLY, hw_interface_set_mtu_reply)               \
 _(SW_INTERFACE_GET_TABLE_REPLY, sw_interface_get_table_reply)           \
 _(P2P_ETHERNET_ADD_REPLY, p2p_ethernet_add_reply)                       \
 _(P2P_ETHERNET_DEL_REPLY, p2p_ethernet_del_reply)                       \
-_(LLDP_CONFIG_REPLY, lldp_config_reply)                                 \
-_(SW_INTERFACE_SET_LLDP_REPLY, sw_interface_set_lldp_reply)            \
 _(TCP_CONFIGURE_SRC_ADDRESSES_REPLY, tcp_configure_src_addresses_reply)        \
 _(APP_NAMESPACE_ADD_DEL_REPLY, app_namespace_add_del_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)       \
-_(QOS_RECORD_ENABLE_DISABLE_REPLY, qos_record_enable_disable_reply)
+_(QOS_RECORD_ENABLE_DISABLE_REPLY, qos_record_enable_disable_reply)            \
+_(FLOW_ADD_REPLY, flow_add_reply)   \
 
 #define foreach_standalone_reply_msg                                   \
 _(SW_INTERFACE_EVENT, sw_interface_event)
@@ -6451,57 +6484,6 @@ api_sw_interface_set_vxlan_bypass (vat_main_t * vam)
   return ret;
 }
 
-static int
-api_sw_interface_set_geneve_bypass (vat_main_t * vam)
-{
-  unformat_input_t *i = vam->input;
-  vl_api_sw_interface_set_geneve_bypass_t *mp;
-  u32 sw_if_index = 0;
-  u8 sw_if_index_set = 0;
-  u8 is_enable = 1;
-  u8 is_ipv6 = 0;
-  int ret;
-
-  /* Parse args required to build the message */
-  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, "enable"))
-       is_enable = 1;
-      else if (unformat (i, "disable"))
-       is_enable = 0;
-      else if (unformat (i, "ip4"))
-       is_ipv6 = 0;
-      else if (unformat (i, "ip6"))
-       is_ipv6 = 1;
-      else
-       break;
-    }
-
-  if (sw_if_index_set == 0)
-    {
-      errmsg ("missing interface name or sw_if_index");
-      return -99;
-    }
-
-  /* Construct the API message */
-  M (SW_INTERFACE_SET_GENEVE_BYPASS, mp);
-
-  mp->sw_if_index = ntohl (sw_if_index);
-  mp->enable = is_enable;
-  mp->is_ipv6 = is_ipv6;
-
-  /* send it... */
-  S (mp);
-
-  /* Wait for a reply... */
-  W (ret);
-  return ret;
-}
-
 static int
 api_sw_interface_set_l2_xconnect (vat_main_t * vam)
 {
@@ -7386,6 +7368,10 @@ api_tap_create_v2 (vat_main_t * vam)
        tap_flags |= TAP_API_FLAG_TUN;
       else if (unformat (i, "gro-coalesce"))
        tap_flags |= TAP_API_FLAG_GRO_COALESCE;
+      else if (unformat (i, "packed"))
+       tap_flags |= TAP_API_FLAG_PACKED;
+      else if (unformat (i, "in-order"))
+       tap_flags |= TAP_API_FLAG_IN_ORDER;
       else
        break;
     }
@@ -7555,16 +7541,15 @@ unformat_vlib_pci_addr (unformat_input_t * input, va_list * args)
 }
 
 static int
-api_virtio_pci_create (vat_main_t * vam)
+api_virtio_pci_create_v2 (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
-  vl_api_virtio_pci_create_t *mp;
+  vl_api_virtio_pci_create_v2_t *mp;
   u8 mac_address[6];
   u8 random_mac = 1;
-  u8 gso_enabled = 0;
-  u8 checksum_offload_enabled = 0;
   u32 pci_addr = 0;
   u64 features = (u64) ~ (0ULL);
+  u32 virtio_flags = 0;
   int ret;
 
   clib_memset (mac_address, 0, sizeof (mac_address));
@@ -7581,9 +7566,15 @@ api_virtio_pci_create (vat_main_t * vam)
       else if (unformat (i, "features 0x%llx", &features))
        ;
       else if (unformat (i, "gso-enabled"))
-       gso_enabled = 1;
+       virtio_flags |= VIRTIO_API_FLAG_GSO;
       else if (unformat (i, "csum-offload-enabled"))
-       checksum_offload_enabled = 1;
+       virtio_flags |= VIRTIO_API_FLAG_CSUM_OFFLOAD;
+      else if (unformat (i, "gro-coalesce"))
+       virtio_flags |= VIRTIO_API_FLAG_GRO_COALESCE;
+      else if (unformat (i, "packed"))
+       virtio_flags |= VIRTIO_API_FLAG_PACKED;
+      else if (unformat (i, "in-order"))
+       virtio_flags |= VIRTIO_API_FLAG_IN_ORDER;
       else
        break;
     }
@@ -7595,7 +7586,7 @@ api_virtio_pci_create (vat_main_t * vam)
     }
 
   /* Construct the API message */
-  M (VIRTIO_PCI_CREATE, mp);
+  M (VIRTIO_PCI_CREATE_V2, mp);
 
   mp->use_random_mac = random_mac;
 
@@ -7605,8 +7596,7 @@ api_virtio_pci_create (vat_main_t * vam)
   mp->pci_addr.function = ((vlib_pci_addr_t) pci_addr).function;
 
   mp->features = clib_host_to_net_u64 (features);
-  mp->gso_enabled = gso_enabled;
-  mp->checksum_offload_enabled = checksum_offload_enabled;
+  mp->virtio_flags = clib_host_to_net_u32 (virtio_flags);
 
   if (random_mac == 0)
     clib_memcpy (mp->mac_address, mac_address, 6);
@@ -7721,6 +7711,73 @@ api_bond_create (vat_main_t * vam)
   return ret;
 }
 
+static int
+api_bond_create2 (vat_main_t * vam)
+{
+  unformat_input_t *i = vam->input;
+  vl_api_bond_create2_t *mp;
+  u8 mac_address[6];
+  u8 custom_mac = 0;
+  int ret;
+  u8 mode;
+  u8 lb;
+  u8 mode_is_set = 0;
+  u32 id = ~0;
+  u8 numa_only = 0;
+  u8 gso = 0;
+
+  clib_memset (mac_address, 0, sizeof (mac_address));
+  lb = BOND_LB_L2;
+
+  /* Parse args required to build the message */
+  while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
+    {
+      if (unformat (i, "mode %U", unformat_bond_mode, &mode))
+       mode_is_set = 1;
+      else if (((mode == BOND_MODE_LACP) || (mode == BOND_MODE_XOR))
+              && unformat (i, "lb %U", unformat_bond_load_balance, &lb))
+       ;
+      else if (unformat (i, "hw-addr %U", unformat_ethernet_address,
+                        mac_address))
+       custom_mac = 1;
+      else if (unformat (i, "numa-only"))
+       numa_only = 1;
+      else if (unformat (i, "gso"))
+       gso = 1;
+      else if (unformat (i, "id %u", &id))
+       ;
+      else
+       break;
+    }
+
+  if (mode_is_set == 0)
+    {
+      errmsg ("Missing bond mode. ");
+      return -99;
+    }
+
+  /* Construct the API message */
+  M (BOND_CREATE2, mp);
+
+  mp->use_custom_mac = custom_mac;
+
+  mp->mode = htonl (mode);
+  mp->lb = htonl (lb);
+  mp->id = htonl (id);
+  mp->numa_only = numa_only;
+  mp->enable_gso = gso;
+
+  if (custom_mac)
+    clib_memcpy (mp->mac_address, mac_address, 6);
+
+  /* send it... */
+  S (mp);
+
+  /* Wait for a reply... */
+  W (ret);
+  return ret;
+}
+
 static int
 api_bond_delete (vat_main_t * vam)
 {
@@ -11871,331 +11928,45 @@ api_vxlan_tunnel_dump (vat_main_t * vam)
   return ret;
 }
 
-static uword unformat_geneve_decap_next
-  (unformat_input_t * input, va_list * args)
-{
-  u32 *result = va_arg (*args, u32 *);
-  u32 tmp;
-
-  if (unformat (input, "l2"))
-    *result = GENEVE_INPUT_NEXT_L2_INPUT;
-  else if (unformat (input, "%d", &tmp))
-    *result = tmp;
-  else
-    return 0;
-  return 1;
-}
-
 static int
-api_geneve_add_del_tunnel (vat_main_t * vam)
+api_gre_tunnel_add_del (vat_main_t * vam)
 {
   unformat_input_t *line_input = vam->input;
-  vl_api_geneve_add_del_tunnel_t *mp;
-  ip46_address_t src, dst;
+  vl_api_address_t src = { }, dst =
+  {
+  };
+  vl_api_gre_tunnel_add_del_t *mp;
+  vl_api_gre_tunnel_type_t t_type;
   u8 is_add = 1;
-  u8 ipv4_set = 0, ipv6_set = 0;
   u8 src_set = 0;
   u8 dst_set = 0;
-  u8 grp_set = 0;
-  u32 mcast_sw_if_index = ~0;
-  u32 encap_vrf_id = 0;
-  u32 decap_next_index = ~0;
-  u32 vni = 0;
+  u32 outer_table_id = 0;
+  u32 session_id = 0;
+  u32 instance = ~0;
   int ret;
 
-  /* Can't "universally zero init" (={0}) due to GCC bug 53119 */
-  clib_memset (&src, 0, sizeof src);
-  clib_memset (&dst, 0, sizeof dst);
+  t_type = GRE_API_TUNNEL_TYPE_L3;
 
   while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
     {
       if (unformat (line_input, "del"))
        is_add = 0;
-      else
-       if (unformat (line_input, "src %U", unformat_ip4_address, &src.ip4))
+      else if (unformat (line_input, "instance %d", &instance))
+       ;
+      else if (unformat (line_input, "src %U", unformat_vl_api_address, &src))
        {
-         ipv4_set = 1;
          src_set = 1;
        }
-      else
-       if (unformat (line_input, "dst %U", unformat_ip4_address, &dst.ip4))
+      else if (unformat (line_input, "dst %U", unformat_vl_api_address, &dst))
        {
-         ipv4_set = 1;
          dst_set = 1;
        }
-      else
-       if (unformat (line_input, "src %U", unformat_ip6_address, &src.ip6))
-       {
-         ipv6_set = 1;
-         src_set = 1;
-       }
-      else
-       if (unformat (line_input, "dst %U", unformat_ip6_address, &dst.ip6))
-       {
-         ipv6_set = 1;
-         dst_set = 1;
-       }
-      else if (unformat (line_input, "group %U %U",
-                        unformat_ip4_address, &dst.ip4,
-                        api_unformat_sw_if_index, vam, &mcast_sw_if_index))
-       {
-         grp_set = dst_set = 1;
-         ipv4_set = 1;
-       }
-      else if (unformat (line_input, "group %U",
-                        unformat_ip4_address, &dst.ip4))
-       {
-         grp_set = dst_set = 1;
-         ipv4_set = 1;
-       }
-      else if (unformat (line_input, "group %U %U",
-                        unformat_ip6_address, &dst.ip6,
-                        api_unformat_sw_if_index, vam, &mcast_sw_if_index))
-       {
-         grp_set = dst_set = 1;
-         ipv6_set = 1;
-       }
-      else if (unformat (line_input, "group %U",
-                        unformat_ip6_address, &dst.ip6))
-       {
-         grp_set = dst_set = 1;
-         ipv6_set = 1;
-       }
-      else
-       if (unformat (line_input, "mcast_sw_if_index %u", &mcast_sw_if_index))
-       ;
-      else if (unformat (line_input, "encap-vrf-id %d", &encap_vrf_id))
-       ;
-      else if (unformat (line_input, "decap-next %U",
-                        unformat_geneve_decap_next, &decap_next_index))
-       ;
-      else if (unformat (line_input, "vni %d", &vni))
-       ;
-      else
-       {
-         errmsg ("parse error '%U'", format_unformat_error, line_input);
-         return -99;
-       }
-    }
-
-  if (src_set == 0)
-    {
-      errmsg ("tunnel src address not specified");
-      return -99;
-    }
-  if (dst_set == 0)
-    {
-      errmsg ("tunnel dst address not specified");
-      return -99;
-    }
-
-  if (grp_set && !ip46_address_is_multicast (&dst))
-    {
-      errmsg ("tunnel group address not multicast");
-      return -99;
-    }
-  if (grp_set && mcast_sw_if_index == ~0)
-    {
-      errmsg ("tunnel nonexistent multicast device");
-      return -99;
-    }
-  if (grp_set == 0 && ip46_address_is_multicast (&dst))
-    {
-      errmsg ("tunnel dst address must be unicast");
-      return -99;
-    }
-
-
-  if (ipv4_set && ipv6_set)
-    {
-      errmsg ("both IPv4 and IPv6 addresses specified");
-      return -99;
-    }
-
-  if ((vni == 0) || (vni >> 24))
-    {
-      errmsg ("vni not specified or out of range");
-      return -99;
-    }
-
-  M (GENEVE_ADD_DEL_TUNNEL, mp);
-
-  if (ipv6_set)
-    {
-      clib_memcpy (&mp->local_address.un.ip6, &src.ip6, sizeof (src.ip6));
-      clib_memcpy (&mp->remote_address.un.ip6, &dst.ip6, sizeof (dst.ip6));
-    }
-  else
-    {
-      clib_memcpy (&mp->local_address.un.ip4, &src.ip4, sizeof (src.ip4));
-      clib_memcpy (&mp->remote_address.un.ip4, &dst.ip4, sizeof (dst.ip4));
-    }
-  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);
-  mp->vni = ntohl (vni);
-  mp->is_add = is_add;
-
-  S (mp);
-  W (ret);
-  return ret;
-}
-
-static void vl_api_geneve_tunnel_details_t_handler
-  (vl_api_geneve_tunnel_details_t * mp)
-{
-  vat_main_t *vam = &vat_main;
-  ip46_address_t src = {.as_u64[0] = 0,.as_u64[1] = 0 };
-  ip46_address_t dst = {.as_u64[0] = 0,.as_u64[1] = 0 };
-
-  if (mp->src_address.af == ADDRESS_IP6)
-    {
-      clib_memcpy (&src.ip6, &mp->src_address.un.ip6, sizeof (ip6_address_t));
-      clib_memcpy (&dst.ip6, &mp->dst_address.un.ip6, sizeof (ip6_address_t));
-    }
-  else
-    {
-      clib_memcpy (&src.ip4, &mp->src_address.un.ip4, sizeof (ip4_address_t));
-      clib_memcpy (&dst.ip4, &mp->dst_address.un.ip4, sizeof (ip4_address_t));
-    }
-
-  print (vam->ofp, "%11d%24U%24U%14d%18d%13d%19d",
-        ntohl (mp->sw_if_index),
-        format_ip46_address, &src, IP46_TYPE_ANY,
-        format_ip46_address, &dst, IP46_TYPE_ANY,
-        ntohl (mp->encap_vrf_id),
-        ntohl (mp->decap_next_index), ntohl (mp->vni),
-        ntohl (mp->mcast_sw_if_index));
-}
-
-static void vl_api_geneve_tunnel_details_t_handler_json
-  (vl_api_geneve_tunnel_details_t * mp)
-{
-  vat_main_t *vam = &vat_main;
-  vat_json_node_t *node = NULL;
-  bool is_ipv6;
-
-  if (VAT_JSON_ARRAY != vam->json_tree.type)
-    {
-      ASSERT (VAT_JSON_NONE == vam->json_tree.type);
-      vat_json_init_array (&vam->json_tree);
-    }
-  node = vat_json_array_add (&vam->json_tree);
-
-  vat_json_init_object (node);
-  vat_json_object_add_uint (node, "sw_if_index", ntohl (mp->sw_if_index));
-  is_ipv6 = mp->src_address.af == ADDRESS_IP6;
-  if (is_ipv6)
-    {
-      struct in6_addr ip6;
-
-      clib_memcpy (&ip6, &mp->src_address.un.ip6, sizeof (ip6));
-      vat_json_object_add_ip6 (node, "src_address", ip6);
-      clib_memcpy (&ip6, &mp->dst_address.un.ip6, sizeof (ip6));
-      vat_json_object_add_ip6 (node, "dst_address", ip6);
-    }
-  else
-    {
-      struct in_addr ip4;
-
-      clib_memcpy (&ip4, &mp->src_address.un.ip4, sizeof (ip4));
-      vat_json_object_add_ip4 (node, "src_address", ip4);
-      clib_memcpy (&ip4, &mp->dst_address.un.ip4, sizeof (ip4));
-      vat_json_object_add_ip4 (node, "dst_address", ip4);
-    }
-  vat_json_object_add_uint (node, "encap_vrf_id", ntohl (mp->encap_vrf_id));
-  vat_json_object_add_uint (node, "decap_next_index",
-                           ntohl (mp->decap_next_index));
-  vat_json_object_add_uint (node, "vni", ntohl (mp->vni));
-  vat_json_object_add_uint (node, "mcast_sw_if_index",
-                           ntohl (mp->mcast_sw_if_index));
-}
-
-static int
-api_geneve_tunnel_dump (vat_main_t * vam)
-{
-  unformat_input_t *i = vam->input;
-  vl_api_geneve_tunnel_dump_t *mp;
-  vl_api_control_ping_t *mp_ping;
-  u32 sw_if_index;
-  u8 sw_if_index_set = 0;
-  int ret;
-
-  /* Parse args required to build the message */
-  while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
-    {
-      if (unformat (i, "sw_if_index %d", &sw_if_index))
-       sw_if_index_set = 1;
-      else
-       break;
-    }
-
-  if (sw_if_index_set == 0)
-    {
-      sw_if_index = ~0;
-    }
-
-  if (!vam->json_output)
-    {
-      print (vam->ofp, "%11s%24s%24s%14s%18s%13s%19s",
-            "sw_if_index", "local_address", "remote_address",
-            "encap_vrf_id", "decap_next_index", "vni", "mcast_sw_if_index");
-    }
-
-  /* Get list of geneve-tunnel interfaces */
-  M (GENEVE_TUNNEL_DUMP, mp);
-
-  mp->sw_if_index = htonl (sw_if_index);
-
-  S (mp);
-
-  /* Use a control ping for synchronization */
-  M (CONTROL_PING, mp_ping);
-  S (mp_ping);
-
-  W (ret);
-  return ret;
-}
-
-static int
-api_gre_tunnel_add_del (vat_main_t * vam)
-{
-  unformat_input_t *line_input = vam->input;
-  vl_api_address_t src = { }, dst =
-  {
-  };
-  vl_api_gre_tunnel_add_del_t *mp;
-  vl_api_gre_tunnel_type_t t_type;
-  u8 is_add = 1;
-  u8 src_set = 0;
-  u8 dst_set = 0;
-  u32 outer_table_id = 0;
-  u32 session_id = 0;
-  u32 instance = ~0;
-  int ret;
-
-  t_type = GRE_API_TUNNEL_TYPE_L3;
-
-  while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
-    {
-      if (unformat (line_input, "del"))
-       is_add = 0;
-      else if (unformat (line_input, "instance %d", &instance))
-       ;
-      else if (unformat (line_input, "src %U", unformat_vl_api_address, &src))
-       {
-         src_set = 1;
-       }
-      else if (unformat (line_input, "dst %U", unformat_vl_api_address, &dst))
-       {
-         dst_set = 1;
-       }
-      else if (unformat (line_input, "outer-table-id %d", &outer_table_id))
-       ;
-      else if (unformat (line_input, "teb"))
-       t_type = GRE_API_TUNNEL_TYPE_TEB;
-      else if (unformat (line_input, "erspan %d", &session_id))
-       t_type = GRE_API_TUNNEL_TYPE_ERSPAN;
+      else if (unformat (line_input, "outer-table-id %d", &outer_table_id))
+       ;
+      else if (unformat (line_input, "teb"))
+       t_type = GRE_API_TUNNEL_TYPE_TEB;
+      else if (unformat (line_input, "erspan %d", &session_id))
+       t_type = GRE_API_TUNNEL_TYPE_ERSPAN;
       else
        {
          errmsg ("parse error '%U'", format_unformat_error, line_input);
@@ -14154,7 +13925,7 @@ unformat_lisp_eid_vat (unformat_input_t * input, va_list * args)
     {
       a->type = 0;             /* ip prefix type */
     }
-  else if (unformat (input, "%U", unformat_ethernet_address, a->addr.mac))
+  else if (unformat (input, "%U", unformat_ethernet_address, &a->addr.mac))
     {
       a->type = 1;             /* mac type */
     }
@@ -18620,6 +18391,44 @@ api_pg_enable_disable (vat_main_t * vam)
   return ret;
 }
 
+int
+api_pg_interface_enable_disable_coalesce (vat_main_t * vam)
+{
+  unformat_input_t *input = vam->input;
+  vl_api_pg_interface_enable_disable_coalesce_t *mp;
+
+  u32 sw_if_index = ~0;
+  u8 enable = 1;
+  int ret;
+  while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
+    {
+      if (unformat (input, "%U", api_unformat_sw_if_index, vam, &sw_if_index))
+       ;
+      else if (unformat (input, "sw_if_index %d", &sw_if_index))
+       ;
+      else if (unformat (input, "disable"))
+       enable = 0;
+      else
+       break;
+    }
+
+  if (sw_if_index == ~0)
+    {
+      errmsg ("Interface required but not specified");
+      return -99;
+    }
+
+  /* Construct the API message */
+  M (PG_INTERFACE_ENABLE_DISABLE_COALESCE, mp);
+  mp->context = 0;
+  mp->coalesce_enabled = enable;
+  mp->sw_if_index = htonl (sw_if_index);
+
+  S (mp);
+  W (ret);
+  return ret;
+}
+
 int
 api_ip_source_and_port_range_check_add_del (vat_main_t * vam)
 {
@@ -19452,104 +19261,6 @@ api_p2p_ethernet_del (vat_main_t * vam)
   return ret;
 }
 
-static int
-api_lldp_config (vat_main_t * vam)
-{
-  unformat_input_t *i = vam->input;
-  vl_api_lldp_config_t *mp;
-  int tx_hold = 0;
-  int tx_interval = 0;
-  u8 *sys_name = NULL;
-  int ret;
-
-  while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
-    {
-      if (unformat (i, "system-name %s", &sys_name))
-       ;
-      else if (unformat (i, "tx-hold %d", &tx_hold))
-       ;
-      else if (unformat (i, "tx-interval %d", &tx_interval))
-       ;
-      else
-       {
-         clib_warning ("parse error '%U'", format_unformat_error, i);
-         return -99;
-       }
-    }
-
-  vec_add1 (sys_name, 0);
-
-  M (LLDP_CONFIG, mp);
-  mp->tx_hold = htonl (tx_hold);
-  mp->tx_interval = htonl (tx_interval);
-  vl_api_vec_to_api_string (sys_name, &mp->system_name);
-  vec_free (sys_name);
-
-  S (mp);
-  W (ret);
-  return ret;
-}
-
-static int
-api_sw_interface_set_lldp (vat_main_t * vam)
-{
-  unformat_input_t *i = vam->input;
-  vl_api_sw_interface_set_lldp_t *mp;
-  u32 sw_if_index = ~0;
-  u32 enable = 1;
-  u8 *port_desc = NULL, *mgmt_oid = NULL;
-  ip4_address_t ip4_addr;
-  ip6_address_t ip6_addr;
-  int ret;
-
-  clib_memset (&ip4_addr, 0, sizeof (ip4_addr));
-  clib_memset (&ip6_addr, 0, sizeof (ip6_addr));
-
-  while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
-    {
-      if (unformat (i, "disable"))
-       enable = 0;
-      else
-       if (unformat (i, "%U", api_unformat_sw_if_index, vam, &sw_if_index))
-       ;
-      else if (unformat (i, "sw_if_index %d", &sw_if_index))
-       ;
-      else if (unformat (i, "port-desc %s", &port_desc))
-       ;
-      else if (unformat (i, "mgmt-ip4 %U", unformat_ip4_address, &ip4_addr))
-       ;
-      else if (unformat (i, "mgmt-ip6 %U", unformat_ip6_address, &ip6_addr))
-       ;
-      else if (unformat (i, "mgmt-oid %s", &mgmt_oid))
-       ;
-      else
-       break;
-    }
-
-  if (sw_if_index == ~0)
-    {
-      errmsg ("missing interface name or sw_if_index");
-      return -99;
-    }
-
-  /* Construct the API message */
-  vec_add1 (port_desc, 0);
-  vec_add1 (mgmt_oid, 0);
-  M (SW_INTERFACE_SET_LLDP, mp);
-  mp->sw_if_index = ntohl (sw_if_index);
-  mp->enable = enable;
-  vl_api_vec_to_api_string (port_desc, &mp->port_desc);
-  clib_memcpy (mp->mgmt_oid, mgmt_oid, vec_len (mgmt_oid));
-  clib_memcpy (mp->mgmt_ip4, &ip4_addr, sizeof (ip4_addr));
-  clib_memcpy (mp->mgmt_ip6, &ip6_addr, sizeof (ip6_addr));
-  vec_free (port_desc);
-  vec_free (mgmt_oid);
-
-  S (mp);
-  W (ret);
-  return ret;
-}
-
 static int
 api_tcp_configure_src_addresses (vat_main_t * vam)
 {
@@ -20595,8 +20306,6 @@ _(sw_interface_set_vpath,                                               \
   "<intfc> | sw_if_index <id> enable | disable")                        \
 _(sw_interface_set_vxlan_bypass,                                        \
   "<intfc> | sw_if_index <id> [ip4 | ip6] [enable | disable]")          \
-_(sw_interface_set_geneve_bypass,                                       \
-  "<intfc> | sw_if_index <id> [ip4 | ip6] [enable | disable]")          \
 _(sw_interface_set_l2_xconnect,                                         \
   "rx <intfc> | rx_sw_if_index <id> tx <intfc> | tx_sw_if_index <id>\n" \
   "enable | disable")                                                   \
@@ -20617,12 +20326,12 @@ _(l2_flags,                                                             \
 _(bridge_flags,                                                         \
   "bd_id <bridge-domain-id> [learn] [forward] [uu-flood] [flood] [arp-term] [disable]\n") \
 _(tap_create_v2,                                                        \
-  "id <num> [hw-addr <mac-addr>] [host-if-name <name>] [host-ns <name>] [num-rx-queues <num>] [rx-ring-size <num>] [tx-ring-size <num>] [host-bridge <name>] [host-mac-addr <mac-addr>] [host-ip4-addr <ip4addr/mask>] [host-ip6-addr <ip6addr/mask>] [host-mtu-size <mtu>] [gso | no-gso | csum-offload | gro-coalesce] [persist] [attach] [tun]") \
+  "id <num> [hw-addr <mac-addr>] [host-if-name <name>] [host-ns <name>] [num-rx-queues <num>] [rx-ring-size <num>] [tx-ring-size <num>] [host-bridge <name>] [host-mac-addr <mac-addr>] [host-ip4-addr <ip4addr/mask>] [host-ip6-addr <ip6addr/mask>] [host-mtu-size <mtu>] [gso | no-gso | csum-offload | gro-coalesce] [persist] [attach] [tun] [packed] [in-order]") \
 _(tap_delete_v2,                                                        \
   "<vpp-if-name> | sw_if_index <id>")                                   \
 _(sw_interface_tap_v2_dump, "")                                         \
-_(virtio_pci_create,                                                    \
-  "pci-addr <pci-address> [use_random_mac | hw-addr <mac-addr>] [features <hex-value>] [gso-enabled | csum-offload-enabled]") \
+_(virtio_pci_create_v2,                                                    \
+  "pci-addr <pci-address> [use_random_mac | hw-addr <mac-addr>] [features <hex-value>] [gso-enabled [gro-coalesce] | csum-offload-enabled] [packed] [in-order]") \
 _(virtio_pci_delete,                                                    \
   "<vpp-if-name> | sw_if_index <id>")                                   \
 _(sw_interface_virtio_pci_dump, "")                                     \
@@ -20630,6 +20339,10 @@ _(bond_create,                                                          \
   "[hw-addr <mac-addr>] {round-robin | active-backup | "                \
   "broadcast | {lacp | xor} [load-balance { l2 | l23 | l34 }]} "        \
   "[id <if-id>]")                                                      \
+_(bond_create2,                                                         \
+  "[hw-addr <mac-addr>] {mode round-robin | active-backup | "           \
+  "broadcast | {lacp | xor} [load-balance { l2 | l23 | l34 }]} "        \
+  "[id <if-id>] [gso]")                                                        \
 _(bond_delete,                                                          \
   "<vpp-if-name> | sw_if_index <id>")                                   \
 _(bond_add_member,                                                      \
@@ -20731,12 +20444,7 @@ _(vxlan_add_del_tunnel,                                                 \
   "src <ip-addr> { dst <ip-addr> | group <mcast-ip-addr>\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"             \
-  "{ <intfc> | mcast_sw_if_index <nn> } }\n"                            \
-  "vni <vni> [encap-vrf-id <nn>] [decap-next <l2|nn>] [del]")           \
 _(vxlan_tunnel_dump, "[<intfc> | sw_if_index <nn>]")                    \
-_(geneve_tunnel_dump, "[<intfc> | sw_if_index <nn>]")                   \
 _(gre_tunnel_add_del,                                                   \
   "src <ip-addr> dst <ip-addr> [outer-fib-id <nn>] [instance <n>]\n"    \
   "[teb | erspan <session-id>] [del]")                                 \
@@ -20838,7 +20546,7 @@ _(one_eid_table_dump, "[eid <ipv4|ipv6>/<prefix> | <mac>] [vni] "       \
 _(one_add_del_ndp_entry, "[del] mac <mac> bd <bd> ip6 <ip6>")           \
 _(one_ndp_bd_get, "")                                                   \
 _(one_ndp_entries_get, "bd <bridge-domain>")                            \
-_(one_add_del_l2_arp_entry, "[del] mac <mac> bd <bd> ip4 <ip4>")        \
+_(one_add_del_l2_arp_entry, "[del] mac <mac> bd <bd> ip <ip4>")        \
 _(one_l2_arp_bd_get, "")                                                \
 _(one_l2_arp_entries_get, "bd <bridge-domain>")                         \
 _(one_stats_enable_disable, "enable|disable")                           \
@@ -20955,6 +20663,7 @@ _(get_next_index, "node-name <node-name> next-node-name <node-name>")   \
 _(pg_create_interface, "if_id <nn> [gso-enabled gso-size <size>]")      \
 _(pg_capture, "if_id <nnn> pcap <file_name> count <nnn> [disable]")     \
 _(pg_enable_disable, "[stream <id>] disable")                           \
+_(pg_interface_enable_disable_coalesce, "<intf> | sw_if_index <nn> enable | disable")  \
 _(ip_source_and_port_range_check_add_del,                               \
   "<ip-addr>/<mask> range <nn>-<nn> vrf <id>")                          \
 _(ip_source_and_port_range_check_interface_add_del,                     \
@@ -20986,9 +20695,6 @@ _(hw_interface_set_mtu, "<intfc> | hw_if_index <nn> mtu <nn>")        \
 _(sw_interface_get_table, "<intfc> | sw_if_index <id> [ipv6]")          \
 _(p2p_ethernet_add, "<intfc> | sw_if_index <nn> remote_mac <mac-address> sub_id <id>") \
 _(p2p_ethernet_del, "<intfc> | sw_if_index <nn> remote_mac <mac-address>") \
-_(lldp_config, "system-name <name> tx-hold <nn> tx-interval <nn>") \
-_(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>]")  \
 _(sock_init_shm, "size <nnn>")                                         \
 _(app_namespace_add_del, "[add] id <ns-id> secret <nn> sw_if_index <nn>")\