mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-01 16:07:03 +00:00
bgpd: optimize holdtime timer cancelling
* bgp_packet.c: (bgp_update_receive) for every update received we queue an event just to cancel the holdtime timer, done in bgp_fsm_update(). Instead cancel the timer directly an avoid a scheduling pass. This incidently fixes another problem found on a slow box, where thousands of events threads were queued, and run, but never freed, because they are moved to the unused list that grows without bounds. Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This commit is contained in:
parent
577ac57b78
commit
6a4677b723
@ -1854,8 +1854,8 @@ bgp_update_receive (struct peer *peer, bgp_size_t size)
|
|||||||
peer->update_in++;
|
peer->update_in++;
|
||||||
peer->update_time = bgp_clock ();
|
peer->update_time = bgp_clock ();
|
||||||
|
|
||||||
/* Generate BGP event. */
|
/* Cancel holdtime timer */
|
||||||
BGP_EVENT_ADD (peer, Receive_UPDATE_message);
|
BGP_TIMER_OFF (peer->t_holdtime);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user