aboutsummaryrefslogtreecommitdiffstats
path: root/hicn-plugin/src/mapme_eventmgr.c
diff options
context:
space:
mode:
authorAlberto Compagno <acompagn+fdio@cisco.com>2020-01-13 17:03:55 +0100
committerAlberto Compagno <acompagn+fdio@cisco.com>2020-01-14 09:24:52 +0100
commit6a268308c499edf4b5d72531388269114802de29 (patch)
tree51c986032b4593d670d09704628d6da693ad7f2d /hicn-plugin/src/mapme_eventmgr.c
parentda5b7d29648fd6acfa527a83f0b66d2f52452033 (diff)
[HICN-475] Adding multihoming in case the producer is facing the producer
Change-Id: I9ec9d43083379ed8961532f2b9d20f03fd1fa45e Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com>
Diffstat (limited to 'hicn-plugin/src/mapme_eventmgr.c')
-rw-r--r--hicn-plugin/src/mapme_eventmgr.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/hicn-plugin/src/mapme_eventmgr.c b/hicn-plugin/src/mapme_eventmgr.c
index ce9c0a4b4..93168d059 100644
--- a/hicn-plugin/src/mapme_eventmgr.c
+++ b/hicn-plugin/src/mapme_eventmgr.c
@@ -322,6 +322,7 @@ hicn_mapme_eventmgr_process (vlib_main_t * vm,
u8 idle = 0;
retx_t retx_array[NUM_RETX_SLOT][NUM_RETX_ENTRIES];
+ memset(retx_array, 0, NUM_RETX_SLOT*NUM_RETX_ENTRIES);
u8 retx_len[NUM_RETX_SLOT] = { 0 };
u8 cur = 0; /* current slot */
@@ -415,6 +416,7 @@ hicn_mapme_eventmgr_process (vlib_main_t * vm,
*/
retx_t *retx = (retx_t *) & retx_events[i];
+ retx->rtx_count = 0;
/*
* Transmit IU for all TFIB entries with latest seqno (we have
* at least one for sure!)
@@ -510,12 +512,21 @@ hicn_mapme_eventmgr_process (vlib_main_t * vm,
hicn_mapme_send_updates (vm, &retx->prefix, retx->dpo, true);
- /*
- * We did some retransmissions, so let's reschedule a check in the
- * next slot
- */
- NXT[NXTLEN++] = CUR[pos];
- idle = 0;
+ 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 (retx->rtx_count < HICN_PARAM_RTX_MAX)
+ {
+ /*
+ * We did some retransmissions, so let's reschedule a check in the
+ * next slot
+ */
+ NXT[NXTLEN++] = CUR[pos];
+ idle = 0;
+ }
+ else
+ {
+ hicn_mapme_tfib_clear(tfib);
+ }
}
/* Reset events in this slot and prepare for next one */