diff options
Diffstat (limited to 'vpp')
-rw-r--r-- | vpp/vpp-api/api.c | 15 | ||||
-rw-r--r-- | vpp/vpp-api/custom_dump.c | 16 | ||||
-rw-r--r-- | vpp/vpp-api/vpe.api | 8 |
3 files changed, 33 insertions, 6 deletions
diff --git a/vpp/vpp-api/api.c b/vpp/vpp-api/api.c index b10baf08..f4f08516 100644 --- a/vpp/vpp-api/api.c +++ b/vpp/vpp-api/api.c @@ -5896,7 +5896,7 @@ send_eid_table_map_pair (hash_pair_t * p, rmp->_vl_msg_id = ntohs (VL_API_LISP_EID_TABLE_MAP_DETAILS); rmp->vni = clib_host_to_net_u32 (p->key); - rmp->vrf = clib_host_to_net_u32 (p->value[0]); + rmp->dp_table = clib_host_to_net_u32 (p->value[0]); rmp->context = context; vl_msg_api_send_shmem (q, (u8 *) & rmp); } @@ -5908,14 +5908,25 @@ vl_api_lisp_eid_table_map_dump_t_handler (vl_api_lisp_eid_table_map_dump_t * unix_shared_memory_queue_t *q = NULL; lisp_cp_main_t *lcm = vnet_lisp_cp_get_main (); hash_pair_t *p; + uword *vni_table = 0; q = vl_api_client_index_to_input_queue (mp->client_index); if (q == 0) { return; } + + if (mp->is_l2) + { + vni_table = lcm->bd_id_by_vni; + } + else + { + vni_table = lcm->table_id_by_vni; + } + /* *INDENT-OFF* */ - hash_foreach_pair (p, lcm->table_id_by_vni, + hash_foreach_pair (p, vni_table, ({ send_eid_table_map_pair (p, q, mp->context); })); diff --git a/vpp/vpp-api/custom_dump.c b/vpp/vpp-api/custom_dump.c index 4737d3b2..d1098d36 100644 --- a/vpp/vpp-api/custom_dump.c +++ b/vpp/vpp-api/custom_dump.c @@ -2534,6 +2534,21 @@ static void *vl_api_lisp_eid_table_dump_t_print FINISH; } +static void *vl_api_lisp_eid_table_map_dump_t_print + (vl_api_lisp_eid_table_map_dump_t * mp, void *handle) +{ + u8 *s; + + s = format (0, "SCRIPT: lisp_eid_table_map_dump "); + + if (mp->is_l2) + s = format (s, "l2"); + else + s = format (s, "l3"); + + FINISH; +} + static void *vl_api_ipsec_gre_add_del_tunnel_t_print (vl_api_ipsec_gre_add_del_tunnel_t * mp, void *handle) { @@ -2571,7 +2586,6 @@ static void *vl_api_ipsec_gre_tunnel_dump_t_print } #define foreach_custom_print_no_arg_function \ -_(lisp_eid_table_map_dump) \ _(lisp_eid_table_vni_dump) \ _(lisp_map_resolver_dump) \ _(lisp_gpe_tunnel_dump) diff --git a/vpp/vpp-api/vpe.api b/vpp/vpp-api/vpe.api index fb0a4145..1143c436 100644 --- a/vpp/vpp-api/vpe.api +++ b/vpp/vpp-api/vpe.api @@ -2860,25 +2860,27 @@ define lisp_eid_table_dump u8 filter; }; -/** \brief Shows relationship between vni and vrf - @param vrf - VRF index +/** \brief Shows relationship between vni and vrf/bd + @param dp_table - VRF index or bridge domain index @param vni - vitual network instance */ define lisp_eid_table_map_details { u32 context; u32 vni; - u32 vrf; + u32 dp_table; }; /** \brief Request for lisp_eid_table_map_details @param client_index - opaque cookie to identify the sender @param context - sender context, to match reply w/ request + @param is_l2 - if set dump vni/bd mappings else vni/vrf */ define lisp_eid_table_map_dump { u32 client_index; u32 context; + u8 is_l2; }; /** \brief Dumps all VNIs used in mappings |