mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-16 11:34:14 +00:00
bgpd: Optimize memory for ecommunity struct
``` struct ecommunity { long unsigned int refcnt; /* 0 8 */ uint8_t unit_size; /* 8 1 */ _Bool disable_ieee_floating; /* 9 1 */ /* XXX 2 bytes hole, try to pack */ uint32_t size; /* 12 4 */ uint8_t * val; /* 16 8 */ char * str; /* 24 8 */ /* size: 32, cachelines: 1, members: 6 */ /* sum members: 30, holes: 1, sum holes: 2 */ /* last cacheline: 32 bytes */ }; /* saved 8 bytes! */ ``` Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
This commit is contained in:
parent
1fce318efc
commit
d13abf1180
@ -117,6 +117,9 @@ struct ecommunity {
|
||||
*/
|
||||
uint8_t unit_size;
|
||||
|
||||
/* Disable IEEE floating-point encoding for extended community */
|
||||
bool disable_ieee_floating;
|
||||
|
||||
/* Size of Extended Communities attribute. */
|
||||
uint32_t size;
|
||||
|
||||
@ -125,9 +128,6 @@ struct ecommunity {
|
||||
|
||||
/* Human readable format string. */
|
||||
char *str;
|
||||
|
||||
/* Disable IEEE floating-point encoding for extended community */
|
||||
bool disable_ieee_floating;
|
||||
};
|
||||
|
||||
struct ecommunity_as {
|
||||
|
Loading…
Reference in New Issue
Block a user