summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_debug.h
diff options
context:
space:
mode:
authorG. Paul Ziemba <paulz@labn.net>2018-04-07 20:13:07 +0200
committerG. Paul Ziemba <paulz@labn.net>2018-04-12 08:18:28 +0200
commit955bfd984ffdf25de5748c404ee9796de7fd30be (patch)
tree2cbf34a64c17bd530af22eb4f8162cd8bb67a66d /bgpd/bgp_debug.h
parentMerge pull request #2027 from qlyoung/fix-vrf-static-holdem-display (diff)
downloadfrr-955bfd984ffdf25de5748c404ee9796de7fd30be.tar.xz
frr-955bfd984ffdf25de5748c404ee9796de7fd30be.zip
bgpd: dynamic mpls label pool
MPLS label pool backed by allocations from the zebra label manager. A caller requests a label (e.g., in support of an "auto" label specification in the CLI) via lp_get(), supplying a unique ID and a callback function. The callback function is invoked at a later time with the unique ID and a label value to inform the requestor of the assigned label. Requestors may release their labels back to the pool via lp_release(). The label pool is stocked with labels allocated by the zebra label manager. The interaction with zebra is asynchronous so that bgpd is not blocked while awaiting a label allocation from zebra. The label pool implementation allows for bgpd operation before (or without) zebra, and gracefully handles loss and reconnection of zebra. Of course, before initial connection with zebra, no labels are assigned to requestors. If the zebra connection is lost and regained, callbacks to requestors will invalidate old assignments and then assign new labels. Signed-off-by: G. Paul Ziemba <paulz@labn.net>
Diffstat (limited to 'bgpd/bgp_debug.h')
-rw-r--r--bgpd/bgp_debug.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/bgpd/bgp_debug.h b/bgpd/bgp_debug.h
index a0b179e21..ad476ee91 100644
--- a/bgpd/bgp_debug.h
+++ b/bgpd/bgp_debug.h
@@ -74,6 +74,7 @@ extern unsigned long conf_bgp_debug_nht;
extern unsigned long conf_bgp_debug_update_groups;
extern unsigned long conf_bgp_debug_vpn;
extern unsigned long conf_bgp_debug_flowspec;
+extern unsigned long conf_bgp_debug_labelpool;
extern unsigned long term_bgp_debug_as4;
extern unsigned long term_bgp_debug_neighbor_events;
@@ -87,6 +88,7 @@ extern unsigned long term_bgp_debug_nht;
extern unsigned long term_bgp_debug_update_groups;
extern unsigned long term_bgp_debug_vpn;
extern unsigned long term_bgp_debug_flowspec;
+extern unsigned long term_bgp_debug_labelpool;
extern struct list *bgp_debug_neighbor_events_peers;
extern struct list *bgp_debug_keepalive_peers;
@@ -120,6 +122,7 @@ struct bgp_debug_filter {
#define BGP_DEBUG_VPN_LEAK_RMAP_EVENT 0x04
#define BGP_DEBUG_VPN_LEAK_LABEL 0x08
#define BGP_DEBUG_FLOWSPEC 0x01
+#define BGP_DEBUG_LABELPOOL 0x01
#define BGP_DEBUG_PACKET_SEND 0x01
#define BGP_DEBUG_PACKET_SEND_DETAIL 0x02