summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_fsm.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2015-05-20 02:40:42 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2015-05-20 02:40:42 +0200
commit5ca5f1c8af48b4e5aa7e6ff36b4cc69f0a896eab (patch)
tree481a3fe225a7dc953991dcd65266e165ba9afa1f /bgpd/bgp_fsm.c
parentbgpd-scale-update-delay-packing.patch (diff)
downloadfrr-5ca5f1c8af48b4e5aa7e6ff36b4cc69f0a896eab.tar.xz
frr-5ca5f1c8af48b4e5aa7e6ff36b4cc69f0a896eab.zip
Reduce the amount of time it takes to bring up a large number of peers
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Diffstat (limited to 'bgpd/bgp_fsm.c')
-rw-r--r--bgpd/bgp_fsm.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c
index 7693a5af9..efaa1cbc5 100644
--- a/bgpd/bgp_fsm.c
+++ b/bgpd/bgp_fsm.c
@@ -63,13 +63,6 @@ static int bgp_keepalive_timer (struct thread *);
/* BGP FSM functions. */
static int bgp_start (struct peer *);
-/* BGP start timer jitter. */
-static int
-bgp_start_jitter (int time)
-{
- return ((rand () % (time + 1)) - (time / 2));
-}
-
static void
peer_xfer_stats (struct peer *peer_dst, struct peer *peer_src)
{
@@ -179,8 +172,6 @@ peer_xfer_conn(struct peer *from_peer)
void
bgp_timer_set (struct peer *peer)
{
- int jitter = 0;
-
switch (peer->status)
{
case Idle:
@@ -193,9 +184,8 @@ bgp_timer_set (struct peer *peer)
}
else
{
- jitter = bgp_start_jitter (peer->v_start);
BGP_TIMER_ON (peer->t_start, bgp_start_timer,
- peer->v_start + jitter);
+ peer->v_start);
}
BGP_TIMER_OFF (peer->t_connect);
BGP_TIMER_OFF (peer->t_holdtime);
@@ -205,7 +195,7 @@ bgp_timer_set (struct peer *peer)
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);