bgpd: Improve peer scaling
Reduce the amount of time it takes to bring up a large number of peers.
This is accomplished by removing jitter and reducing the number
of seconds to wait before connecting to a peer.
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Edited-by: Paul Jakma <paul.jakma@hpe.com> for rebase conflicts, and to add
jitter on connect timer back in. Can be removed in an update.
diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c
index c4cfd58..4f1838a 100644
--- a/bgpd/bgp_fsm.c
+++ b/bgpd/bgp_fsm.c
@@ -106,7 +106,7 @@
break;
case Connect:
- /* After start timer is expired, the peer moves to Connnect
+ /* After start timer is expired, the peer moves to Connect
status. Make sure start timer is off and connect timer is
on. */
BGP_TIMER_OFF (peer->t_start);
diff --git a/bgpd/bgpd.h b/bgpd/bgpd.h
index 7bd5a78..3f6161c 100644
--- a/bgpd/bgpd.h
+++ b/bgpd/bgpd.h
@@ -748,7 +748,7 @@
#define BGP_EVENTS_MAX 15
/* BGP timers default value. */
-#define BGP_INIT_START_TIMER 5
+#define BGP_INIT_START_TIMER 1
#define BGP_DEFAULT_HOLDTIME 180
#define BGP_DEFAULT_KEEPALIVE 60
#define BGP_DEFAULT_EBGP_ROUTEADV 30