summaryrefslogtreecommitdiffstats
path: root/hicn-plugin/src/strategies/dpo_mw.c
diff options
context:
space:
mode:
Diffstat (limited to 'hicn-plugin/src/strategies/dpo_mw.c')
-rw-r--r--hicn-plugin/src/strategies/dpo_mw.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/hicn-plugin/src/strategies/dpo_mw.c b/hicn-plugin/src/strategies/dpo_mw.c
index 981e5b61c..41d2f2526 100644
--- a/hicn-plugin/src/strategies/dpo_mw.c
+++ b/hicn-plugin/src/strategies/dpo_mw.c
@@ -134,6 +134,13 @@ format_hicn_strategy_mw_ctx (u8 * s, va_list * ap)
s = format (s, "hicn-mw");
for (i = 0; i < HICN_PARAM_FIB_ENTRY_NHOPS_MAX; i++)
{
+ u8 *buf = NULL;
+ if (i < dpo->default_ctx.entry_count)
+ buf = format(NULL, "FIB");
+ else if (i >= HICN_PARAM_FIB_ENTRY_NHOPS_MAX - dpo->default_ctx.tfib_entry_count)
+ buf = format(NULL, "TFIB");
+ else
+ continue;
next_hop = &dpo->default_ctx.next_hops[i];
face_vft = hicn_face_get_vft (next_hop->dpoi_type);
if (face_vft != NULL)
@@ -143,6 +150,7 @@ format_hicn_strategy_mw_ctx (u8 * s, va_list * ap)
format (s, "%U ", face_vft->format_face, next_hop->dpoi_index,
indent);
s = format (s, "weight %u", dpo->weight[i]);
+ s = format (s, " %s", buf);
}
}