VPP-450 Fix adding LISP adjacencies via CLI
[vpp.git] / vpp-api-test / vat / api_format.c
index 7b5b434..0a15ed7 100644 (file)
@@ -35,7 +35,7 @@
 #include <vnet/l2/l2_vtr.h>
 #include <vnet/classify/input_acl.h>
 #include <vnet/classify/policer_classify.h>
-#include <vnet/mpls-gre/mpls.h>
+#include <vnet/mpls/mpls.h>
 #if DPDK > 0
 #include <vnet/ipsec/ipsec.h>
 #include <vnet/ipsec/ikev2.h>
@@ -2711,6 +2711,62 @@ static void
   vam->result_ready = 1;
 }
 
+static u8 *
+format_lisp_map_request_mode (u8 * s, va_list * args)
+{
+  u32 mode = va_arg (*args, u32);
+
+  switch (mode)
+    {
+    case 0:
+      return format (0, "dst-only");
+    case 1:
+      return format (0, "src-dst");
+    }
+  return 0;
+}
+
+static void
+  vl_api_show_lisp_map_request_mode_reply_t_handler
+  (vl_api_show_lisp_map_request_mode_reply_t * mp)
+{
+  vat_main_t *vam = &vat_main;
+  i32 retval = ntohl (mp->retval);
+
+  if (0 <= retval)
+    {
+      u32 mode = mp->mode;
+      fformat (vam->ofp, "map_request_mode: %U\n",
+              format_lisp_map_request_mode, mode);
+    }
+
+  vam->retval = retval;
+  vam->result_ready = 1;
+}
+
+static void
+  vl_api_show_lisp_map_request_mode_reply_t_handler_json
+  (vl_api_show_lisp_map_request_mode_reply_t * mp)
+{
+  vat_main_t *vam = &vat_main;
+  vat_json_node_t node;
+  u8 *s = 0;
+  u32 mode;
+
+  mode = mp->mode;
+  s = format (0, "%U", format_lisp_map_request_mode, mode);
+  vec_add1 (s, 0);
+
+  vat_json_init_object (&node);
+  vat_json_object_add_string_copy (&node, "map_request_mode", s);
+  vat_json_print (vam->ofp, &node);
+  vat_json_free (&node);
+
+  vec_free (s);
+  vam->retval = ntohl (mp->retval);
+  vam->result_ready = 1;
+}
+
 static void
 vl_api_show_lisp_pitr_reply_t_handler (vl_api_show_lisp_pitr_reply_t * mp)
 {
@@ -3334,6 +3390,9 @@ _(sw_interface_add_del_address_reply)                   \
 _(sw_interface_set_table_reply)                         \
 _(sw_interface_set_vpath_reply)                         \
 _(sw_interface_set_l2_bridge_reply)                     \
+_(sw_interface_set_dpdk_hqos_pipe_reply)                \
+_(sw_interface_set_dpdk_hqos_subport_reply)             \
+_(sw_interface_set_dpdk_hqos_tctbl_reply)               \
 _(bridge_domain_add_del_reply)                          \
 _(sw_interface_set_l2_xconnect_reply)                   \
 _(l2fib_add_del_reply)                                  \
@@ -3407,6 +3466,7 @@ _(lisp_gpe_enable_disable_reply)                        \
 _(lisp_gpe_add_del_iface_reply)                         \
 _(lisp_enable_disable_reply)                            \
 _(lisp_pitr_set_locator_set_reply)                      \
+_(lisp_map_request_mode_reply)                          \
 _(lisp_add_del_map_request_itr_rlocs_reply)             \
 _(lisp_eid_table_add_del_map_reply)                     \
 _(vxlan_gpe_add_del_tunnel_reply)                       \
@@ -3475,6 +3535,12 @@ _(SW_INTERFACE_SET_L2_XCONNECT_REPLY,                                   \
   sw_interface_set_l2_xconnect_reply)                                   \
 _(SW_INTERFACE_SET_L2_BRIDGE_REPLY,                                     \
   sw_interface_set_l2_bridge_reply)                                     \
+_(SW_INTERFACE_SET_DPDK_HQOS_PIPE_REPLY,                                \
+  sw_interface_set_dpdk_hqos_pipe_reply)                                \
+_(SW_INTERFACE_SET_DPDK_HQOS_SUBPORT_REPLY,                             \
+  sw_interface_set_dpdk_hqos_subport_reply)                             \
+_(SW_INTERFACE_SET_DPDK_HQOS_TCTBL_REPLY,                               \
+  sw_interface_set_dpdk_hqos_tctbl_reply)                               \
 _(BRIDGE_DOMAIN_ADD_DEL_REPLY, bridge_domain_add_del_reply)             \
 _(BRIDGE_DOMAIN_DETAILS, bridge_domain_details)                         \
 _(BRIDGE_DOMAIN_SW_IF_DETAILS, bridge_domain_sw_if_details)             \
@@ -3599,6 +3665,7 @@ _(LISP_ADD_DEL_MAP_RESOLVER_REPLY, lisp_add_del_map_resolver_reply)     \
 _(LISP_GPE_ENABLE_DISABLE_REPLY, lisp_gpe_enable_disable_reply)         \
 _(LISP_ENABLE_DISABLE_REPLY, lisp_enable_disable_reply)                 \
 _(LISP_PITR_SET_LOCATOR_SET_REPLY, lisp_pitr_set_locator_set_reply)     \
+_(LISP_MAP_REQUEST_MODE_REPLY, lisp_map_request_mode_reply)             \
 _(LISP_EID_TABLE_ADD_DEL_MAP_REPLY, lisp_eid_table_add_del_map_reply)   \
 _(LISP_GPE_ADD_DEL_IFACE_REPLY, lisp_gpe_add_del_iface_reply)           \
 _(LISP_LOCATOR_SET_DETAILS, lisp_locator_set_details)                   \
@@ -3614,6 +3681,7 @@ _(LISP_ADD_DEL_MAP_REQUEST_ITR_RLOCS_REPLY,                             \
 _(LISP_GET_MAP_REQUEST_ITR_RLOCS_REPLY,                                 \
   lisp_get_map_request_itr_rlocs_reply)                                 \
 _(SHOW_LISP_PITR_REPLY, show_lisp_pitr_reply)                           \
+_(SHOW_LISP_MAP_REQUEST_MODE_REPLY, show_lisp_map_request_mode_reply)   \
 _(AF_PACKET_CREATE_REPLY, af_packet_create_reply)                       \
 _(AF_PACKET_DELETE_REPLY, af_packet_delete_reply)                       \
 _(POLICER_ADD_DEL_REPLY, policer_add_del_reply)                         \
@@ -4441,6 +4509,225 @@ api_sw_interface_clear_stats (vat_main_t * vam)
   W;
 }
 
+static int
+api_sw_interface_set_dpdk_hqos_pipe (vat_main_t * vam)
+{
+  unformat_input_t *i = vam->input;
+  vl_api_sw_interface_set_dpdk_hqos_pipe_t *mp;
+  f64 timeout;
+  u32 sw_if_index;
+  u8 sw_if_index_set = 0;
+  u32 subport;
+  u8 subport_set = 0;
+  u32 pipe;
+  u8 pipe_set = 0;
+  u32 profile;
+  u8 profile_set = 0;
+
+  /* Parse args required to build the message */
+  while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
+    {
+      if (unformat (i, "rx %U", unformat_sw_if_index, vam, &sw_if_index))
+       sw_if_index_set = 1;
+      else if (unformat (i, "sw_if_index %u", &sw_if_index))
+       sw_if_index_set = 1;
+      else if (unformat (i, "subport %u", &subport))
+       subport_set = 1;
+      else if (unformat (i, "%U", unformat_sw_if_index, vam, &sw_if_index))
+       sw_if_index_set = 1;
+      else if (unformat (i, "pipe %u", &pipe))
+       pipe_set = 1;
+      else if (unformat (i, "profile %u", &profile))
+       profile_set = 1;
+      else
+       break;
+    }
+
+  if (sw_if_index_set == 0)
+    {
+      errmsg ("missing interface name or sw_if_index\n");
+      return -99;
+    }
+
+  if (subport_set == 0)
+    {
+      errmsg ("missing subport \n");
+      return -99;
+    }
+
+  if (pipe_set == 0)
+    {
+      errmsg ("missing pipe\n");
+      return -99;
+    }
+
+  if (profile_set == 0)
+    {
+      errmsg ("missing profile\n");
+      return -99;
+    }
+
+  M (SW_INTERFACE_SET_DPDK_HQOS_PIPE, sw_interface_set_dpdk_hqos_pipe);
+
+  mp->sw_if_index = ntohl (sw_if_index);
+  mp->subport = ntohl (subport);
+  mp->pipe = ntohl (pipe);
+  mp->profile = ntohl (profile);
+
+
+  S;
+  W;
+  /* NOTREACHED */
+  return 0;
+}
+
+static int
+api_sw_interface_set_dpdk_hqos_subport (vat_main_t * vam)
+{
+  unformat_input_t *i = vam->input;
+  vl_api_sw_interface_set_dpdk_hqos_subport_t *mp;
+  f64 timeout;
+  u32 sw_if_index;
+  u8 sw_if_index_set = 0;
+  u32 subport;
+  u8 subport_set = 0;
+  u32 tb_rate = 1250000000;    /* 10GbE */
+  u32 tb_size = 1000000;
+  u32 tc_rate[] = { 1250000000, 1250000000, 1250000000, 1250000000 };
+  u32 tc_period = 10;
+
+  /* Parse args required to build the message */
+  while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
+    {
+      if (unformat (i, "rx %U", unformat_sw_if_index, vam, &sw_if_index))
+       sw_if_index_set = 1;
+      else if (unformat (i, "sw_if_index %u", &sw_if_index))
+       sw_if_index_set = 1;
+      else if (unformat (i, "subport %u", &subport))
+       subport_set = 1;
+      else if (unformat (i, "%U", unformat_sw_if_index, vam, &sw_if_index))
+       sw_if_index_set = 1;
+      else if (unformat (i, "rate %u", &tb_rate))
+       {
+         u32 tc_id;
+
+         for (tc_id = 0; tc_id < (sizeof (tc_rate) / sizeof (tc_rate[0]));
+              tc_id++)
+           tc_rate[tc_id] = tb_rate;
+       }
+      else if (unformat (i, "bktsize %u", &tb_size))
+       ;
+      else if (unformat (i, "tc0 %u", &tc_rate[0]))
+       ;
+      else if (unformat (i, "tc1 %u", &tc_rate[1]))
+       ;
+      else if (unformat (i, "tc2 %u", &tc_rate[2]))
+       ;
+      else if (unformat (i, "tc3 %u", &tc_rate[3]))
+       ;
+      else if (unformat (i, "period %u", &tc_period))
+       ;
+      else
+       break;
+    }
+
+  if (sw_if_index_set == 0)
+    {
+      errmsg ("missing interface name or sw_if_index\n");
+      return -99;
+    }
+
+  if (subport_set == 0)
+    {
+      errmsg ("missing subport \n");
+      return -99;
+    }
+
+  M (SW_INTERFACE_SET_DPDK_HQOS_SUBPORT, sw_interface_set_dpdk_hqos_subport);
+
+  mp->sw_if_index = ntohl (sw_if_index);
+  mp->subport = ntohl (subport);
+  mp->tb_rate = ntohl (tb_rate);
+  mp->tb_size = ntohl (tb_size);
+  mp->tc_rate[0] = ntohl (tc_rate[0]);
+  mp->tc_rate[1] = ntohl (tc_rate[1]);
+  mp->tc_rate[2] = ntohl (tc_rate[2]);
+  mp->tc_rate[3] = ntohl (tc_rate[3]);
+  mp->tc_period = ntohl (tc_period);
+
+  S;
+  W;
+  /* NOTREACHED */
+  return 0;
+}
+
+static int
+api_sw_interface_set_dpdk_hqos_tctbl (vat_main_t * vam)
+{
+  unformat_input_t *i = vam->input;
+  vl_api_sw_interface_set_dpdk_hqos_tctbl_t *mp;
+  f64 timeout;
+  u32 sw_if_index;
+  u8 sw_if_index_set = 0;
+  u8 entry_set = 0;
+  u8 tc_set = 0;
+  u8 queue_set = 0;
+  u32 entry, tc, queue;
+
+  /* Parse args required to build the message */
+  while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
+    {
+      if (unformat (i, "rx %U", unformat_sw_if_index, vam, &sw_if_index))
+       sw_if_index_set = 1;
+      else if (unformat (i, "sw_if_index %u", &sw_if_index))
+       sw_if_index_set = 1;
+      else if (unformat (i, "entry %d", &entry))
+       entry_set = 1;
+      else if (unformat (i, "tc %d", &tc))
+       tc_set = 1;
+      else if (unformat (i, "queue %d", &queue))
+       queue_set = 1;
+      else
+       break;
+    }
+
+  if (sw_if_index_set == 0)
+    {
+      errmsg ("missing interface name or sw_if_index\n");
+      return -99;
+    }
+
+  if (entry_set == 0)
+    {
+      errmsg ("missing entry \n");
+      return -99;
+    }
+
+  if (tc_set == 0)
+    {
+      errmsg ("missing traffic class \n");
+      return -99;
+    }
+
+  if (queue_set == 0)
+    {
+      errmsg ("missing queue \n");
+      return -99;
+    }
+
+  M (SW_INTERFACE_SET_DPDK_HQOS_TCTBL, sw_interface_set_dpdk_hqos_tctbl);
+
+  mp->sw_if_index = ntohl (sw_if_index);
+  mp->entry = ntohl (entry);
+  mp->tc = ntohl (tc);
+  mp->queue = ntohl (queue);
+
+  S;
+  W;
+  /* NOTREACHED */
+  return 0;
+}
+
 static int
 api_sw_interface_add_del_address (vat_main_t * vam)
 {
@@ -5346,6 +5633,7 @@ api_ip_add_del_route (vat_main_t * vam)
   u32 random_seed = 0xdeaddabe;
   u32 classify_table_index = ~0;
   u8 is_classify = 0;
+  u8 resolve_host, resolve_attached;
 
   /* Parse args required to build the message */
   while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
@@ -5401,6 +5689,10 @@ api_ip_add_del_route (vat_main_t * vam)
        is_add = 1;
       else if (unformat (i, "not-last"))
        not_last = 1;
+      else if (unformat (i, "resolve-via-host"))
+       resolve_host = 1;
+      else if (unformat (i, "resolve-via-attached"))
+       resolve_attached = 1;
       else if (unformat (i, "multipath"))
        is_multipath = 1;
       else if (unformat (i, "vrf %d", &vrf_id))
@@ -5497,6 +5789,8 @@ api_ip_add_del_route (vat_main_t * vam)
       mp->is_local = is_local;
       mp->is_classify = is_classify;
       mp->is_multipath = is_multipath;
+      mp->is_resolve_host = resolve_host;
+      mp->is_resolve_attached = resolve_attached;
       mp->not_last = not_last;
       mp->next_hop_weight = next_hop_weight;
       mp->dst_address_length = dst_address_length;
@@ -7860,7 +8154,6 @@ out:
 }
 
 #define foreach_ip_next                         \
-_(miss, MISS)                                   \
 _(drop, DROP)                                   \
 _(local, LOCAL)                                 \
 _(rewrite, REWRITE)
@@ -11805,6 +12098,7 @@ api_lisp_add_del_locator_set (vat_main_t * vam)
   u8 locator_set_name_set = 0;
   ls_locator_t locator, *locators = 0;
   u32 sw_if_index, priority, weight;
+  u32 data_len = 0;
 
   /* Parse args required to build the message */
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
@@ -11853,8 +12147,10 @@ api_lisp_add_del_locator_set (vat_main_t * vam)
     }
   vec_add1 (locator_set_name, 0);
 
