summaryrefslogtreecommitdiffstats
path: root/bgpd
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas@opensourcerouting.org>2024-01-29 14:29:25 +0100
committerDonatas Abraitis <donatas@opensourcerouting.org>2024-01-29 14:29:25 +0100
commit7133cce19621746cba36e142060816fd6de7b64a (patch)
tree01c4855219089233f8960b1f9e4a7678cc8ee7b2 /bgpd
parentMerge pull request #15181 from idryzhov/zebra-mgmtd (diff)
downloadfrr-7133cce19621746cba36e142060816fd6de7b64a.tar.xz
frr-7133cce19621746cba36e142060816fd6de7b64a.zip
bgpd: Optimize memory usage for bgp_notify struct
``` struct bgp_notify { uint8_t code; /* 0 1 */ uint8_t subcode; /* 1 1 */ bgp_size_t length; /* 2 2 */ _Bool hard_reset; /* 4 1 */ /* XXX 3 bytes hole, try to pack */ char * data; /* 8 8 */ uint8_t * raw_data; /* 16 8 */ /* size: 24, cachelines: 1, members: 6 */ /* sum members: 21, holes: 1, sum holes: 3 */ /* last cacheline: 24 bytes */ }; /* saved 16 bytes! */ ``` Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Diffstat (limited to 'bgpd')
-rw-r--r--bgpd/bgpd.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/bgpd/bgpd.h b/bgpd/bgpd.h
index a1593421b..8bde9999f 100644
--- a/bgpd/bgpd.h
+++ b/bgpd/bgpd.h
@@ -888,10 +888,10 @@ struct peer_group {
struct bgp_notify {
uint8_t code;
uint8_t subcode;
- char *data;
bgp_size_t length;
- uint8_t *raw_data;
bool hard_reset;
+ char *data;
+ uint8_t *raw_data;
};
/* Next hop self address. */