0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-31 14:11:54 +00:00

BGP: splitting TX by time, not number of messages sent

This commit is contained in:
Maria Matejka 2024-06-10 14:10:51 +02:00
parent 0827797e6e
commit f45c519039

View File

@ -3181,12 +3181,9 @@ bgp_kick_tx(void *vconn)
struct bgp_conn *conn = vconn; struct bgp_conn *conn = vconn;
DBG("BGP: kicking TX\n"); DBG("BGP: kicking TX\n");
uint max = 1024; while (bgp_fire_tx(conn) > 0)
while (--max && (bgp_fire_tx(conn) > 0)) MAYBE_DEFER_TASK(proto_event_list(&conn->bgp->p), conn->tx_ev,
; "BGP TX for %s", conn->bgp->p.name);
if (!max && !ev_active(conn->tx_ev))
proto_send_event(&conn->bgp->p, conn->tx_ev);
} }
void void
@ -3201,12 +3198,9 @@ bgp_tx(sock *sk)
bgp_start_timer(conn->bgp, conn->send_hold_timer, conn->send_hold_time); bgp_start_timer(conn->bgp, conn->send_hold_timer, conn->send_hold_time);
DBG("BGP: TX hook\n"); DBG("BGP: TX hook\n");
uint max = 1024; while (bgp_fire_tx(conn) > 0)
while (--max && (bgp_fire_tx(conn) > 0)) MAYBE_DEFER_TASK(proto_event_list(&conn->bgp->p), conn->tx_ev,
; "BGP TX for %s", conn->bgp->p.name);
if (!max && !ev_active(conn->tx_ev))
proto_send_event(&conn->bgp->p, conn->tx_ev);
} }