Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
ip: Replace Sematics for Interface IP addresses
[vpp.git]
/
src
/
vnet
/
bier
/
bier_disp_entry.c
diff --git
a/src/vnet/bier/bier_disp_entry.c
b/src/vnet/bier/bier_disp_entry.c
index
3326aba
..
ae1256e
100644
(file)
--- a/
src/vnet/bier/bier_disp_entry.c
+++ b/
src/vnet/bier/bier_disp_entry.c
@@
-13,11
+13,11
@@
* limitations under the License.
*/
/**
* limitations under the License.
*/
/**
- * bier_disposit
on : The BIER disposit
on object
+ * bier_disposit
ion : The BIER dispositi
on object
*
*
- * A BIER dispositon object is present in the IP mcast output list
- * and represents the dispositon of a BIER bitmask. After BIER header
- * disposit
on the packet is forward within the appropriate/specifi
d
+ * A BIER disposit
i
on object is present in the IP mcast output list
+ * and represents the disposit
i
on of a BIER bitmask. After BIER header
+ * disposit
ion the packet is forward within the appropriate/specifie
d
* BIER table
*/
* BIER table
*/
@@
-145,6
+145,7
@@
bier_disp_entry_restack (bier_disp_entry_t *bde,
fib_path_list_contribute_forwarding(pli,
fib_forw_chain_type_from_dpo_proto(
bier_hdr_proto_to_dpo(pproto)),
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 = {
&via_dpo);
bier_disp_entry_path_list_walk_ctx_t ctx = {
@@
-174,7
+175,7
@@
bier_disp_entry_path_add (index_t bdei,
old_pli = *pli;
/*
old_pli = *pli;
/*
- * create a new or update the exis
it
ng path-list for this
+ * create a new or update the exis
ti
ng path-list for this
* payload protocol
*/
if (FIB_NODE_INDEX_INVALID == *pli)
* payload protocol
*/
if (FIB_NODE_INDEX_INVALID == *pli)
@@
-210,7
+211,7
@@
bier_disp_entry_path_remove (index_t bdei,
old_pli = *pli;
/*
old_pli = *pli;
/*
- * update the exis
it
ng path-list for this payload protocol
+ * update the exis
ti
ng path-list for this payload protocol
*/
if (FIB_NODE_INDEX_INVALID != *pli)
{
*/
if (FIB_NODE_INDEX_INVALID != *pli)
{
@@
-254,24
+255,26
@@
format_bier_disp_entry (u8* s, va_list *args)
bde = bier_disp_entry_get(bdei);
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])
{
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:",
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",
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",
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);
}
}
format_dpo_id, &bde->bde_fwd[pproto].bde_dpo, indent+2);
}
}
@@
-312,7
+315,7
@@
bier_disp_entry_dpo_unlock (dpo_id_t *dpo)
static void
bier_disp_entry_dpo_mem_show (void)
{
static void
bier_disp_entry_dpo_mem_show (void)
{
- fib_show_memory_usage("BIER dispositon",
+ fib_show_memory_usage("BIER disposit
i
on",
pool_elts(bier_disp_entry_pool),
pool_len(bier_disp_entry_pool),
sizeof(bier_disp_entry_t));
pool_elts(bier_disp_entry_pool),
pool_len(bier_disp_entry_pool),
sizeof(bier_disp_entry_t));
@@
-372,8
+375,15
@@
show_bier_disp_entry (vlib_main_t * vm,
}
else
{
}
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);
}
}
return (NULL);
}