From e75e57491b32bd848da8fb123c105ba104514b1c Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Sat, 13 Jun 2020 13:49:38 -0400 Subject: [PATCH] lib, bgpd: Remove unused variable from structure The `struct evpn_ead_addr` structure had a prefix length associated with it. This value was only ever set never used. Remove this from our system. The other nice thing about this change is that it puts back the sizeof struct route_node to 192 bytes. Signed-off-by: Donald Sharp --- bgpd/bgp_evpn_private.h | 3 --- lib/prefix.h | 1 - 2 files changed, 4 deletions(-) diff --git a/bgpd/bgp_evpn_private.h b/bgpd/bgp_evpn_private.h index 4ac626e4cb..3212ae792d 100644 --- a/bgpd/bgp_evpn_private.h +++ b/bgpd/bgp_evpn_private.h @@ -494,7 +494,6 @@ static inline void build_evpn_type1_prefix(struct prefix_evpn *p, p->prefixlen = EVPN_ROUTE_PREFIXLEN; p->prefix.route_type = BGP_EVPN_AD_ROUTE; p->prefix.ead_addr.eth_tag = eth_tag; - p->prefix.ead_addr.ip_prefix_length = IPV4_MAX_BITLEN; p->prefix.ead_addr.ip.ipa_type = IPADDR_V4; p->prefix.ead_addr.ip.ipaddr_v4 = originator_ip; memcpy(&p->prefix.ead_addr.esi, esi, sizeof(esi_t)); @@ -504,7 +503,6 @@ static inline void evpn_type1_prefix_global_copy(struct prefix_evpn *global_p, const struct prefix_evpn *vni_p) { memcpy(global_p, vni_p, sizeof(*global_p)); - global_p->prefix.ead_addr.ip_prefix_length = 0; global_p->prefix.ead_addr.ip.ipa_type = 0; global_p->prefix.ead_addr.ip.ipaddr_v4.s_addr = 0; } @@ -518,7 +516,6 @@ static inline struct prefix_evpn *evpn_type1_prefix_vni_copy( struct in_addr originator_ip) { memcpy(vni_p, global_p, sizeof(*vni_p)); - vni_p->prefix.ead_addr.ip_prefix_length = IPV4_MAX_BITLEN; vni_p->prefix.ead_addr.ip.ipa_type = IPADDR_V4; vni_p->prefix.ead_addr.ip.ipaddr_v4 = originator_ip; diff --git a/lib/prefix.h b/lib/prefix.h index e3dfc88d55..d9edd9ee96 100644 --- a/lib/prefix.h +++ b/lib/prefix.h @@ -88,7 +88,6 @@ typedef struct esi_t_ { struct evpn_ead_addr { esi_t esi; uint32_t eth_tag; - uint8_t ip_prefix_length; struct ipaddr ip; }; -- 2.39.5