summaryrefslogtreecommitdiffstats
path: root/hicn-plugin/src/route.c
diff options
context:
space:
mode:
authorLuca Muscariello <muscariello@ieee.org>2020-03-23 06:43:34 +0000
committerGerrit Code Review <gerrit@fd.io>2020-03-23 06:43:34 +0000
commite0db9608e092c5b1381f1bc8df68ef17f9f7ec87 (patch)
treea8345430e8773e21567b9a18b4eeb48ae9a7cb71 /hicn-plugin/src/route.c
parentd0ebc1438a58b108f8d1509356bfabeaf95000fa (diff)
parente6a120973cca65ca464d1323a6f7f4308dcb4717 (diff)
Merge "[HICN-547] Removing punting through acl for interests"
Diffstat (limited to 'hicn-plugin/src/route.c')
-rw-r--r--hicn-plugin/src/route.c22
1 files changed, 5 insertions, 17 deletions
diff --git a/hicn-plugin/src/route.c b/hicn-plugin/src/route.c
index 85ad9f729..67dedaa88 100644
--- a/hicn-plugin/src/route.c
+++ b/hicn-plugin/src/route.c
@@ -197,14 +197,9 @@ hicn_route_add (hicn_face_id_t * face_id, u32 len,
clib_memcpy (&nhops[i], &face_dpo_tmp[i], sizeof (dpo_id_t));
}
- ret =
- default_dpo.hicn_dpo_create (prefix->fp_proto, nhops, n_face_dpo,
- &dpo_idx);
+ default_dpo.hicn_dpo_create (prefix->fp_proto, nhops, n_face_dpo,
+ &dpo_idx);
- if (ret)
- {
- return ret;
- }
/* the value we got when we registered */
/*
* This should be taken from the name?!? the index of the
@@ -291,11 +286,10 @@ hicn_route_del_nhop (fib_prefix_t * prefix, hicn_face_id_t face_id)
{
vft_id = hicn_dpo_get_vft_id (hicn_dpo_id);
dpo_vft = hicn_dpo_get_vft (vft_id);
- ret = dpo_vft->hicn_dpo_del_nh (face_id, hicn_dpo_id->dpoi_index,
- prefix);
+ ret = dpo_vft->hicn_dpo_del_nh (face_id, hicn_dpo_id->dpoi_index);
hicn_dpo_ctx_t *dpo_ctx =
- dpo_vft->hicn_dpo_get_ctx (hicn_dpo_id->dpoi_index);
+ hicn_strategy_dpo_ctx_get (hicn_dpo_id->dpoi_index);
if (ret == HICN_ERROR_NONE && !dpo_ctx->entry_count)
ret = hicn_route_del (prefix);
@@ -311,21 +305,15 @@ hicn_route_set_strategy (fib_prefix_t * prefix, u8 strategy_id)
dpo_id_t new_dpo_id = DPO_INVALID;
int ret;
hicn_dpo_ctx_t *old_hicn_dpo_ctx;
- const hicn_dpo_vft_t *old_dpo_vft;
const hicn_dpo_vft_t *new_dpo_vft;
index_t new_hicn_dpo_idx;
u32 fib_index;
- u32 old_vft_id;
-
ret = hicn_route_get_dpo (prefix, &hicn_dpo_id, &fib_index);
if (ret == HICN_ERROR_NONE)
{
- old_vft_id = hicn_dpo_get_vft_id (hicn_dpo_id);
- old_dpo_vft = hicn_dpo_get_vft (old_vft_id);
- old_hicn_dpo_ctx =
- old_dpo_vft->hicn_dpo_get_ctx (hicn_dpo_id->dpoi_index);
+ old_hicn_dpo_ctx = hicn_strategy_dpo_ctx_get (hicn_dpo_id->dpoi_index);
new_dpo_vft = hicn_dpo_get_vft_from_id (strategy_id);