From b01873208bd6201e83f806699ad11dfb5ee2939e Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Tue, 15 Mar 2022 16:27:43 -0700 Subject: tcp: use safe realloc pool Type: improvement Signed-off-by: Florin Coras Change-Id: I8ba93643236aaa50eeb4755b74821a8c4ca6179b --- src/vnet/tcp/tcp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vnet/tcp/tcp.c b/src/vnet/tcp/tcp.c index d97fafa6f24..09913fa1242 100644 --- a/src/vnet/tcp/tcp.c +++ b/src/vnet/tcp/tcp.c @@ -293,7 +293,7 @@ tcp_connection_alloc (u8 thread_index) tcp_worker_ctx_t *wrk = tcp_get_worker (thread_index); tcp_connection_t *tc; - pool_get (wrk->connections, tc); + pool_get_aligned_safe (wrk->connections, tc, CLIB_CACHE_LINE_BYTES); clib_memset (tc, 0, sizeof (*tc)); tc->c_c_index = tc - wrk->connections; tc->c_thread_index = thread_index; @@ -310,12 +310,12 @@ tcp_connection_alloc_w_base (u8 thread_index, tcp_connection_t **base) if ((*base)->c_thread_index == thread_index) { u32 base_index = (*base)->c_c_index; - pool_get (wrk->connections, tc); + pool_get_aligned_safe (wrk->connections, tc, CLIB_CACHE_LINE_BYTES); *base = tcp_connection_get (base_index, thread_index); } else { - pool_get (wrk->connections, tc); + pool_get_aligned_safe (wrk->connections, tc, CLIB_CACHE_LINE_BYTES); } clib_memcpy_fast (tc, *base, sizeof (*tc)); tc->c_c_index = tc - wrk->connections; -- cgit 1.2.3-korg