CVSROOT:        /cvs
Module name:    src
Changes by:     [email protected] 2025/12/15 05:16:19

Modified files:
        usr.sbin/bgpd  : rde.h rde_adjout.c rde_update.c 

Log message:
Stop using PREFIX_ADJOUT_FLAG_STALE in up_generate_addpath().

Instead of marking prefixes with PREFIX_ADJOUT_FLAG_STALE
up_generate_addpath() can use a local array of path-ids to track which
paths were present at the start of the call. On update the path id is
cleared from the list and then at the end remove all remaining paths
from that list.

The extra traversals during the update should not matter since the number
of available paths small and so this linear search will only need one or
two cache lines.

It is possible to further optimize this by also tracking the adjout_prefix
pointer to drop the adjout_prefix_get() call at the end.

This also uses a fixed maximum of 2000 paths which is more than a
magnitude more than the biggest system I know.

OK tb@

Reply via email to