aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-02-22 09:07:20 -0800
committerDamjan Marion <dmarion@me.com>2019-02-22 20:45:19 +0000
commitb691f768a1427094f6788a2f4f268ccfe7e9d15b (patch)
treebd53ddfa4fa8bf79407552bf420bb46ed582f65c /src/vnet/tcp/tcp.c
parent18be9b90a145f5659a46edf7166a62f3c1a95c69 (diff)
tcp: keep snd sack block free list
Instead of constantly reallocating the new sack block list, keep the old one as a reusable free list. Change-Id: Iad79a72204f97b96352c1c6eea66c2839a35cfe6 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/tcp/tcp.c')
-rw-r--r--src/vnet/tcp/tcp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vnet/tcp/tcp.c b/src/vnet/tcp/tcp.c
index 9f35b82a16f..8969f7bc980 100644
--- a/src/vnet/tcp/tcp.c
+++ b/src/vnet/tcp/tcp.c
@@ -223,6 +223,9 @@ tcp_connection_cleanup (tcp_connection_t * tc)
if (!tc->c_is_ip4 && ip6_address_is_link_local_unicast (&tc->c_rmt_ip6))
tcp_add_del_adjacency (tc, 0);
+ vec_free (tc->snd_sacks);
+ vec_free (tc->snd_sacks_fl);
+
/* Poison the entry */
if (CLIB_DEBUG > 0)
clib_memset (tc, 0xFA, sizeof (*tc));