Add vxlan-bypass feature to IP6 forwarding path
[vpp.git] / src / vat / api_format.c
index 653cf79..d4834b7 100644 (file)
@@ -48,6 +48,7 @@
 #include <vnet/span/span.h>
 #include <vnet/policer/policer.h>
 #include <vnet/policer/police.h>
+#include <vnet/mfib/mfib_types.h>
 
 #include "vat/json_format.h"
 
@@ -70,6 +71,7 @@
 #include <vpp/api/vpe_all_api_h.h>
 #undef vl_printfun
 
+#define __plugin_msg_base 0
 #include <vlibapi/vat_helper_macros.h>
 
 f64
@@ -504,6 +506,53 @@ unformat_flow_classify_table_type (unformat_input_t * input, va_list * va)
   return 1;
 }
 
+static const char *mfib_flag_names[] = MFIB_ENTRY_NAMES_SHORT;
+static const char *mfib_flag_long_names[] = MFIB_ENTRY_NAMES_LONG;
+static const char *mfib_itf_flag_long_names[] = MFIB_ITF_NAMES_LONG;
+static const char *mfib_itf_flag_names[] = MFIB_ITF_NAMES_SHORT;
+
+uword
+unformat_mfib_itf_flags (unformat_input_t * input, va_list * args)
+{
+  mfib_itf_flags_t old, *iflags = va_arg (*args, mfib_itf_flags_t *);
+  mfib_itf_attribute_t attr;
+
+  old = *iflags;
+  FOR_EACH_MFIB_ITF_ATTRIBUTE (attr)
+  {
+    if (unformat (input, mfib_itf_flag_long_names[attr]))
+      *iflags |= (1 << attr);
+  }
+  FOR_EACH_MFIB_ITF_ATTRIBUTE (attr)
+  {
+    if (unformat (input, mfib_itf_flag_names[attr]))
+      *iflags |= (1 << attr);
+  }
+
+  return (old == *iflags ? 0 : 1);
+}
+
+uword
+unformat_mfib_entry_flags (unformat_input_t * input, va_list * args)
+{
+  mfib_entry_flags_t old, *eflags = va_arg (*args, mfib_entry_flags_t *);
+  mfib_entry_attribute_t attr;
+
+  old = *eflags;
+  FOR_EACH_MFIB_ATTRIBUTE (attr)
+  {
+    if (unformat (input, mfib_flag_long_names[attr]))
+      *eflags |= (1 << attr);
+  }
+  FOR_EACH_MFIB_ATTRIBUTE (attr)
+  {
+    if (unformat (input, mfib_flag_names[attr]))
+      *eflags |= (1 << attr);
+  }
+
+  return (old == *eflags ? 0 : 1);
+}
+
 #if (VPP_API_TEST_BUILTIN==0)
 u8 *
 format_ip4_address (u8 * s, va_list * args)
@@ -2042,6 +2091,42 @@ static void vl_api_vnet_ip4_fib_counters_t_handler_json
     }
 }
 
+static void vl_api_vnet_ip4_nbr_counters_t_handler
+  (vl_api_vnet_ip4_nbr_counters_t * mp)
+{
+  /* not supported */
+}
+
+static void vl_api_vnet_ip4_nbr_counters_t_handler_json
+  (vl_api_vnet_ip4_nbr_counters_t * mp)
+{
+  vat_main_t *vam = &vat_main;
+  vl_api_ip4_nbr_counter_t *v;
+  ip4_nbr_counter_t *counter;
+  u32 sw_if_index;
+  u32 count;
+  int i;
+
+  sw_if_index = ntohl (mp->sw_if_index);
+  count = ntohl (mp->count);
+  vec_validate (vam->ip4_nbr_counters, sw_if_index);
+
+  if (mp->begin)
+    vec_free (vam->ip4_nbr_counters[sw_if_index]);
+
+  v = (vl_api_ip4_nbr_counter_t *) & mp->c;
+  for (i = 0; i < count; i++)
+    {
+      vec_validate (vam->ip4_nbr_counters[sw_if_index], i);
+      counter = &vam->ip4_nbr_counters[sw_if_index][i];
+      counter->address.s_addr = v->address;
+      counter->packets = clib_net_to_host_u64 (v->packets);
+      counter->bytes = clib_net_to_host_u64 (v->bytes);
+      counter->linkt = v->link_type;
+      v++;
+    }
+}
+
 static void vl_api_vnet_ip6_fib_counters_t_handler
   (vl_api_vnet_ip6_fib_counters_t * mp)
 {
@@ -2087,6 +2172,43 @@ static void vl_api_vnet_ip6_fib_counters_t_handler_json
     }
 }
 
