diff options
Diffstat (limited to 'hicn-plugin/src/strategies/dpo_mw.c')
-rw-r--r-- | hicn-plugin/src/strategies/dpo_mw.c | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/hicn-plugin/src/strategies/dpo_mw.c b/hicn-plugin/src/strategies/dpo_mw.c index eebb572c4..2ec699e06 100644 --- a/hicn-plugin/src/strategies/dpo_mw.c +++ b/hicn-plugin/src/strategies/dpo_mw.c @@ -76,8 +76,6 @@ format_hicn_strategy_mw_ctx (u8 * s, va_list * ap) index_t index = va_arg (*ap, index_t); hicn_dpo_ctx_t *dpo_ctx = NULL; hicn_strategy_mw_ctx_t *mw_dpo_ctx = NULL; - dpo_id_t *next_hop = NULL; - hicn_face_vft_t *face_vft = NULL; u32 indent = va_arg (*ap, u32);; dpo_ctx = hicn_strategy_dpo_ctx_get (index); @@ -97,24 +95,20 @@ format_hicn_strategy_mw_ctx (u8 * s, va_list * ap) buf = format (NULL, "TFIB"); else continue; - next_hop = &dpo_ctx->next_hops[i]; - face_vft = hicn_face_get_vft (next_hop->dpoi_type); - if (face_vft != NULL) - { - s = format (s, "\n"); - s = - format (s, "%U ", face_vft->format_face, next_hop->dpoi_index, - indent); - s = format (s, "weight %u", mw_dpo_ctx->weight[i]); - s = format (s, " %s", buf); - } + + s = format (s, "\n"); + s = + format (s, "%U ", format_hicn_face, dpo_ctx->next_hops[i], + indent); + s = format (s, "weight %u", mw_dpo_ctx->weight[i]); + s = format (s, " %s", buf); } return (s); } void -hicn_strategy_mw_ctx_create (dpo_proto_t proto, const dpo_id_t * next_hop, +hicn_strategy_mw_ctx_create (dpo_proto_t proto, const hicn_face_id_t * next_hop, int nh_len, index_t * dpo_idx) { hicn_strategy_mw_ctx_t *hicn_strategy_mw_ctx; @@ -132,7 +126,7 @@ hicn_strategy_mw_ctx_create (dpo_proto_t proto, const dpo_id_t * next_hop, } int -hicn_strategy_mw_ctx_add_nh (const dpo_id_t * nh, index_t dpo_idx) +hicn_strategy_mw_ctx_add_nh (hicn_face_id_t nh, index_t dpo_idx) { hicn_dpo_ctx_t *hicn_strategy_dpo_ctx = hicn_strategy_dpo_ctx_get (dpo_idx); u8 pos = 0; |