Implement a loopback instance allocation scheme.
[vpp.git] / src / vpp / api / custom_dump.c
index 70b4e4c..ee0c462 100644 (file)
@@ -21,8 +21,7 @@
 #include <vnet/ip/ip.h>
 #include <vnet/unix/tuntap.h>
 #include <vnet/mpls/mpls.h>
-#include <vnet/dhcp/proxy.h>
-#include <vnet/dhcpv6/proxy.h>
+#include <vnet/dhcp/dhcp_proxy.h>
 #include <vnet/l2tp/l2tp.h>
 #include <vnet/l2/l2_input.h>
 #include <vnet/sr/sr_packet.h>
@@ -73,6 +72,18 @@ static void *vl_api_create_loopback_t_print
   FINISH;
 }
 
+static void *vl_api_create_loopback_instance_t_print
+  (vl_api_create_loopback_instance_t * mp, void *handle)
+{
+  u8 *s;
+
+  s = format (0, "SCRIPT: create_loopback ");
+  s = format (s, "mac %U ", format_ethernet_address, &mp->mac_address);
+  s = format (s, "instance %d ", ntohl (mp->user_instance));
+
+  FINISH;
+}
+
 static void *vl_api_delete_loopback_t_print
   (vl_api_delete_loopback_t * mp, void *handle)
 {
@@ -238,58 +249,6 @@ static void *vl_api_sw_interface_set_l2_bridge_t_print
   FINISH;
 }
 
-#if DPDK > 0
-static void *vl_api_sw_interface_set_dpdk_hqos_pipe_t_print
-  (vl_api_sw_interface_set_dpdk_hqos_pipe_t * mp, void *handle)
-{
-  u8 *s;
-
-  s = format (0, "SCRIPT: sw_interface_set_dpdk_hqos_pipe ");
-
-  s = format (s, "sw_if_index %u ", ntohl (mp->sw_if_index));
-
-  s = format (s, "subport %u  pipe %u  profile %u ",
-             ntohl (mp->subport), ntohl (mp->pipe), ntohl (mp->profile));
-
-  FINISH;
-}
-
-static void *vl_api_sw_interface_set_dpdk_hqos_subport_t_print
-  (vl_api_sw_interface_set_dpdk_hqos_subport_t * mp, void *handle)
-{
-  u8 *s;
-
-  s = format (0, "SCRIPT: sw_interface_set_dpdk_hqos_subport ");
-
-  s = format (s, "sw_if_index %u ", ntohl (mp->sw_if_index));
-
-  s =
-    format (s,
-           "subport %u  rate %u  bkt_size %u  tc0 %u tc1 %u tc2 %u tc3 %u period %u",
-           ntohl (mp->subport), ntohl (mp->tb_rate), ntohl (mp->tb_size),
-           ntohl (mp->tc_rate[0]), ntohl (mp->tc_rate[1]),
-           ntohl (mp->tc_rate[2]), ntohl (mp->tc_rate[3]),
-           ntohl (mp->tc_period));
-
-  FINISH;
-}
-
-static void *vl_api_sw_interface_set_dpdk_hqos_tctbl_t_print
-  (vl_api_sw_interface_set_dpdk_hqos_tctbl_t * mp, void *handle)
-{
-  u8 *s;
-
-  s = format (0, "SCRIPT: sw_interface_set_dpdk_hqos_tctbl ");
-
-  s = format (s, "sw_if_index %u ", ntohl (mp->sw_if_index));
-
-  s = format (s, "entry %u  tc %u  queue %u",
-             ntohl (mp->entry), ntohl (mp->tc), ntohl (mp->queue));
-
-  FINISH;
-}
-#endif
-
 static void *vl_api_bridge_domain_add_del_t_print
   (vl_api_bridge_domain_add_del_t * mp, void *handle)
 {
@@ -634,8 +593,6 @@ static void *vl_api_ip_neighbor_add_del_t_print
   if (mp->is_static)
     s = format (s, "is_static ");
 
-  s = format (s, "vrf_id %d ", ntohl (mp->vrf_id));
-
   if (memcmp (mp->mac_address, null_mac, 6))
     s = format (s, "mac %U ", format_ethernet_address, mp->mac_address);
 
@@ -2876,6 +2833,7 @@ foreach_custom_print_no_arg_function
 #undef _
 #define foreach_custom_print_function                                   \
 _(CREATE_LOOPBACK, create_loopback)                                     \
+_(CREATE_LOOPBACK_INSTANCE, create_loopback_instance)                   \
 _(SW_INTERFACE_SET_FLAGS, sw_interface_set_flags)                       \
 _(SW_INTERFACE_ADD_DEL_ADDRESS, sw_interface_add_del_address)           \
 _(SW_INTERFACE_SET_TABLE, sw_interface_set_table)                       \
@@ -3037,18 +2995,6 @@ vl_msg_api_custom_dump_configure (api_main_t * am)
     = (void *) vl_api_##f##_t_print;
   foreach_custom_print_function;
 #undef _
-
-#if DPDK > 0
-  /*
-   * manually add DPDK hqos print handlers
-   */
-  am->msg_print_handlers[VL_API_SW_INTERFACE_SET_DPDK_HQOS_PIPE] =
-    (void *) vl_api_sw_interface_set_dpdk_hqos_pipe_t_print;
-  am->msg_print_handlers[VL_API_SW_INTERFACE_SET_DPDK_HQOS_SUBPORT] =
-    (void *) vl_api_sw_interface_set_dpdk_hqos_subport_t_print;
-  am->msg_print_handlers[VL_API_SW_INTERFACE_SET_DPDK_HQOS_TCTBL] =
-    (void *) vl_api_sw_interface_set_dpdk_hqos_tctbl_t_print;
-#endif
 }
 
 /*