+static void vl_api_vnet_ip6_nbr_counters_t_handler
+  (vl_api_vnet_ip6_nbr_counters_t * mp)
+{
+  /* not supported */
+}
+
+static void vl_api_vnet_ip6_nbr_counters_t_handler_json
+  (vl_api_vnet_ip6_nbr_counters_t * mp)
+{
+  vat_main_t *vam = &vat_main;
+  vl_api_ip6_nbr_counter_t *v;
+  ip6_nbr_counter_t *counter;
+  struct in6_addr ip6;
+  u32 sw_if_index;
+  u32 count;
+  int i;
+
+  sw_if_index = ntohl (mp->sw_if_index);
+  count = ntohl (mp->count);
+  vec_validate (vam->ip6_nbr_counters, sw_if_index);
+
+  if (mp->begin)
+    vec_free (vam->ip6_nbr_counters[sw_if_index]);
+
+  v = (vl_api_ip6_nbr_counter_t *) & mp->c;
+  for (i = 0; i < count; i++)
+    {
+      vec_validate (vam->ip6_nbr_counters[sw_if_index], i);
+      counter = &vam->ip6_nbr_counters[sw_if_index][i];
+      clib_memcpy (&ip6, &v->address, sizeof (ip6));
+      counter->address = ip6;
+      counter->packets = clib_net_to_host_u64 (v->packets);
+      counter->bytes = clib_net_to_host_u64 (v->bytes);
+      v++;
+    }
+}
+
 static void vl_api_get_first_msg_id_reply_t_handler
   (vl_api_get_first_msg_id_reply_t * mp)
 {
@@ -2560,6 +2682,161 @@ static void
   vec_free (s);
 }
 
