* limitations under the License.
*/
/**
- * bier_dispositon : The BIER dispositon object
+ * bier_disposition : The BIER disposition object
*
- * A BIER dispositon object is present in the IP mcast output list
- * and represents the dispositon of a BIER bitmask. After BIER header
- * dispositon the packet is forward within the appropriate/specifid
+ * A BIER disposition object is present in the IP mcast output list
+ * and represents the disposition of a BIER bitmask. After BIER header
+ * disposition the packet is forward within the appropriate/specified
* BIER table
*/
fib_path_list_contribute_forwarding(pli,
fib_forw_chain_type_from_dpo_proto(
bier_hdr_proto_to_dpo(pproto)),
+ FIB_PATH_LIST_FWD_FLAG_COLLAPSE,
&via_dpo);
bier_disp_entry_path_list_walk_ctx_t ctx = {
old_pli = *pli;
/*
- * create a new or update the exisitng path-list for this
+ * create a new or update the existing path-list for this
* payload protocol
*/
if (FIB_NODE_INDEX_INVALID == *pli)
old_pli = *pli;
/*
- * update the exisitng path-list for this payload protocol
+ * update the existing path-list for this payload protocol
*/
if (FIB_NODE_INDEX_INVALID != *pli)
{
bde = bier_disp_entry_get(bdei);
- s = format(s, "bier-disp:[%d]", bdei);
+ s = format(s, "%Ubier-disp:[%d]", format_white_space, indent, bdei);
FOR_EACH_BIER_HDR_PROTO(pproto)
{
if (INDEX_INVALID != bde->bde_pl[pproto])
{
- s = format(s, "\n");
- s = fib_path_list_format(bde->bde_pl[pproto], s);
+ s = format(s, "\n%U%U\n",
+ format_white_space, indent+2,
+ format_bier_hdr_proto, pproto);
+ s = format(s, "%U", format_fib_path_list, bde->bde_pl[pproto], indent+4);
if (flags & BIER_SHOW_DETAIL)
{
s = format(s, "\n%UForwarding:",
- format_white_space, indent);
+ format_white_space, indent+4);
s = format(s, "\n%Urpf-id:%d",
- format_white_space, indent+1,
+ format_white_space, indent+6,
bde->bde_fwd[pproto].bde_rpf_id);
s = format(s, "\n%U%U",
- format_white_space, indent+1,
+ format_white_space, indent+6,
format_dpo_id, &bde->bde_fwd[pproto].bde_dpo, indent+2);
}
}
static void
bier_disp_entry_dpo_mem_show (void)
{
- fib_show_memory_usage("BIER dispositon",
+ fib_show_memory_usage("BIER disposition",
pool_elts(bier_disp_entry_pool),
pool_len(bier_disp_entry_pool),
sizeof(bier_disp_entry_t));
}
else
{
- vlib_cli_output(vm, "%U", format_bier_disp_entry, bdei, 1,
- BIER_SHOW_DETAIL);
+ if (pool_is_free_index(bier_disp_entry_pool, bdei))
+ {
+ vlib_cli_output(vm, "No such BIER disp entry: %d", bdei);
+ }
+ else
+ {
+ vlib_cli_output(vm, "%U", format_bier_disp_entry, bdei, 1,
+ BIER_SHOW_DETAIL);
+ }
}
return (NULL);
}