X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Ftcp%2Ftcp.c;h=285ed624d568aa92bab4a3237750643425a2d402;hb=8124cb784050275372e05a97b1e62f9f1ba5a091;hp=a3cd1f3e1bb1d5b888c5d0338a293158fe370264;hpb=3c7d4f9e1f54ec6627795b64525f182e2cda7490;p=vpp.git diff --git a/src/vnet/tcp/tcp.c b/src/vnet/tcp/tcp.c index a3cd1f3e1bb..285ed624d56 100644 --- a/src/vnet/tcp/tcp.c +++ b/src/vnet/tcp/tcp.c @@ -246,7 +246,7 @@ tcp_connection_del (tcp_connection_t * tc) } tcp_connection_t * -tcp_connection_new (u8 thread_index) +tcp_connection_alloc (u8 thread_index) { tcp_main_t *tm = vnet_get_tcp_main (); tcp_connection_t *tc; @@ -258,6 +258,15 @@ tcp_connection_new (u8 thread_index) return tc; } +void +tcp_connection_free (tcp_connection_t * tc) +{ + tcp_main_t *tm = &tcp_main; + pool_put (tm->connections[tc->c_thread_index], tc); + if (CLIB_DEBUG > 0) + clib_memset (tc, 0xFA, sizeof (*tc)); +} + /** Notify session that connection has been reset. * * Switch state to closed and wait for session to call cleanup.