From 8b66a236e849e3cca4b02c92a7fbe5f2bf0f97a1 Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Fri, 9 Aug 2024 16:32:02 +0300 Subject: [PATCH 1/2] bgpd: Reduce encap_tunneltype to 1 byte It's not used as a bitmask, no point to use it as 2 bytes. Signed-off-by: Donatas Abraitis --- bgpd/bgp_attr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bgpd/bgp_attr.h b/bgpd/bgp_attr.h index 3519dc340102..34393a0f1b76 100644 --- a/bgpd/bgp_attr.h +++ b/bgpd/bgp_attr.h @@ -293,7 +293,7 @@ struct attr { /* EVPN local router-mac */ struct ethaddr rmac; - uint16_t encap_tunneltype; + uint8_t encap_tunneltype; /* rmap set table */ uint32_t rmap_table_id; From 5c84cddab8ec7fd4343ed7bc2c7602b01d4f6846 Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Fri, 9 Aug 2024 16:33:52 +0300 Subject: [PATCH 2/2] bgpd: Shrink rmap_change_flags to 2-bytes 4 bytes is not needed for this thing clearly. Signed-off-by: Donatas Abraitis --- bgpd/bgp_attr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bgpd/bgp_attr.h b/bgpd/bgp_attr.h index 34393a0f1b76..561024e7c85c 100644 --- a/bgpd/bgp_attr.h +++ b/bgpd/bgp_attr.h @@ -209,7 +209,7 @@ struct attr { /* has the route-map changed any attribute? Used on the peer outbound side. */ - uint32_t rmap_change_flags; + uint16_t rmap_change_flags; /* Multi-Protocol Nexthop, AFI IPv6 */ struct in6_addr mp_nexthop_global;