+  data_len = sizeof (ls_locator_t) * vec_len (locators);
+
   /* Construct the API message */
-  M (LISP_ADD_DEL_LOCATOR_SET, lisp_add_del_locator_set);
+  M2 (LISP_ADD_DEL_LOCATOR_SET, lisp_add_del_locator_set, data_len);
 
   mp->is_add = is_add;
   clib_memcpy (mp->locator_set_name, locator_set_name,
@@ -11863,8 +12159,7 @@ api_lisp_add_del_locator_set (vat_main_t * vam)
 
   mp->locator_num = clib_host_to_net_u32 (vec_len (locators));
   if (locators)
-    clib_memcpy (mp->locators, locators,
-                (sizeof (ls_locator_t) * vec_len (locators)));
+    clib_memcpy (mp->locators, locators, data_len);
   vec_free (locators);
 
   /* send it... */
@@ -12374,6 +12669,59 @@ api_lisp_enable_disable (vat_main_t * vam)
   return 0;
 }
 
+static int
+api_show_lisp_map_request_mode (vat_main_t * vam)
+{
+  f64 timeout = ~0;
+  vl_api_show_lisp_map_request_mode_t *mp;
+
+  M (SHOW_LISP_MAP_REQUEST_MODE, show_lisp_map_request_mode);
+
+  /* send */
+  S;
+
+  /* wait for reply */
+  W;
+
+  return 0;
+}
+
+static int
+api_lisp_map_request_mode (vat_main_t * vam)
+{
+  f64 timeout = ~0;
+  unformat_input_t *input = vam->input;
+  vl_api_lisp_map_request_mode_t *mp;
+  u8 mode = 0;
+
+  /* Parse args required to build the message */
+  while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
+    {
+      if (unformat (input, "dst-only"))
+       mode = 0;
+      else if (unformat (input, "src-dst"))
+       mode = 1;
+      else
+       {
+         errmsg ("parse error '%U'", format_unformat_error, input);
+         return -99;
+       }
+    }
+
+  M (LISP_MAP_REQUEST_MODE, lisp_map_request_mode);
+
+  mp->mode = mode;
+
+  /* send */
+  S;
+
+  /* wait for reply */
+  W;
+
+  /* notreached */
+  return 0;
+}
+
 /**
  * Enable/disable LISP proxy ITR.
  *
@@ -12549,7 +12897,7 @@ api_lisp_add_del_remote_mapping (vat_main_t * vam)
   lisp_eid_vat_t _eid, *eid = &_eid;
   lisp_eid_vat_t _seid, *seid = &_seid;
   u8 is_add = 1, del_all = 0, eid_set = 0, seid_set = 0;
-  u32 action = ~0, p, w;
+  u32 action = ~0, p, w, data_len;
   ip4_address_t rloc4;
   ip6_address_t rloc6;
   rloc_t *rlocs = 0, rloc, *curr_rloc = 0;
@@ -12631,7 +12979,9 @@ api_lisp_add_del_remote_mapping (vat_main_t * vam)
       return -99;
     }
 
-  M (LISP_ADD_DEL_REMOTE_MAPPING, lisp_add_del_remote_mapping);
+  data_len = vec_len (rlocs) * sizeof (rloc_t);
+
+  M2 (LISP_ADD_DEL_REMOTE_MAPPING, lisp_add_del_remote_mapping, data_len);
   mp->is_add = is_add;
   mp->vni = htonl (vni);
   mp->action = (u8) action;
@@ -12644,7 +12994,7 @@ api_lisp_add_del_remote_mapping (vat_main_t * vam)
   lisp_eid_put_vat (mp->seid, seid->addr, seid->type);
 
   mp->rloc_num = clib_host_to_net_u32 (vec_len (rlocs));
-  clib_memcpy (mp->rlocs, rlocs, (sizeof (rloc_t) * vec_len (rlocs)));
+  clib_memcpy (mp->rlocs, rlocs, data_len);
   vec_free (rlocs);
 
   /* send it... */
