summaryrefslogtreecommitdiffstats
path: root/hicn-plugin/src/mapme.h
diff options
context:
space:
mode:
Diffstat (limited to 'hicn-plugin/src/mapme.h')
-rw-r--r--hicn-plugin/src/mapme.h18
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__ */