CVSROOT:        /cvs
Module name:    src
Changes by:     [email protected] 2025/12/24 00:59:55

Modified files:
        usr.sbin/bgpd  : bgpd.h rde.c rde.h rde_adjout.c rde_peer.c 
                         rde_prefix.c rde_rib.c rde_update.c util.c 

Log message:
Rewrite the adj-rib-out code to not be per-peer based but instead
global with a peer bitmap to know which peer holds which prefix version.

So a pt_entry now includes an array of struct adjout_prefix elements
each entry is for a different path (different set of attributes) and
includes a bitmap that tracks which peers include this prefix / attr combo.

An optimisation on top of this is that the path_id_tx is forced to 0 for
peers that have no add-path send enabled. This way the lookup for this
common case is less deep.

The peer_reaper is now replaced with a simple adjout_prefix_dump call.

In general this reduces memory consumption by more than 50% especially if
the outbound filters are producing the same path for many peers. My IXP
test setup dropped from over 20GB to below 5GB memory usage.

OK tb@

Reply via email to