diff options
author | 2020-01-14 09:14:02 +0000 | |
---|---|---|
committer | 2020-01-14 09:14:02 +0000 | |
commit | def98b1a2af5292519b18893133e419e940a850b (patch) | |
tree | 6ee1801da406b91a65bc971b28e5a48c0d166dd9 /hicn-plugin/src/mapme_eventmgr.c | |
parent | 63312d00f31de987101a3a3edc4939730d269fef (diff) | |
parent | 6a268308c499edf4b5d72531388269114802de29 (diff) |
Merge changes from topic "HICN-475"
* changes:
[HICN-475] Adding multihoming in case the producer is facing the producer
[HICN-474] Enabling print of FIB and TFIB status
Diffstat (limited to 'hicn-plugin/src/mapme_eventmgr.c')
-rw-r--r-- | hicn-plugin/src/mapme_eventmgr.c | 23 |
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 */ |