diff options
author | Alberto Compagno <acompagn+fdio@cisco.com> | 2020-04-07 18:27:24 +0200 |
---|---|---|
committer | Alberto Compagno <acompagn+fdio@cisco.com> | 2020-05-04 11:25:34 +0200 |
commit | 2fba74798833331fe6312e8a764688a23918c14a (patch) | |
tree | 877e24ea293d55a8c31b939bf2abacccdf9f365f /hicn-plugin/src/strategies | |
parent | c61e2e149421b849888bea0239c50607edce35ac (diff) |
[HICN-591] Created new command "hicn enable <prefix>" that enable hicn on a given prefix
The changes include:
- we use now a different vrf for the hicn routes. The default vrf (fib) contains
every route, we sync the route we marked as hicn on the hicn vrf. In the vrf
we use a custom dpo to implement the forwarding strategy.
Change-Id: I399805eff8a62a5c41bf7b50831986a35bce4f76
Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com>
Diffstat (limited to 'hicn-plugin/src/strategies')
-rw-r--r-- | hicn-plugin/src/strategies/dpo_mw.c | 4 | ||||
-rw-r--r-- | hicn-plugin/src/strategies/dpo_mw.h | 2 | ||||
-rw-r--r-- | hicn-plugin/src/strategies/dpo_rr.c | 4 | ||||
-rw-r--r-- | hicn-plugin/src/strategies/dpo_rr.h | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/hicn-plugin/src/strategies/dpo_mw.c b/hicn-plugin/src/strategies/dpo_mw.c index 2ec699e06..12c77bce8 100644 --- a/hicn-plugin/src/strategies/dpo_mw.c +++ b/hicn-plugin/src/strategies/dpo_mw.c @@ -108,7 +108,7 @@ format_hicn_strategy_mw_ctx (u8 * s, va_list * ap) } void -hicn_strategy_mw_ctx_create (dpo_proto_t proto, const hicn_face_id_t * next_hop, +hicn_strategy_mw_ctx_create (fib_protocol_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; @@ -120,7 +120,7 @@ hicn_strategy_mw_ctx_create (dpo_proto_t proto, const hicn_face_id_t * next_hop, *dpo_idx = hicn_strategy_dpo_ctx_get_index (hicn_strategy_ctx); - init_dpo_ctx (hicn_strategy_ctx, next_hop, nh_len, hicn_dpo_type_mw); + init_dpo_ctx (hicn_strategy_ctx, next_hop, nh_len, hicn_dpo_type_mw, proto); memset (hicn_strategy_mw_ctx->weight, 0, HICN_PARAM_FIB_ENTRY_NHOPS_MAX); } diff --git a/hicn-plugin/src/strategies/dpo_mw.h b/hicn-plugin/src/strategies/dpo_mw.h index 45a3f3384..887c7003a 100644 --- a/hicn-plugin/src/strategies/dpo_mw.h +++ b/hicn-plugin/src/strategies/dpo_mw.h @@ -60,7 +60,7 @@ hicn_dpo_ctx_t *hicn_strategy_mw_ctx_get (index_t index); * @return HICN_ERROR_NONE if the creation was fine, otherwise EINVAL */ void -hicn_strategy_mw_ctx_create (dpo_proto_t proto, const hicn_face_id_t * next_hop, +hicn_strategy_mw_ctx_create (fib_protocol_t proto, const hicn_face_id_t * next_hop, int nh_len, index_t * dpo_idx); /** diff --git a/hicn-plugin/src/strategies/dpo_rr.c b/hicn-plugin/src/strategies/dpo_rr.c index 40620bb51..adb7e1025 100644 --- a/hicn-plugin/src/strategies/dpo_rr.c +++ b/hicn-plugin/src/strategies/dpo_rr.c @@ -110,7 +110,7 @@ format_hicn_strategy_rr_ctx (u8 * s, va_list * ap) } void -hicn_strategy_rr_ctx_create (dpo_proto_t proto, const hicn_face_id_t * next_hop, +hicn_strategy_rr_ctx_create (fib_protocol_t proto, const hicn_face_id_t * next_hop, int nh_len, index_t * dpo_idx) { hicn_strategy_rr_ctx_t *hicn_strategy_rr_ctx; @@ -122,7 +122,7 @@ hicn_strategy_rr_ctx_create (dpo_proto_t proto, const hicn_face_id_t * next_hop, *dpo_idx = hicn_strategy_dpo_ctx_get_index (hicn_strategy_ctx); - init_dpo_ctx (hicn_strategy_ctx, next_hop, nh_len, hicn_dpo_type_rr); + init_dpo_ctx (hicn_strategy_ctx, next_hop, nh_len, hicn_dpo_type_rr, proto); hicn_strategy_rr_ctx->current_nhop = 0; } diff --git a/hicn-plugin/src/strategies/dpo_rr.h b/hicn-plugin/src/strategies/dpo_rr.h index cb6e693e3..e80c0302a 100644 --- a/hicn-plugin/src/strategies/dpo_rr.h +++ b/hicn-plugin/src/strategies/dpo_rr.h @@ -62,7 +62,7 @@ hicn_dpo_ctx_t *hicn_strategy_rr_ctx_get (index_t index); * @return HICN_ERROR_NONE if the creation was fine, otherwise EINVAL */ void -hicn_strategy_rr_ctx_create (dpo_proto_t proto, const hicn_face_id_t * next_hop, +hicn_strategy_rr_ctx_create (fib_protocol_t proto, const hicn_face_id_t * next_hop, int nh_len, index_t * dpo_idx); /** |