diff options
author | 2019-06-06 19:42:12 +0200 | |
---|---|---|
committer | 2019-06-06 23:02:14 +0200 | |
commit | 27712b5f2a06c935a97643d91f6bd1345d05ec3b (patch) | |
tree | bd9dc4ee89daea07722db9376be4a5ef63b9ddf6 /hicn-plugin/src/mapme.h | |
parent | 2d555daf9034459ec5ef20f7d63cccd25c6c4b0c (diff) |
[HICN-214] Updating next_node in the face that mapme add to the fib in order to forward interests
Change-Id: I97c408c9e910df0ea7c43c0341c0025521ced125
Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com>
Diffstat (limited to 'hicn-plugin/src/mapme.h')
-rw-r--r-- | hicn-plugin/src/mapme.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/hicn-plugin/src/mapme.h b/hicn-plugin/src/mapme.h index e0786eff8..cf68f6d00 100644 --- a/hicn-plugin/src/mapme.h +++ b/hicn-plugin/src/mapme.h @@ -125,6 +125,7 @@ hicn_mapme_tfib_add (hicn_mapme_tfib_t * tfib, dpo_id_t * face_id) static_always_inline int hicn_mapme_tfib_del (hicn_mapme_tfib_t * tfib, dpo_id_t * face_id) { + dpo_id_t invalid = NEXT_HOP_INVALID; /* * We need to do a linear scan of TFIB entries to find the one to * remove @@ -133,7 +134,11 @@ hicn_mapme_tfib_del (hicn_mapme_tfib_t * tfib, dpo_id_t * face_id) u8 pos = ~0; for (pos = start_pos; pos < HICN_PARAM_FIB_ENTRY_NHOPS_MAX; pos++) if (dpo_cmp (&tfib->next_hops[pos], face_id) == 0) - break; + { + hicn_face_unlock (&tfib->next_hops[pos]); + tfib->next_hops[pos] = invalid; + break; + } if (pos == HICN_PARAM_FIB_ENTRY_NHOPS_MAX) /* Not found */ return -1; @@ -215,7 +220,7 @@ extern dpo_type_t hicn_face_ip_type; extern u32 strategy_face_ip4_vlib_edge; extern u32 strategy_face_ip6_vlib_edge; /* in faces/udp/face_udp.c */ -extern u32 strategy_face_udp6_vlib_edge; +extern u32 strategy_face_udp4_vlib_edge; extern u32 strategy_face_udp6_vlib_edge; @@ -244,7 +249,7 @@ hicn_mapme_get_dpo_vlib_edge (dpo_id_t * dpo) switch (dpo->dpoi_proto) { case DPO_PROTO_IP4: - return strategy_face_udp6_vlib_edge; + return strategy_face_udp4_vlib_edge; case DPO_PROTO_IP6: return strategy_face_udp6_vlib_edge; default: @@ -293,10 +298,9 @@ hicn_mapme_get_dpo_face_node (dpo_id_t * dpo) } } - -#define DEBUG(...) vlib_log_debug(mapme_main.log_class, __VA_ARGS__) -#define WARN(...) vlib_log_warn(mapme_main.log_class, __VA_ARGS__) -#define ERROR(...) vlib_log_err(mapme_main.log_class, __VA_ARGS__) +#define DEBUG(...) //vlib_log_debug(mapme_main.log_class, __VA_ARGS__) +#define WARN(...) //vlib_log_warn(mapme_main.log_class, __VA_ARGS__) +#define ERROR(...) //vlib_log_err(mapme_main.log_class, __VA_ARGS__) #endif /* __HICN_MAPME__ */ |