aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2022-03-31 15:42:17 -0700
committerDamjan Marion <dmarion@me.com>2022-04-01 15:40:34 +0000
commitd3915dc1b5201956578eb900a2d936d94fc09b90 (patch)
tree85f1a2e31158c1825946f0b238ad546a26033784 /src/vnet/session/session.c
parent691c630b79ec2230b67944c8a9f77f95b49d95ad (diff)
session: leverage new pool functions in safe realloc
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I2c264c31d2470b11b94d68411fa8266387319146
Diffstat (limited to 'src/vnet/session/session.c')
-rw-r--r--src/vnet/session/session.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c
index f1d1a4e2cfe..256760079ee 100644
--- a/src/vnet/session/session.c
+++ b/src/vnet/session/session.c
@@ -197,26 +197,13 @@ session_program_transport_ctrl_evt (session_t * s, session_evt_type_t evt)
session_send_ctrl_evt_to_thread (s, evt);
}
-static void
-session_pool_realloc_rpc (void *rpc_args)
-{
- session_worker_t *wrk;
- u32 thread_index;
-
- thread_index = pointer_to_uword (rpc_args);
- wrk = &session_main.wrk[thread_index];
-
- pool_realloc_safe_aligned (wrk->sessions, CLIB_CACHE_LINE_BYTES);
-}
-
session_t *
session_alloc (u32 thread_index)
{
session_worker_t *wrk = &session_main.wrk[thread_index];
session_t *s;
- pool_get_aligned_safe (wrk->sessions, s, thread_index,
- session_pool_realloc_rpc, CLIB_CACHE_LINE_BYTES);
+ pool_get_aligned_safe (wrk->sessions, s, CLIB_CACHE_LINE_BYTES);
clib_memset (s, 0, sizeof (*s));
s->session_index = s - wrk->sessions;
s->thread_index = thread_index;