diff options
| author | Acee Lindem <acee@lindem.com> | 2024-05-31 14:08:04 +0000 | 
|---|---|---|
| committer | Acee Lindem <acee@lindem.com> | 2024-06-20 15:31:07 +0000 | 
| commit | c494702929d15141e8f3fd4a1d9f85095076a4b7 (patch) | |
| tree | e8d790d16fef1d0a0cf83975b04c1a2aa5b7f208 /ospfd/ospf_neighbor.h | |
| parent | a1b21f526ad5d6807b39d3569845b0cb25b4d1bf (diff) | |
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_neighbor.h')
| -rw-r--r-- | ospfd/ospf_neighbor.h | 7 | 
1 files changed, 5 insertions, 2 deletions
diff --git a/ospfd/ospf_neighbor.h b/ospfd/ospf_neighbor.h index 07d095f03d..0e041f9e6d 100644 --- a/ospfd/ospf_neighbor.h +++ b/ospfd/ospf_neighbor.h @@ -9,6 +9,7 @@  #include <ospfd/ospf_gr.h>  #include <ospfd/ospf_packet.h> +#include <ospfd/ospf_flood.h>  /* Neighbor Data Structure */  struct ospf_neighbor { @@ -44,6 +45,7 @@ struct ospf_neighbor {  	/* LSA data. */  	struct ospf_lsdb ls_rxmt; +	struct ospf_lsa_list_head ls_rxmt_list;  	struct ospf_lsdb db_sum;  	struct ospf_lsdb ls_req;  	struct ospf_lsa *ls_req_last; @@ -54,13 +56,13 @@ struct ospf_neighbor {  	uint32_t v_inactivity;  	uint32_t v_db_desc;  	uint32_t v_ls_req; -	uint32_t v_ls_upd; +	uint32_t v_ls_rxmt;  	/* Threads. */  	struct event *t_inactivity;  	struct event *t_db_desc;  	struct event *t_ls_req; -	struct event *t_ls_upd; +	struct event *t_ls_rxmt;  	struct event *t_hello_reply;  	/* NBMA configured neighbour */ @@ -71,6 +73,7 @@ struct ospf_neighbor {  	struct timeval ts_last_regress;  /* last regressive NSM change     */  	const char *last_regress_str;    /* Event which last regressed NSM */  	uint32_t state_change;		 /* NSM state change counter       */ +	uint32_t ls_rxmt_lsa;		 /* Number of LSAs retransmited.   */  	/* BFD information */  	struct bfd_session_params *bfd_session;  | 
