Skip to content

Commit 772a29c

Browse files
authored
Merge pull request FRRouting#20822 from opensourcerouting/fix/bgpd_struct_attr_cache_lines
bgpd: Reorder some struct attr members
2 parents d481ea2 + 94e910b commit 772a29c

File tree

1 file changed

+21
-20
lines changed

1 file changed

+21
-20
lines changed

bgpd/bgp_attr.h

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,19 @@ struct attr {
183183
/* Distance as applied by Route map */
184184
uint8_t distance;
185185

186+
uint8_t df_alg;
187+
188+
/* EVPN flags */
189+
uint8_t evpn_flags;
190+
#define ATTR_EVPN_FLAG_STICKY (1 << 0)
191+
#define ATTR_EVPN_FLAG_DEFAULT_GW (1 << 1)
192+
/* NA router flag (R-bit) support in EVPN */
193+
#define ATTR_EVPN_FLAG_ROUTER (1 << 2)
194+
195+
/* has the route-map changed any attribute?
196+
Used on the peer outbound side. */
197+
uint16_t rmap_change_flags;
198+
186199
/* Cache to avoid repeated interning within a single UPDATE section */
187200
struct {
188201
bool valid;
@@ -195,16 +208,16 @@ struct attr {
195208
} attr_intern_reuse;
196209

197210
/* EVPN DF preference for DF election on local ESs */
198-
uint8_t df_alg;
199211
uint16_t df_pref;
200212

213+
/* MP Nexthop length */
214+
uint8_t mp_nexthop_len;
215+
216+
uint8_t encap_tunneltype;
217+
201218
/* PMSI tunnel type (RFC 6514). */
202219
enum pta_type pmsi_tnl_type;
203220

204-
/* has the route-map changed any attribute?
205-
Used on the peer outbound side. */
206-
uint16_t rmap_change_flags;
207-
208221
/* Multi-Protocol Nexthop, AFI IPv6 */
209222
struct in6_addr mp_nexthop_global;
210223
struct in6_addr mp_nexthop_local;
@@ -244,22 +257,15 @@ struct attr {
244257
/* Aggregator ASN */
245258
as_t aggregator_as;
246259

247-
/* MP Nexthop length */
248-
uint8_t mp_nexthop_len;
249-
250-
/* EVPN flags */
251-
uint8_t evpn_flags;
252-
#define ATTR_EVPN_FLAG_STICKY (1 << 0)
253-
#define ATTR_EVPN_FLAG_DEFAULT_GW (1 << 1)
254-
/* NA router flag (R-bit) support in EVPN */
255-
#define ATTR_EVPN_FLAG_ROUTER (1 << 2)
256-
257260
/* route tag */
258261
route_tag_t tag;
259262

260263
/* Label index */
261264
uint32_t label_index;
262265

266+
/* rmap set table */
267+
uint32_t rmap_table_id;
268+
263269
/* SRv6 VPN SID */
264270
struct bgp_attr_srv6_vpn *srv6_vpn;
265271

@@ -287,11 +293,6 @@ struct attr {
287293
/* EVPN local router-mac */
288294
struct ethaddr rmac;
289295

290-
uint8_t encap_tunneltype;
291-
292-
/* rmap set table */
293-
uint32_t rmap_table_id;
294-
295296
/* Link bandwidth value, if any. */
296297
uint64_t link_bw;
297298

0 commit comments

Comments
 (0)