summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_labelpool.h
diff options
context:
space:
mode:
authorG. Paul Ziemba <paulz@labn.net>2022-08-26 23:47:07 +0200
committerG. Paul Ziemba <paulz@labn.net>2022-08-31 17:21:27 +0200
commit80853c2ec7f8fa0534a12adf809e124e5b0dc79f (patch)
treec7e6b3ff625a114c7223f5ed7b894ae9bb865ae2 /bgpd/bgp_labelpool.h
parentMerge pull request #11863 from sri-mohan1/sri-ospf-dbg1 (diff)
downloadfrr-80853c2ec7f8fa0534a12adf809e124e5b0dc79f.tar.xz
frr-80853c2ec7f8fa0534a12adf809e124e5b0dc79f.zip
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>
Diffstat (limited to 'bgpd/bgp_labelpool.h')
-rw-r--r--bgpd/bgp_labelpool.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/bgpd/bgp_labelpool.h b/bgpd/bgp_labelpool.h
index d6a8eec84..2f3ffe437 100644
--- a/bgpd/bgp_labelpool.h
+++ b/bgpd/bgp_labelpool.h
@@ -41,6 +41,7 @@ struct labelpool {
struct work_queue *callback_q;
uint32_t pending_count; /* requested from zebra */
uint32_t reconnect_count; /* zebra reconnections */
+ uint32_t next_chunksize; /* request this many labels */
};
extern void bgp_lp_init(struct thread_master *master, struct labelpool *pool);