summaryrefslogtreecommitdiff
path: root/bgpd/bgp_evpn_private.h
diff options
context:
space:
mode:
authorYuqing Zhao <xiaopanghu99@163.com>2023-07-31 20:34:48 +0800
committerYuqing Zhao <xiaopanghu99@163.com>2023-08-22 09:35:46 +0800
commit6e7f305e54f4828d58cb4b2e4c815d82a4cbe560 (patch)
tree4c01b7351f468d2139053b3cc5095e4bde67c6bd /bgpd/bgp_evpn_private.h
parent451fb24b17cb9272981d3809f755985d9ce52f79 (diff)
bgpd: Convert from struct bgp_node to struct bgp_dest
This is based on @donaldsharp's work The current code base is the struct bgp_node data structure. The problem with this is that it creates a bunch of extra data per route_node. The table structure generates ‘holder’ nodes that are never going to receive bgp routes, and now the memory of those nodes is allocated as if they are a full bgp_node. After splitting up the bgp_node into bgp_dest and route_node, the memory of ‘holder’ node which does not have any bgp data will be allocated as the route_node, not the bgp_node, and the memory usage is reduced. The memory usage of BGP node will be reduced from 200B to 96B. The total memory usage optimization of this part is ~16.00%. Signed-off-by: Donald Sharp <sharpd@nvidia.com> Signed-off-by: Yuqing Zhao <xiaopanghu99@163.com>
Diffstat (limited to 'bgpd/bgp_evpn_private.h')
-rw-r--r--bgpd/bgp_evpn_private.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/bgpd/bgp_evpn_private.h b/bgpd/bgp_evpn_private.h
index f141ddd6ef..5af99afa34 100644
--- a/bgpd/bgp_evpn_private.h
+++ b/bgpd/bgp_evpn_private.h
@@ -750,7 +750,7 @@ bgp_evpn_vni_node_lookup(const struct bgpevpn *vpn, const struct prefix_evpn *p,
extern void bgp_evpn_import_route_in_vrfs(struct bgp_path_info *pi, int import);
extern void bgp_evpn_update_type2_route_entry(struct bgp *bgp,
struct bgpevpn *vpn,
- struct bgp_node *rn,
+ struct bgp_dest *rn,
struct bgp_path_info *local_pi,
const char *caller);
extern int bgp_evpn_route_entry_install_if_vrf_match(struct bgp *bgp_vrf,