]> git.puffer.fish Git - mirror/frr.git/commit
bgpd: move the label per nexthop structs of bgp_path to an union
authorPhilippe Guibert <philippe.guibert@6wind.com>
Wed, 24 May 2023 15:26:13 +0000 (17:26 +0200)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Fri, 16 Jun 2023 08:54:58 +0000 (10:54 +0200)
commit76c803171b067a22aa5695b6019fb2218d497c00
tree9c843df847801dff96233e9fb8ab0c07c6380b77
parent29b49f67eb3c25139bfcd27ec96a2fb9b3746b16
bgpd: move the label per nexthop structs of bgp_path to an union

The label per nexthop attributes take 24 bytes per bgp path
entry on AMD64 platform, and are only used for unicast paths.
The current patch-set introduces a similar attributes, but that
will be used only for l3vpn paths. To gain some memory on the
bgp_path_info structure in the next commit, do some changes.

Create an 'mplsvpn' union structure that will either include the
label per nexthop structs for ipv4 paths, or the l3vpn paths
structures. The 'label_nexthop_cache' and the 'label_nh_thread'
attributes of the 'bgp_path_info' structure are moved into an
union under a new structure called 'bgp_mplsvpn_label_nh_blnc'.
The flags attribute of 'bgp_path_info' is increased from 16 bits
to 32 bits, and the BGP_PATH_MPLSVPN_LABEL_NH flag is added to
know the 'mplsvpn' usage.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
bgpd/bgp_labelpool.c
bgpd/bgp_mplsvpn.c
bgpd/bgp_route.h