@@ -12671,15 +13021,15 @@ api_lisp_add_del_adjacency (vat_main_t * vam)
   vl_api_lisp_add_del_adjacency_t *mp;
   f64 timeout = ~0;
   u32 vni = 0;
-  ip4_address_t seid4, deid4;
-  ip6_address_t seid6, deid6;
-  u8 deid_mac[6] = { 0 };
-  u8 seid_mac[6] = { 0 };
-  u8 deid_type, seid_type;
-  u32 seid_len = 0, deid_len = 0, len;
+  ip4_address_t leid4, reid4;
+  ip6_address_t leid6, reid6;
+  u8 reid_mac[6] = { 0 };
+  u8 leid_mac[6] = { 0 };
+  u8 reid_type, leid_type;
+  u32 leid_len = 0, reid_len = 0, len;
   u8 is_add = 1;
 
-  seid_type = deid_type = (u8) ~ 0;
+  leid_type = reid_type = (u8) ~ 0;
 
   /* Parse args required to build the message */
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
@@ -12692,39 +13042,39 @@ api_lisp_add_del_adjacency (vat_main_t * vam)
        {
          is_add = 1;
        }
-      else if (unformat (input, "deid %U/%d", unformat_ip4_address,
-                        &deid4, &len))
+      else if (unformat (input, "reid %U/%d", unformat_ip4_address,
+                        &reid4, &len))
        {
-         deid_type = 0;        /* ipv4 */
-         deid_len = len;
+         reid_type = 0;        /* ipv4 */
+         reid_len = len;
        }
