Index | Thread | Search

From:
Claudio Jeker <cjeker@diehard.n-r-g.com>
Subject:
bgpd: optimise peer_dump
To:
tech@openbsd.org
Date:
Tue, 16 Dec 2025 16:33:18 +0100

Download raw body.

Thread
peer_dump already puts all prefixes onto the pending queue.

So there is no need to call peer_blast at the end, just call
peer_blast_done() so the EOR marker is added and the peer
is unthrottled.

This removes an extra tree walk during session establishment.
-- 
:wq Claudio

Index: rde_peer.c
===================================================================
RCS file: /cvs/src/usr.sbin/bgpd/rde_peer.c,v
diff -u -p -r1.62 rde_peer.c
--- rde_peer.c	13 Dec 2025 19:26:17 -0000	1.62
+++ rde_peer.c	16 Dec 2025 15:30:11 -0000
@@ -572,10 +572,7 @@ peer_dump_upcall(struct rib_entry *re, v
 static void
 peer_dump_done(void *ptr, uint8_t aid)
 {
-	struct rde_peer		*peer = ptr;
-
-	/* Adj-RIB-Out is ready, blast it out */
-	peer_blast(peer, aid);
+	peer_blast_done(ptr, aid);
 }
 
 /*