In the same vein as the round-robin input commit, this re-adds logic for
limiting the amount of time spent generating UPDATEs per generation
cycle. Missed this when shifting around wpkt_quanta; prior to MT it
limited both calls to write() as well as UPDATE generation.
struct stream *s;
struct peer_af *paf;
struct bpacket *next_pkt;
+ uint32_t wpq;
+ uint32_t generated = 0;
afi_t afi;
safi_t safi;
+ wpq = atomic_load_explicit(&peer->bgp->wpkt_quanta,
+ memory_order_relaxed);
+
/*
* The code beyond this part deals with update packets, proceed only
* if peer is Established and updates are not on hold (as part of
bgp_writes_on(peer);
bpacket_queue_advance_peer(paf);
}
- } while (s);
+ } while (s && (++generated < wpq));
bgp_write_proceed_actions(peer);