summaryrefslogtreecommitdiff
path: root/bgpd/bgpd.h
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2023-07-21 13:10:03 -0400
committerDonald Sharp <sharpd@nvidia.com>2023-07-21 13:10:03 -0400
commitbdc17624059c1722e5208523cb06fe9b0ed7acb2 (patch)
treef8a059a6caf80f615a9eefc35d7394a8fe220031 /bgpd/bgpd.h
parent4215e8011b52abaccc96198cb8fa6d7034521dc9 (diff)
bgpd: Replace peer->ibuf_scratch
The peer->ibuf_scratch was allocating 65535 * 10 bytes for scratch space to hold data incoming from a read from a peer. When you have 4k peers this is 262,1400,000 or 262 mb of data. Which is crazy large. Especially since the i/o pthread is reading per peer without any chance of having the data interfere with other reads. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'bgpd/bgpd.h')
-rw-r--r--bgpd/bgpd.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/bgpd/bgpd.h b/bgpd/bgpd.h
index a9d77f862f..5c42abef5e 100644
--- a/bgpd/bgpd.h
+++ b/bgpd/bgpd.h
@@ -1163,9 +1163,6 @@ struct peer {
struct stream_fifo *ibuf; // packets waiting to be processed
struct stream_fifo *obuf; // packets waiting to be written
- /* used as a block to deposit raw wire data to */
- uint8_t ibuf_scratch[BGP_EXTENDED_MESSAGE_MAX_PACKET_SIZE
- * BGP_READ_PACKET_MAX];
struct ringbuf *ibuf_work; // WiP buffer used by bgp_read() only
struct stream *curr; // the current packet being parsed