aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/srtp/srtp.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/plugins/srtp/srtp.c b/src/plugins/srtp/srtp.c
index c9987e8a47f..36f4628aa0c 100644
--- a/src/plugins/srtp/srtp.c
+++ b/src/plugins/srtp/srtp.c
@@ -26,7 +26,9 @@ static inline u32
srtp_ctx_alloc_w_thread (u32 thread_index)
{
srtp_tc_t *ctx;
- pool_get_zero (srtp_main.ctx_pool[thread_index], ctx);
+ pool_get_aligned_safe (srtp_main.ctx_pool[thread_index], ctx,
+ CLIB_CACHE_LINE_BYTES);
+ clib_memset (ctx, 0, sizeof (*ctx));
ctx->c_thread_index = thread_index;
ctx->srtp_ctx_handle = ctx - srtp_main.ctx_pool[thread_index];
ctx->app_session_handle = SESSION_INVALID_HANDLE;
@@ -84,7 +86,8 @@ srtp_ctx_attach (u32 thread_index, void *ctx_ptr)
{
srtp_tc_t *ctx;
- pool_get (srtp_main.ctx_pool[thread_index], ctx);
+ pool_get_aligned_safe (srtp_main.ctx_pool[thread_index], ctx,
+ CLIB_CACHE_LINE_BYTES);
clib_memcpy (ctx, ctx_ptr, sizeof (*ctx));
ctx->c_thread_index = thread_index;