]> git.proxmox.com Git - mirror_frr.git/commit - lib/bitfield.h
bgpd: improve labelpool performance at scale
authorG. Paul Ziemba <paulz@labn.net>
Fri, 26 Aug 2022 21:47:07 +0000 (14:47 -0700)
committerG. Paul Ziemba <paulz@labn.net>
Wed, 31 Aug 2022 15:21:27 +0000 (08:21 -0700)
commit80853c2ec7f8fa0534a12adf809e124e5b0dc79f
treec7e6b3ff625a114c7223f5ed7b894ae9bb865ae2
parent43bb6fc8d4dec4c4a6ddae35e43bcc867b034d5d
bgpd: improve labelpool performance at scale

    - double the size of each new chunk request from zebra
    - use bitfields to track label allocations in a chunk
    - When allocating:
        - skip chunks with no free labels
        - search biggest chunks first
        - start search in chunk where last search ended
    - Improve API documentation in comments (bgp_lp_get() and callback)
    - Tweak formatting of "show bgp labelpool chunks"
    - Add test features (compiled conditionally on BGP_LABELPOOL_ENABLE_TESTS)

Signed-off-by: G. Paul Ziemba <paulz@labn.net>
bgpd/bgp_labelpool.c
bgpd/bgp_labelpool.h
bgpd/subdir.am
lib/bitfield.h
tests/topotests/bgp_lu_topo1/R1/labelpool.summ.json
tests/topotests/bgp_lu_topo2/R1/labelpool.summ.json