-      else if (unformat (input, "deid %U/%d", unformat_ip6_address,
-                        &deid6, &len))
+      else if (unformat (input, "reid %U/%d", unformat_ip6_address,
+                        &reid6, &len))
        {
-         deid_type = 1;        /* ipv6 */
-         deid_len = len;
+         reid_type = 1;        /* ipv6 */
+         reid_len = len;
        }
-      else if (unformat (input, "deid %U", unformat_ethernet_address,
-                        deid_mac))
+      else if (unformat (input, "reid %U", unformat_ethernet_address,
+                        reid_mac))
        {
-         deid_type = 2;        /* mac */
+         reid_type = 2;        /* mac */
        }
-      else if (unformat (input, "seid %U/%d", unformat_ip4_address,
-                        &seid4, &len))
+      else if (unformat (input, "leid %U/%d", unformat_ip4_address,
+                        &leid4, &len))
        {
-         seid_type = 0;        /* ipv4 */
-         seid_len = len;
+         leid_type = 0;        /* ipv4 */
+         leid_len = len;
        }
-      else if (unformat (input, "seid %U/%d", unformat_ip6_address,
-                        &seid6, &len))
+      else if (unformat (input, "leid %U/%d", unformat_ip6_address,
+                        &leid6, &len))
        {
-         seid_type = 1;        /* ipv6 */
-         seid_len = len;
+         leid_type = 1;        /* ipv6 */
+         leid_len = len;
        }
