summaryrefslogtreecommitdiffstats
path: root/bgpd/bgpd.h
diff options
context:
space:
mode:
authorRajasekar Raja <rajasekarr@nvidia.com>2024-11-27 09:04:51 +0100
committerRajasekar Raja <rajasekarr@nvidia.com>2024-12-09 17:46:16 +0100
commit0f2cb2731053a678c85115abda008dc1d012e591 (patch)
treebcfbe52b31f60d814bc2a406319bf58dafba4354 /bgpd/bgpd.h
parentbgpd: backpressure - Optimize EVPN L2VNI remote routes processing (diff)
downloadfrr-0f2cb2731053a678c85115abda008dc1d012e591.tar.xz
frr-0f2cb2731053a678c85115abda008dc1d012e591.zip
bgpd: backpressure - Optimize EVPN L3VNI remote routes processing
Anytime BGP gets a L3 VNI ADD/DEL from zebra, - Walking the entire global routing table per L3VNI is very expensive. - The next read (say of another VNI ADD/DEL) from the socket does not proceed unless this walk is complete. So for triggers where a bulk of L3VNI's are flapped, this results in huge output buffer FIFO growth spiking up the memory in zebra since bgp is slow/busy processing the first message. To avoid this, idea is to hookup the BGP-VRF off the struct bgp_master and maintain a struct bgp FIFO list which is processed later on, where we walk a chunk of BGP-VRFs and do the remote route install/uninstall. Ticket :#3864372 Signed-off-by: Rajasekar Raja <rajasekarr@nvidia.com>
Diffstat (limited to 'bgpd/bgpd.h')
-rw-r--r--bgpd/bgpd.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/bgpd/bgpd.h b/bgpd/bgpd.h
index fd2bd95e5..f66b41abe 100644
--- a/bgpd/bgpd.h
+++ b/bgpd/bgpd.h
@@ -20,6 +20,7 @@
PREDECL_LIST(zebra_announce);
PREDECL_LIST(zebra_l2_vni);
+PREDECL_LIST(zebra_l3_vni);
/* For union sockunion. */
#include "queue.h"
@@ -209,6 +210,10 @@ struct bgp_master {
/* To preserve ordering of processing of L2 VNIs in BGP */
struct zebra_l2_vni_head zebra_l2_vni_head;
+ struct event *t_bgp_zebra_l3_vni;
+ /* To preserve ordering of processing of BGP-VRFs for L3 VNIs */
+ struct zebra_l3_vni_head zebra_l3_vni_head;
+
QOBJ_FIELDS;
};
DECLARE_QOBJ_TYPE(bgp_master);
@@ -559,6 +564,8 @@ struct bgp {
#define BGP_FLAG_INSTANCE_HIDDEN (1ULL << 39)
/* Prohibit BGP from enabling IPv6 RA on interfaces */
#define BGP_FLAG_IPV6_NO_AUTO_RA (1ULL << 40)
+#define BGP_FLAG_L3VNI_SCHEDULE_FOR_INSTALL (1ULL << 41)
+#define BGP_FLAG_L3VNI_SCHEDULE_FOR_DELETE (1ULL << 42)
/* BGP default address-families.
* New peers inherit enabled afi/safis from bgp instance.
@@ -873,10 +880,14 @@ struct bgp {
uint64_t node_already_on_queue;
uint64_t node_deferred_on_queue;
+ struct zebra_l3_vni_item zl3vni;
+
QOBJ_FIELDS;
};
DECLARE_QOBJ_TYPE(bgp);
+DECLARE_LIST(zebra_l3_vni, struct bgp, zl3vni);
+
struct bgp_interface {
#define BGP_INTERFACE_MPLS_BGP_FORWARDING (1 << 0)
/* L3VPN multi domain switching */