+static void
+api_lisp_gpe_fwd_entry_net_to_host (vl_api_lisp_gpe_fwd_entry_t * e)
+{
+  e->dp_table = clib_net_to_host_u32 (e->dp_table);
+  e->fwd_entry_index = clib_net_to_host_u32 (e->fwd_entry_index);
+}
+
+static void
+  lisp_gpe_fwd_entries_get_reply_t_net_to_host
+  (vl_api_lisp_gpe_fwd_entries_get_reply_t * mp)
+{
+  u32 i;
+
+  mp->count = clib_net_to_host_u32 (mp->count);
+  for (i = 0; i < mp->count; i++)
+    {
+      api_lisp_gpe_fwd_entry_net_to_host (&mp->entries[i]);
+    }
+}
+
+static void
+  vl_api_lisp_gpe_fwd_entry_path_details_t_handler
+  (vl_api_lisp_gpe_fwd_entry_path_details_t * mp)
+{
+  vat_main_t *vam = &vat_main;
+  u8 *(*format_ip_address_fcn) (u8 *, va_list *) = 0;
+
+  if (mp->lcl_loc.is_ip4)
+    format_ip_address_fcn = format_ip4_address;
+  else
+    format_ip_address_fcn = format_ip6_address;
+
+  print (vam->ofp, "w:%d %30U %30U", mp->rmt_loc.weight,
+        format_ip_address_fcn, &mp->lcl_loc,
+        format_ip_address_fcn, &mp->rmt_loc);
+}
+
+static void
+lisp_fill_locator_node (vat_json_node_t * n, vl_api_lisp_gpe_locator_t * loc)
+{
+  struct in6_addr ip6;
+  struct in_addr ip4;
+
+  if (loc->is_ip4)
+    {
+      clib_memcpy (&ip4, loc->addr, sizeof (ip4));
+      vat_json_object_add_ip4 (n, "address", ip4);
+    }
+  else
+    {
+      clib_memcpy (&ip6, loc->addr, sizeof (ip6));
+      vat_json_object_add_ip6 (n, "address", ip6);
+    }
+  vat_json_object_add_uint (n, "weight", loc->weight);
+}
+
+static void
+  vl_api_lisp_gpe_fwd_entry_path_details_t_handler_json
+  (vl_api_lisp_gpe_fwd_entry_path_details_t * mp)
+{
+  vat_main_t *vam = &vat_main;
+  vat_json_node_t *node = NULL;
+  vat_json_node_t *loc_node;
+
+  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);
+
+  loc_node = vat_json_object_add (node, "local_locator");
+  vat_json_init_object (loc_node);
+  lisp_fill_locator_node (loc_node, &mp->lcl_loc);
+
+  loc_node = vat_json_object_add (node, "remote_locator");
+  vat_json_init_object (loc_node);
+  lisp_fill_locator_node (loc_node, &mp->rmt_loc);
+}
+
+static void
+  vl_api_lisp_gpe_fwd_entries_get_reply_t_handler
+  (vl_api_lisp_gpe_fwd_entries_get_reply_t * mp)
+{
+  vat_main_t *vam = &vat_main;
+  u32 i;
+  int retval = clib_net_to_host_u32 (mp->retval);
+  vl_api_lisp_gpe_fwd_entry_t *e;
+
+  if (retval)
+    goto end;
+
+  lisp_gpe_fwd_entries_get_reply_t_net_to_host (mp);
+
+  for (i = 0; i < mp->count; i++)
+    {
+      e = &mp->entries[i];
+      print (vam->ofp, "%10d %10d %U %40U", e->fwd_entry_index, e->dp_table,
+            format_lisp_flat_eid, e->eid_type, e->leid, e->leid_prefix_len,
+            format_lisp_flat_eid, e->eid_type, e->reid, e->reid_prefix_len);
+    }
+
+end:
+  vam->retval = retval;
+  vam->result_ready = 1;
+}
+
+static void
+  vl_api_lisp_gpe_fwd_entries_get_reply_t_handler_json
+  (vl_api_lisp_gpe_fwd_entries_get_reply_t * mp)
+{
+  u8 *s = 0;
+  vat_main_t *vam = &vat_main;
+  vat_json_node_t *e = 0, root;
+  u32 i;
+  int retval = clib_net_to_host_u32 (mp->retval);
+  vl_api_lisp_gpe_fwd_entry_t *fwd;
+
+  if (retval)
+    goto end;
+
+  lisp_gpe_fwd_entries_get_reply_t_net_to_host (mp);
+  vat_json_init_array (&root);
+
+  for (i = 0; i < mp->count; i++)
+    {
+      e = vat_json_array_add (&root);
+      fwd = &mp->entries[i];
+
+      vat_json_init_object (e);
+      vat_json_object_add_int (e, "fwd_entry_index", fwd->fwd_entry_index);
+      vat_json_object_add_int (e, "dp_table", fwd->dp_table);
+
+      s = format (0, "%U", format_lisp_flat_eid, fwd->eid_type, fwd->leid,
+                 fwd->leid_prefix_len);
+      vec_add1 (s, 0);
+      vat_json_object_add_string_copy (e, "leid", s);
+      vec_free (s);
+
+      s = format (0, "%U", format_lisp_flat_eid, fwd->eid_type, fwd->reid,
+                 fwd->reid_prefix_len);
+      vec_add1 (s, 0);
+      vat_json_object_add_string_copy (e, "reid", s);
+      vec_free (s);
+    }
+
+  vat_json_print (vam->ofp, &root);
+  vat_json_free (&root);
+
+end:
+  vam->retval = retval;
+  vam->result_ready = 1;
+}
+
 static void
   vl_api_lisp_adjacencies_get_reply_t_handler
   (vl_api_lisp_adjacencies_get_reply_t * mp)
@@ -3490,6 +3767,10 @@ static void vl_api_flow_classify_details_t_handler_json
 #define vl_api_vnet_ip4_fib_counters_t_print vl_noop_handler
 #define vl_api_vnet_ip6_fib_counters_t_endian vl_noop_handler
 #define vl_api_vnet_ip6_fib_counters_t_print vl_noop_handler
+#define vl_api_vnet_ip4_nbr_counters_t_endian vl_noop_handler
+#define vl_api_vnet_ip4_nbr_counters_t_print vl_noop_handler
+#define vl_api_vnet_ip6_nbr_counters_t_endian vl_noop_handler
+#define vl_api_vnet_ip6_nbr_counters_t_print vl_noop_handler
 #define vl_api_lisp_adjacencies_get_reply_t_endian vl_noop_handler
 #define vl_api_lisp_adjacencies_get_reply_t_print vl_noop_handler
 
