summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_nsm.c
diff options
context:
space:
mode:
authorAcee Lindem <acee@lindem.com>2024-05-31 16:08:04 +0200
committerAcee Lindem <acee@lindem.com>2024-06-20 17:31:07 +0200
commitc494702929d15141e8f3fd4a1d9f85095076a4b7 (patch)
treee8d790d16fef1d0a0cf83975b04c1a2aa5b7f208 /ospfd/ospf_nsm.c
parentMerge pull request #16227 from y-bharath14/srib-topotest-e (diff)
downloadfrr-c494702929d15141e8f3fd4a1d9f85095076a4b7.tar.xz
frr-c494702929d15141e8f3fd4a1d9f85095076a4b7.zip
ospfd: Improve OSPF neighbor retransmission list granularity and precision
The current OSPF neighbor retransmission operates on a single per-neighbor periodic timer that sends all LSAs on the list when it expires. Additionally, since it skips the first retransmission of received LSAs so that at least the retransmission interval (resulting in a delay of between the retransmission interval and twice the interval. In environments where the links are lossy on P2MP networks with "delay-reflood" configured (which relies on neighbor retransmission in partial meshs), the implementation is sub-optimal (to say the least). This commit reimplements OSPF neighbor retransmission as follows: 1. A new data structure making use the application managed typesafe.h doubly linked list implements an OSPF LSA list where each node includes a timestamp. 2. The existing neighbor LS retransmission LSDB data structure is augmented with a pointer to the list node on the LSA list to faciliate O(1) removal when the LSA is acknowledged. 3. The neighbor LS retransmission timer is set to the expiration timer of the LSA at the top of the list. 4. When the timer expires, LSAs are retransmitted that within the window of the current time and a small delta (50 milli-secs default). The LSAs that are retransmited are given an updated retransmission time and moved to the end of the LSA list. 5. Configuration is added to set the "retransmission-window" to a value other than 50 milliseconds. 6. Neighbor and interface LSA retransmission counters are added to provide insight into the lossiness of the links. However, these will increment quickly on non-fully meshed P2MP networks with "delay-reflood" configured. 7. Added a topotest to exercise the implementation on a non-fully meshed P2MP network with "delay-reflood" configured. The alternative was to use existing mechanisms to instroduce loss but these seem less determistic in a topotest. Signed-off-by: Acee Lindem <acee@lindem.com>
Diffstat (limited to 'ospfd/ospf_nsm.c')
-rw-r--r--ospfd/ospf_nsm.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/ospfd/ospf_nsm.c b/ospfd/ospf_nsm.c
index c466ddcc6..079a1fa55 100644
--- a/ospfd/ospf_nsm.c
+++ b/ospfd/ospf_nsm.c
@@ -112,18 +112,16 @@ static void nsm_timer_set(struct ospf_neighbor *nbr)
case NSM_Init:
case NSM_TwoWay:
EVENT_OFF(nbr->t_db_desc);
- EVENT_OFF(nbr->t_ls_upd);
+ EVENT_OFF(nbr->t_ls_rxmt);
EVENT_OFF(nbr->t_ls_req);
break;
case NSM_ExStart:
OSPF_NSM_TIMER_ON(nbr->t_db_desc, ospf_db_desc_timer,
nbr->v_db_desc);
- EVENT_OFF(nbr->t_ls_upd);
+ EVENT_OFF(nbr->t_ls_rxmt);
EVENT_OFF(nbr->t_ls_req);
break;
case NSM_Exchange:
- OSPF_NSM_TIMER_ON(nbr->t_ls_upd, ospf_ls_upd_timer,
- nbr->v_ls_upd);
if (!IS_SET_DD_MS(nbr->dd_flags))
EVENT_OFF(nbr->t_db_desc);
break;