-      else if (unformat (input, "seid %U", unformat_ethernet_address,
-                        seid_mac))
+      else if (unformat (input, "leid %U", unformat_ethernet_address,
+                        leid_mac))
        {
-         seid_type = 2;        /* mac */
+         leid_type = 2;        /* mac */
        }
       else if (unformat (input, "vni %d", &vni))
        {
@@ -12737,38 +13087,38 @@ api_lisp_add_del_adjacency (vat_main_t * vam)
        }
     }
 
-  if ((u8) ~ 0 == deid_type)
+  if ((u8) ~ 0 == reid_type)
     {
       errmsg ("missing params!");
       return -99;
     }
 
-  if (seid_type != deid_type)
+  if (leid_type != reid_type)
     {
-      errmsg ("source and destination EIDs are of different types!");
+      errmsg ("remote and local EIDs are of different types!");
       return -99;
     }
 
   M (LISP_ADD_DEL_ADJACENCY, lisp_add_del_adjacency);
   mp->is_add = is_add;
   mp->vni = htonl (vni);
-  mp->seid_len = seid_len;
-  mp->deid_len = deid_len;
-  mp->eid_type = deid_type;
+  mp->leid_len = leid_len;
+  mp->reid_len = reid_len;
+  mp->eid_type = reid_type;
 
   switch (mp->eid_type)
     {
     case 0:
-      clib_memcpy (mp->seid, &seid4, sizeof (seid4));
-      clib_memcpy (mp->deid, &deid4, sizeof (deid4));
+      clib_memcpy (mp->leid, &leid4, sizeof (leid4));
+      clib_memcpy (mp->reid, &reid4, sizeof (reid4));
       break;
     case 1:
-      clib_memcpy (mp->seid, &seid6, sizeof (seid6));
-      clib_memcpy (mp->deid, &deid6, sizeof (deid6));
+      clib_memcpy (mp->leid, &leid6, sizeof (leid6));
+      clib_memcpy (mp->reid, &reid6, sizeof (reid6));
       break;
     case 2:
-      clib_memcpy (mp->seid, seid_mac, 6);
-      clib_memcpy (mp->deid, deid_mac, 6);
+      clib_memcpy (mp->leid, leid_mac, 6);
+      clib_memcpy (mp->reid, reid_mac, 6);
       break;
     default:
       errmsg ("unknown EID type %d!", mp->eid_type);
@@ -12963,7 +13313,7 @@ api_lisp_locator_dump (vat_main_t * vam)
       return -99;
     }
 
