summaryrefslogtreecommitdiff
path: root/bgpd/bgp_attr.h
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas@opensourcerouting.org>2024-07-02 19:31:14 +0300
committerDonatas Abraitis <donatas@opensourcerouting.org>2024-07-04 09:47:07 +0300
commitd4c577e483504d916629dd095d256030884231a7 (patch)
treecc7a438db7849c98d51933cb9e78d8ee2c31710a /bgpd/bgp_attr.h
parentd4758b3ccc76c77d0b8ba255089f79e67379bb30 (diff)
bgpd: Move sticky, default_gw, router_flag into a single flags variable
Instead of using 3 uint8_t variables under struct attr, let's use a single uint8_t as the flags. Saving 2-bytes. Not a big deal, but it's even easier to track EVPN-related flags/variables. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Diffstat (limited to 'bgpd/bgp_attr.h')
-rw-r--r--bgpd/bgp_attr.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/bgpd/bgp_attr.h b/bgpd/bgp_attr.h
index f353e76913..3519dc3401 100644
--- a/bgpd/bgp_attr.h
+++ b/bgpd/bgp_attr.h
@@ -197,9 +197,6 @@ struct attr {
#define ATTR_ES_L3_NHG_ACTIVE (1 << 6)
#define ATTR_ES_L3_NHG (ATTR_ES_L3_NHG_USE | ATTR_ES_L3_NHG_ACTIVE)
- /* NA router flag (R-bit) support in EVPN */
- uint8_t router_flag;
-
/* Distance as applied by Route map */
uint8_t distance;
@@ -256,11 +253,12 @@ struct attr {
/* MP Nexthop length */
uint8_t mp_nexthop_len;
- /* Static MAC for EVPN */
- uint8_t sticky;
-
- /* Flag for default gateway extended community in EVPN */
- uint8_t default_gw;
+ /* EVPN flags */
+ uint8_t evpn_flags;
+#define ATTR_EVPN_FLAG_STICKY (1 << 0)
+#define ATTR_EVPN_FLAG_DEFAULT_GW (1 << 1)
+/* NA router flag (R-bit) support in EVPN */
+#define ATTR_EVPN_FLAG_ROUTER (1 << 2)
/* route tag */
route_tag_t tag;