mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-05 07:48:38 +00:00
bgpd: Remove peer->scratch
This was only ever being allocated and de-allocated. Let's save 65k per peer Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
3a58764e3a
commit
b157af0ac1
@ -1432,8 +1432,6 @@ struct peer *peer_new(struct bgp *bgp)
|
||||
peer->ibuf_work =
|
||||
ringbuf_new(BGP_MAX_PACKET_SIZE * BGP_READ_PACKET_MAX);
|
||||
|
||||
peer->scratch = stream_new(BGP_MAX_PACKET_SIZE);
|
||||
|
||||
bgp_sync_init(peer);
|
||||
|
||||
/* Get service port number. */
|
||||
@ -2629,11 +2627,6 @@ int peer_delete(struct peer *peer)
|
||||
peer->obuf_work = NULL;
|
||||
}
|
||||
|
||||
if (peer->scratch) {
|
||||
stream_free(peer->scratch);
|
||||
peer->scratch = NULL;
|
||||
}
|
||||
|
||||
/* Local and remote addresses. */
|
||||
if (peer->su_local) {
|
||||
sockunion_free(peer->su_local);
|
||||
|
@ -1171,12 +1171,6 @@ struct peer {
|
||||
|
||||
struct stream *curr; // the current packet being parsed
|
||||
|
||||
/* We use a separate stream to encode MP_REACH_NLRI for efficient
|
||||
* NLRI packing. peer->obuf_work stores all the other attributes. The
|
||||
* actual packet is then constructed by concatenating the two.
|
||||
*/
|
||||
struct stream *scratch;
|
||||
|
||||
/* the doppelganger peer structure, due to dual TCP conn setup */
|
||||
struct peer *doppelganger;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user