diff options
author | Donatas Abraitis <donatas@opensourcerouting.org> | 2024-01-29 15:00:07 +0100 |
---|---|---|
committer | Donatas Abraitis <donatas@opensourcerouting.org> | 2024-01-30 07:12:59 +0100 |
commit | 0804038916212cf8902595aeab016877e3b08bb2 (patch) | |
tree | 474dd4d861243b93a8ce43189bf2d1a5736f32dc /bgpd/bgp_errors.h | |
parent | bgpd: Optimize memory usage for attr struct (diff) | |
download | frr-0804038916212cf8902595aeab016877e3b08bb2.tar.xz frr-0804038916212cf8902595aeab016877e3b08bb2.zip |
bgpd: Optimize memory usage for bgp_static struct
```
struct bgp_static {
int backdoor; /* 0 4 */
uint32_t label_index; /* 4 4 */
uint8_t valid; /* 8 1 */
/* XXX 1 byte hole, try to pack */
uint16_t encap_tunneltype; /* 10 2 */
uint32_t igpmetric; /* 12 4 */
struct in_addr igpnexthop; /* 16 4 */
uint32_t atomic; /* 20 4 */
struct {
char * name; /* 24 8 */
struct route_map * map; /* 32 8 */
} rmap; /* 24 16 */
struct prefix_rd prd __attribute__((__aligned__(8))); /* 40 16 */
char * prd_pretty; /* 56 8 */
/* --- cacheline 1 boundary (64 bytes) --- */
mpls_label_t label; /* 64 4 */
/* XXX 4 bytes hole, try to pack */
esi_t * eth_s_id; /* 72 8 */
struct ethaddr * router_mac; /* 80 8 */
struct prefix gatewayIp __attribute__((__aligned__(8))); /* 88 56 */
/* size: 144, cachelines: 3, members: 14 */
/* sum members: 139, holes: 2, sum holes: 5 */
/* forced alignments: 2 */
/* last cacheline: 16 bytes */
} __attribute__((__aligned__(8))); /* saved 8 bytes! */
```
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Diffstat (limited to 'bgpd/bgp_errors.h')
0 files changed, 0 insertions, 0 deletions