diff options
author | Florin Coras <fcoras@cisco.com> | 2022-03-29 17:49:37 -0700 |
---|---|---|
committer | Dave Wallace <dwallacelf@gmail.com> | 2022-10-31 15:24:18 +0000 |
commit | 009303dc06f8ecf4ed16c71e18c4e7fd40372eeb (patch) | |
tree | 3918bb5ded9abeefbf5e4a0bbb6e6bd05f6cfe0a /src/plugins/tlspicotls | |
parent | d82c39e5ff91e858c53cc67fb30d29a1d476f31b (diff) |
tls: use safe pool reallocs
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ia2c771cbf826526d2d06b6da022509ab02917350
Diffstat (limited to 'src/plugins/tlspicotls')
-rw-r--r-- | src/plugins/tlspicotls/tls_picotls.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/tlspicotls/tls_picotls.c b/src/plugins/tlspicotls/tls_picotls.c index afb48f1c72e..393f2bf9940 100644 --- a/src/plugins/tlspicotls/tls_picotls.c +++ b/src/plugins/tlspicotls/tls_picotls.c @@ -27,11 +27,11 @@ static ptls_key_exchange_algorithm_t *default_key_exchange[] = { static u32 picotls_ctx_alloc (void) { - u8 thread_id = vlib_get_thread_index (); + u32 thread_id = vlib_get_thread_index (); picotls_main_t *pm = &picotls_main; picotls_ctx_t **ctx; - pool_get (pm->ctx_pool[thread_id], ctx); + pool_get_aligned_safe (pm->ctx_pool[thread_id], ctx, CLIB_CACHE_LINE_BYTES); if (!(*ctx)) *ctx = clib_mem_alloc (sizeof (picotls_ctx_t)); |