]>
git.puffer.fish Git - mirror/frr.git/commit
bgpd: Optimize memory for peer_connection struct
```
struct peer_connection {
struct peer * peer; /* 0 8 */
enum bgp_fsm_status status; /* 8 4 */
enum bgp_fsm_status ostatus; /* 12 4 */
int fd; /* 16 4 */
uint32_t thread_flags; /* 20 4 */
pthread_mutex_t io_mtx; /* 24 40 */
/* --- cacheline 1 boundary (64 bytes) --- */
struct stream_fifo * ibuf; /* 64 8 */
struct stream_fifo * obuf; /* 72 8 */
struct ringbuf * ibuf_work; /* 80 8 */
struct event * t_read; /* 88 8 */
struct event * t_write; /* 96 8 */
struct event * t_connect; /* 104 8 */
struct event * t_delayopen; /* 112 8 */
struct event * t_start; /* 120 8 */
/* --- cacheline 2 boundary (128 bytes) --- */
struct event * t_holdtime; /* 128 8 */
struct event * t_connect_check_r; /* 136 8 */
struct event * t_connect_check_w; /* 144 8 */
struct event * t_gr_restart; /* 152 8 */
struct event * t_gr_stale; /* 160 8 */
struct event * t_generate_updgrp_packets; /* 168 8 */
struct event * t_pmax_restart; /* 176 8 */
struct event * t_routeadv; /* 184 8 */
/* --- cacheline 3 boundary (192 bytes) --- */
struct event * t_process_packet; /* 192 8 */
struct event * t_process_packet_error; /* 200 8 */
union sockunion su; /* 208 128 */
/* size: 336, cachelines: 6, members: 25 */
/* last cacheline: 16 bytes */
}; /* saved 8 bytes! */
```
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>