@@ -3514,6 +3795,7 @@ _(bridge_domain_add_del_reply)                          \
 _(sw_interface_set_l2_xconnect_reply)                   \
 _(l2fib_add_del_reply)                                  \
 _(ip_add_del_route_reply)                               \
+_(ip_mroute_add_del_reply)                              \
 _(mpls_route_add_del_reply)                             \
 _(mpls_ip_bind_unbind_reply)                            \
 _(proxy_arp_add_del_reply)                              \
@@ -3714,6 +3996,7 @@ _(TAP_MODIFY_REPLY, tap_modify_reply)                                     \
 _(TAP_DELETE_REPLY, tap_delete_reply)                                  \
 _(SW_INTERFACE_TAP_DETAILS, sw_interface_tap_details)                   \
 _(IP_ADD_DEL_ROUTE_REPLY, ip_add_del_route_reply)                      \
+_(IP_MROUTE_ADD_DEL_REPLY, ip_mroute_add_del_reply)                    \
 _(MPLS_ROUTE_ADD_DEL_REPLY, mpls_route_add_del_reply)                  \
 _(MPLS_IP_BIND_UNBIND_REPLY, mpls_ip_bind_unbind_reply)                        \
 _(PROXY_ARP_ADD_DEL_REPLY, proxy_arp_add_del_reply)                     \
@@ -3799,6 +4082,8 @@ _(DHCP_COMPL_EVENT, dhcp_compl_event)                                   \
 _(VNET_INTERFACE_COUNTERS, vnet_interface_counters)                     \
 _(VNET_IP4_FIB_COUNTERS, vnet_ip4_fib_counters)                         \
 _(VNET_IP6_FIB_COUNTERS, vnet_ip6_fib_counters)                         \
+_(VNET_IP4_NBR_COUNTERS, vnet_ip4_nbr_counters)                         \
+_(VNET_IP6_NBR_COUNTERS, vnet_ip6_nbr_counters)                         \
 _(MAP_ADD_DOMAIN_REPLY, map_add_domain_reply)                           \
 _(MAP_DEL_DOMAIN_REPLY, map_del_domain_reply)                           \
 _(MAP_ADD_DEL_RULE_REPLY, map_add_del_rule_reply)                      \
@@ -3839,6 +4124,9 @@ _(LISP_EID_TABLE_VNI_DETAILS, lisp_eid_table_vni_details)               \
 _(LISP_MAP_RESOLVER_DETAILS, lisp_map_resolver_details)                 \
 _(LISP_MAP_SERVER_DETAILS, lisp_map_server_details)                     \
 _(LISP_ADJACENCIES_GET_REPLY, lisp_adjacencies_get_reply)               \
+_(LISP_GPE_FWD_ENTRIES_GET_REPLY, lisp_gpe_fwd_entries_get_reply)       \
+_(LISP_GPE_FWD_ENTRY_PATH_DETAILS,                                      \
+  lisp_gpe_fwd_entry_path_details)                                      \
 _(SHOW_LISP_STATUS_REPLY, show_lisp_status_reply)                       \
 _(LISP_ADD_DEL_MAP_REQUEST_ITR_RLOCS_REPLY,                             \
   lisp_add_del_map_request_itr_rlocs_reply)                             \
@@ -4131,6 +4419,8 @@ dump_stats_table (vat_main_t * vam)
   u64 packets;
   ip4_fib_counter_t *c4;
   ip6_fib_counter_t *c6;
+  ip4_nbr_counter_t *n4;
+  ip6_nbr_counter_t *n6;
   int i, j;
 
   if (!vam->json_output)
@@ -4226,6 +4516,49 @@ dump_stats_table (vat_main_t * vam)
        }
     }
 