-  if (vec_len (ls_name) > 63)
+  if (vec_len (ls_name) > 62)
     {
       errmsg ("error: locator set name too long!");
       return -99;
@@ -12983,7 +13333,8 @@ api_lisp_locator_dump (vat_main_t * vam)
   else
     {
       vec_add1 (ls_name, 0);
-      strncpy ((char *) mp->ls_name, (char *) ls_name, sizeof (mp->ls_name));
+      strncpy ((char *) mp->ls_name, (char *) ls_name,
+              sizeof (mp->ls_name) - 1);
     }
 
   /* send it... */
@@ -15175,6 +15526,14 @@ _(sw_interface_set_l2_bridge,                                           \
   "<intfc> | sw_if_index <id> bd_id <bridge-domain-id>\n"         \
   "[shg <split-horizon-group>] [bvi]\n"                                 \
   "enable | disable")                                                   \
+_(sw_interface_set_dpdk_hqos_pipe,                                      \
+  "rx <intfc> | sw_if_index <id> subport <subport-id> pipe <pipe-id>\n" \
+  "profile <profile-id>\n")                                             \
+_(sw_interface_set_dpdk_hqos_subport,                                   \
+  "rx <intfc> | sw_if_index <id> subport <subport-id> [rate <n>]\n"     \
+  "[bktsize <n>] [tc0 <n>] [tc1 <n>] [tc2 <n>] [tc3 <n>] [period <n>]\n") \
+_(sw_interface_set_dpdk_hqos_tctbl,                                     \
+  "rx <intfc> | sw_if_index <id> entry <n> tc <n> queue <n>\n")         \
 _(bridge_domain_add_del,                                                \
   "bd_id <bridge-domain-id> [flood 1|0] [uu-flood 1|0] [forward 1|0] [learn 1|0] [arp-term 1|0] [del]\n")\
 _(bridge_domain_dump, "[bd_id <bridge-domain-id>]\n")     \
@@ -15387,10 +15746,10 @@ _(lisp_add_del_remote_mapping, "add|del vni <vni> eid <dest-eid> "      \
                                "rloc <locator> p <prio> "               \
                                "w <weight> [rloc <loc> ... ] "          \
                                "action <action> [del-all]")             \
-_(lisp_add_del_adjacency, "add|del vni <vni> deid <dest-eid> seid "     \
-                          "<src-eid> rloc <locator> p <prio> w <weight>"\
-                          "[rloc <loc> ... ] action <action>")          \
+_(lisp_add_del_adjacency, "add|del vni <vni> reid <remote-eid> leid "   \
+                          "<local-eid>")                                \
 _(lisp_pitr_set_locator_set, "locator-set <loc-set-name> | del")        \
+_(lisp_map_request_mode, "src-dst|dst-only")                            \
 _(lisp_add_del_map_request_itr_rlocs, "<loc-set-name> [del]")           \
 _(lisp_eid_table_add_del_map, "[del] vni <vni> vrf <vrf>")              \
 _(lisp_locator_set_dump, "[local | remote]")                            \
@@ -15404,6 +15763,7 @@ _(lisp_map_resolver_dump, "")                                           \
 _(show_lisp_status, "")                                                 \
 _(lisp_get_map_request_itr_rlocs, "")                                   \
 _(show_lisp_pitr, "")                                                   \
+_(show_lisp_map_request_mode, "")                                       \
 _(af_packet_create, "name <host interface name> [hw_addr <mac>]")       \
 _(af_packet_delete, "name <host interface name>")                       \
 _(policer_add_del, "name <policer name> <params> [del]")                \