aboutsummaryrefslogtreecommitdiffstats
path: root/hicn-plugin
diff options
context:
space:
mode:
authorAngelo Mantellini <angelo.mantellini@cisco.com>2020-03-31 17:50:43 +0200
committerJordan Augé <jordan.auge+fdio@cisco.com>2020-04-27 11:26:51 +0200
commit15ad172a847fa667c57a4594ef4158405db9a984 (patch)
tree80c0bd083d7f206774f2b8fb3d0dacec06fde24f /hicn-plugin
parent23c3bb7400839b664096ad5e16a2346386109bda (diff)
[HICN-554] hicn-light refactoring
Change-Id: I36f2d393741d4502ce14d3791158e43e3e9cd4cf Signed-off-by: Jordan Augé <jordan.auge+fdio@cisco.com>
Diffstat (limited to 'hicn-plugin')
-rw-r--r--hicn-plugin/src/mapme_ctrl_node.c12
-rw-r--r--hicn-plugin/src/mapme_eventmgr.c3
-rw-r--r--hicn-plugin/src/mapme_eventmgr.h2
3 files changed, 11 insertions, 6 deletions
diff --git a/hicn-plugin/src/mapme_ctrl_node.c b/hicn-plugin/src/mapme_ctrl_node.c
index ed25a31b0..182fbabd3 100644
--- a/hicn-plugin/src/mapme_ctrl_node.c
+++ b/hicn-plugin/src/mapme_ctrl_node.c
@@ -130,7 +130,7 @@ hicn_mapme_process_ctrl (vlib_main_t * vm, vlib_buffer_t * b,
#endif
/* Process the hICN DPO */
- hicn_mapme_tfib_t *tfib =
+ hicn_mapme_tfib_t * tfib =
TFIB (hicn_strategy_dpo_ctx_get (dpo->dpoi_index));
if (tfib == NULL)
@@ -158,6 +158,7 @@ hicn_mapme_process_ctrl (vlib_main_t * vm, vlib_buffer_t * b,
/* Move next hops to TFIB... but in_face... */
for (u8 pos = 0; pos < tfib->entry_count; pos++)
{
+ // XXX BUG
if (dpo_cmp (&tfib->next_hops[pos], in_face) == 0)
{
tfib->entry_count = 0;
@@ -180,10 +181,10 @@ hicn_mapme_process_ctrl (vlib_main_t * vm, vlib_buffer_t * b,
HICN_MAPME_EVENT_FACE_NH_SET,
1,
sizeof (retx_t));
- *retx = (retx_t)
- {
- .prefix = prefix,.dpo = *dpo};
-
+ *retx = (retx_t) {
+ .prefix = prefix,
+ .dpo = *dpo
+ };
}
else if (params.seq == fib_seq)
{
@@ -213,6 +214,7 @@ hicn_mapme_process_ctrl (vlib_main_t * vm, vlib_buffer_t * b,
* face is propagating outdated information, we can just consider it as a
* prevHops
*/
+ // XXX BUG
hicn_mapme_tfib_add (tfib, in_face);
retx_t *retx = vlib_process_signal_event_data (vm,
diff --git a/hicn-plugin/src/mapme_eventmgr.c b/hicn-plugin/src/mapme_eventmgr.c
index 5a9e7967e..f35a9909a 100644
--- a/hicn-plugin/src/mapme_eventmgr.c
+++ b/hicn-plugin/src/mapme_eventmgr.c
@@ -307,6 +307,7 @@ hicn_mapme_send_updates (vlib_main_t * vm, hicn_prefix_t * prefix,
}
else
{
+ // XXX BUG are we sure it is always the last ??
hicn_mapme_send_message (vm, prefix, &params,
&tfib->next_hops[tfib_last_idx]);
}
@@ -510,7 +511,7 @@ hicn_mapme_eventmgr_process (vlib_main_t * vm,
hicn_mapme_send_updates (vm, &retx->prefix, retx->dpo, true);
retx->rtx_count++;
- // If we exceed the numver of retransmittion it means that all tfib entries have seens at least HICN_PARAM_RTX_MAX of retransmission
+ // If we exceed the numver of retransmission it means that all tfib entries have seens at least HICN_PARAM_RTX_MAX of retransmission
if (retx->rtx_count < HICN_PARAM_RTX_MAX)
{
/*
diff --git a/hicn-plugin/src/mapme_eventmgr.h b/hicn-plugin/src/mapme_eventmgr.h
index 338915d63..b715ae847 100644
--- a/hicn-plugin/src/mapme_eventmgr.h
+++ b/hicn-plugin/src/mapme_eventmgr.h
@@ -26,7 +26,9 @@ typedef struct
u8 rtx_count; // Number of retransmissions since last tfib addition
} retx_t;
+#if 0
#define HASH32(x) ((u16)x ^ (x << 16))
+#endif
/**
* @brief This is a process node reacting to face events.