+  /* ip4 nbr counters */
+  msg_array = vat_json_object_add (&node, "ip4_nbr_counters");
+  vat_json_init_array (msg_array);
+  for (i = 0; i < vec_len (vam->ip4_nbr_counters); i++)
+    {
+      msg = vat_json_array_add (msg_array);
+      vat_json_init_object (msg);
+      vat_json_object_add_uint (msg, "sw_if_index", i);
+      counter_array = vat_json_object_add (msg, "c");
+      vat_json_init_array (counter_array);
+      for (j = 0; j < vec_len (vam->ip4_nbr_counters[i]); j++)
+       {
+         counter = vat_json_array_add (counter_array);
+         vat_json_init_object (counter);
+         n4 = &vam->ip4_nbr_counters[i][j];
+         vat_json_object_add_ip4 (counter, "address", n4->address);
+         vat_json_object_add_uint (counter, "link-type", n4->linkt);
+         vat_json_object_add_uint (counter, "packets", n4->packets);
+         vat_json_object_add_uint (counter, "bytes", n4->bytes);
+       }
+    }
+
+  /* ip6 nbr counters */
+  msg_array = vat_json_object_add (&node, "ip6_nbr_counters");
+  vat_json_init_array (msg_array);
+  for (i = 0; i < vec_len (vam->ip6_nbr_counters); i++)
+    {
+      msg = vat_json_array_add (msg_array);
+      vat_json_init_object (msg);
+      vat_json_object_add_uint (msg, "sw_if_index", i);
+      counter_array = vat_json_object_add (msg, "c");
+      vat_json_init_array (counter_array);
+      for (j = 0; j < vec_len (vam->ip6_nbr_counters[i]); j++)
+       {
+         counter = vat_json_array_add (counter_array);
+         vat_json_init_object (counter);
+         n6 = &vam->ip6_nbr_counters[i][j];
+         vat_json_object_add_ip6 (counter, "address", n6->address);
+         vat_json_object_add_uint (counter, "packets", n6->packets);
+         vat_json_object_add_uint (counter, "bytes", n6->bytes);
+       }
+    }
+
   vat_json_print (vam->ofp, &node);
   vat_json_free (&node);
 
@@ -5158,7 +5491,7 @@ api_sw_interface_set_vxlan_bypass (vat_main_t * vam)
   f64 timeout;
   u32 sw_if_index = 0;
   u8 sw_if_index_set = 0;
-  u8 is_enable = 0;
+  u8 is_enable = 1;
   u8 is_ipv6 = 0;
 
   /* Parse args required to build the message */
@@ -6258,6 +6591,126 @@ api_ip_add_del_route (vat_main_t * vam)
   return (vam->retval);
 }
 
+static int
+api_ip_mroute_add_del (vat_main_t * vam)
+{
+  unformat_input_t *i = vam->input;
+  vl_api_ip_mroute_add_del_t *mp;
+  f64 timeout;
+  u32 sw_if_index = ~0, vrf_id = 0;
+  u8 is_ipv6 = 0;
+  u8 is_local = 0;
+  u8 create_vrf_if_needed = 0;
+  u8 is_add = 1;
+  u8 address_set = 0;
+  u32 grp_address_length = 0;
+  ip4_address_t v4_grp_address, v4_src_address;
+  ip6_address_t v6_grp_address, v6_src_address;
+  mfib_itf_flags_t iflags = 0;
+  mfib_entry_flags_t eflags = 0;
+
+  /* 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))
+       ;
+      else if (unformat (i, "%U %U",
+                        unformat_ip4_address, &v4_src_address,
+                        unformat_ip4_address, &v4_grp_address))
+       {
+         grp_address_length = 64;
+         address_set = 1;
+         is_ipv6 = 0;
+       }
+      else if (unformat (i, "%U %U",
+                        unformat_ip6_address, &v6_src_address,
+                        unformat_ip6_address, &v6_grp_address))
+       {
+         grp_address_length = 256;
+         address_set = 1;
+         is_ipv6 = 1;
+       }
+      else if (unformat (i, "%U", unformat_ip4_address, &v4_grp_address))
+       {
+         memset (&v4_src_address, 0, sizeof (v4_src_address));
+         grp_address_length = 32;
+         address_set = 1;
+         is_ipv6 = 0;
+       }
+      else if (unformat (i, "%U", unformat_ip6_address, &v6_grp_address))
+       {
+         memset (&v6_src_address, 0, sizeof (v6_src_address));
+         grp_address_length = 128;
+         address_set = 1;
+         is_ipv6 = 1;
+       }
+      else if (unformat (i, "/%d", &grp_address_length))
+       ;
+      else if (unformat (i, "local"))
+       {
+         is_local = 1;
+       }
+      else if (unformat (i, "del"))
+       is_add = 0;
+      else if (unformat (i, "add"))
+       is_add = 1;
+      else if (unformat (i, "vrf %d", &vrf_id))
+       ;
+      else if (unformat (i, "create-vrf"))
+       create_vrf_if_needed = 1;
+      else if (unformat (i, "%U", unformat_mfib_itf_flags, &iflags))
+       ;
+      else if (unformat (i, "%U", unformat_mfib_entry_flags, &eflags))
+       ;
+      else
+       {
+         clib_warning ("parse error '%U'", format_unformat_error, i);
+         return -99;
+       }
+    }
+
+  if (address_set == 0)
+    {
+      errmsg ("missing addresses\n");
+      return -99;
+    }
+
+  /* Construct the API message */
+  M (IP_MROUTE_ADD_DEL, ip_mroute_add_del);
+
+  mp->next_hop_sw_if_index = ntohl (sw_if_index);
+  mp->table_id = ntohl (vrf_id);
+  mp->create_vrf_if_needed = create_vrf_if_needed;
+
+  mp->is_add = is_add;
+  mp->is_ipv6 = is_ipv6;
+  mp->is_local = is_local;
+  mp->itf_flags = ntohl (iflags);
+  mp->entry_flags = ntohl (eflags);
+  mp->grp_address_length = grp_address_length;
+  mp->grp_address_length = ntohs (mp->grp_address_length);
+
+  if (is_ipv6)
+    {
+      clib_memcpy (mp->grp_address, &v6_grp_address, sizeof (v6_grp_address));
+      clib_memcpy (mp->src_address, &v6_src_address, sizeof (v6_src_address));
+    }
+  else
+    {
+      clib_memcpy (mp->grp_address, &v4_grp_address, sizeof (v4_grp_address));
+      clib_memcpy (mp->src_address, &v4_src_address, sizeof (v4_src_address));
+
+    }
+
+  /* send it... */
+  S;
+  /* Wait for a reply... */
+  W;
+
+  /* Return the good/bad news */
+  return (vam->retval);
+}
+
 static int
 api_mpls_route_add_del (vat_main_t * vam)
 {
@@ -11904,11 +12357,7 @@ api_ipsec_sad_add_del_entry (vat_main_t * vam)
        if (unformat
            (i, "integ_alg %U", unformat_ipsec_integ_alg, &integ_alg))
        {
-#if DPDK_CRYPTO==1
-         if (integ_alg < IPSEC_INTEG_ALG_NONE ||
-#else
          if (integ_alg < IPSEC_INTEG_ALG_SHA1_96 ||
-#endif
              integ_alg >= IPSEC_INTEG_N_ALG)
            {
              clib_warning ("unsupported integ-alg: '%U'",
@@ -11926,33 +12375,6 @@ api_ipsec_sad_add_del_entry (vat_main_t * vam)
 
     }
 
-#if DPDK_CRYPTO==1
-  /*Special cases, aes-gcm-128 encryption */
-  if (crypto_alg == IPSEC_CRYPTO_ALG_AES_GCM_128)
-    {
-      if (integ_alg != IPSEC_INTEG_ALG_NONE
-         && integ_alg != IPSEC_INTEG_ALG_AES_GCM_128)
-       {
-         clib_warning
-           ("unsupported: aes-gcm-128 crypto-alg needs none as integ-alg");
-         return -99;
-       }
-      else                     /*set integ-alg internally to aes-gcm-128 */
-       integ_alg = IPSEC_INTEG_ALG_AES_GCM_128;
-    }
-  else if (integ_alg == IPSEC_INTEG_ALG_AES_GCM_128)
-    {
-      clib_warning ("unsupported integ-alg: aes-gcm-128");
-      return -99;
-    }
-  else if (integ_alg == IPSEC_INTEG_ALG_NONE)
-    {
-      clib_warning ("unsupported integ-alg: none");
-      return -99;
-    }
-#endif
-
-
   M (IPSEC_SAD_ADD_DEL_ENTRY, ipsec_sad_add_del_entry);
 
   mp->sad_id = ntohl (sad_id);
@@ -14590,6 +15012,58 @@ api_lisp_eid_table_dump (vat_main_t * vam)
   return 0;
 }
 
+static int
+api_lisp_gpe_fwd_entries_get (vat_main_t * vam)
+{
+  unformat_input_t *i = vam->input;
+  vl_api_lisp_gpe_fwd_entries_get_t *mp;
+  f64 timeout = ~0;
+  u8 vni_set = 0;
+  u32 vni = ~0;
+
+  while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
+    {
+      if (unformat (i, "vni %d", &vni))
+       {
+         vni_set = 1;
+       }
+      else
+       {
+         errmsg ("parse error '%U'", format_unformat_error, i);
+         return -99;
+       }
+    }
+
+  if (!vni_set)
+    {
+      errmsg ("vni not set!");
+      return -99;
+    }
+
+  if (!vam->json_output)
+    {
+      print (vam->ofp, "%10s %10s %s %40s", "fwd_index", "dp_table",
+            "leid", "reid");
+    }
+
+  M (LISP_GPE_FWD_ENTRIES_GET, lisp_gpe_fwd_entries_get);
+  mp->vni = clib_host_to_net_u32 (vni);
+
+  /* send it... */
+  S;
+
+  /* Wait for a reply... */
+  W;
+
+  /* NOTREACHED */
+  return 0;
+}
+
+#define vl_api_lisp_gpe_fwd_entries_get_reply_t_endian vl_noop_handler
+#define vl_api_lisp_gpe_fwd_entries_get_reply_t_print vl_noop_handler
+#define vl_api_lisp_gpe_fwd_entry_path_details_t_endian vl_noop_handler
+#define vl_api_lisp_gpe_fwd_entry_path_details_t_print vl_noop_handler
+
 static int
 api_lisp_adjacencies_get (vat_main_t * vam)
 {
@@ -14713,6 +15187,50 @@ api_show_lisp_status (vat_main_t * vam)
   return 0;
 }
 
+static int
+api_lisp_gpe_fwd_entry_path_dump (vat_main_t * vam)
+{
+  vl_api_lisp_gpe_fwd_entry_path_dump_t *mp;
+  f64 timeout = ~0;
+  unformat_input_t *i = vam->input;
+  u32 fwd_entry_index = ~0;
+
+  while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
+    {
+      if (unformat (i, "index %d", &fwd_entry_index))
+       ;
+      else
+       break;
+    }
+
+  if (~0 == fwd_entry_index)
+    {
+      errmsg ("no index specified!");
+      return -99;
+    }
+
+  if (!vam->json_output)
+    {
+      print (vam->ofp, "first line");
+    }
+
+  M (LISP_GPE_FWD_ENTRY_PATH_DUMP, lisp_gpe_fwd_entry_path_dump);
+
+  /* send it... */
+  S;
+  /* Use a control ping for synchronization */
+  {
+    vl_api_control_ping_t *mp;
+    M (CONTROL_PING, control_ping);
+    S;
+  }
+  /* Wait for a reply... */
+  W;
+
+  /* NOTREACHED */
+  return 0;
+}
+
 static int
 api_lisp_get_map_request_itr_rlocs (vat_main_t * vam)
 {
@@ -17358,7 +17876,7 @@ _(sw_interface_set_mpls_enable,                                         \
 _(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")            \
+  "<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")                                                   \
@@ -17387,6 +17905,9 @@ _(ip_add_del_route,                                                     \
   "[<intfc> | sw_if_index <id>] [resolve-attempts <n>]\n"               \
   "[weight <n>] [drop] [local] [classify <n>] [del]\n"                  \
   "[multipath] [count <n>]")                                            \
+_(ip_mroute_add_del,                                                    \
+  "<src> <grp>/<mask> [table-id <n>]\n"                                 \
+  "[<intfc> | sw_if_index <id>] [local] [del]")                         \
 _(mpls_route_add_del,                                                   \
   "<label> <eos> via <addr> [table-id <n>]\n"                           \
   "[<intfc> | sw_if_index <id>] [resolve-attempts <n>]\n"               \
@@ -17597,6 +18118,8 @@ _(lisp_eid_table_map_dump, "l2|l3")                                     \
 _(lisp_map_resolver_dump, "")                                           \
 _(lisp_map_server_dump, "")                                             \
 _(lisp_adjacencies_get, "vni <vni>")                                    \
+_(lisp_gpe_fwd_entries_get, "vni <vni>")                                \
+_(lisp_gpe_fwd_entry_path_dump, "index <fwd_entry_index>")              \
 _(show_lisp_rloc_probe_state, "")                                       \
 _(show_lisp_map_register_state, "")                                     \
 _(show_lisp_status, "")                                                 \