summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/dpdk/ipsec/ipsec.c10
-rw-r--r--src/plugins/dpdk/ipsec/ipsec.h2
2 files changed, 7 insertions, 5 deletions
diff --git a/src/plugins/dpdk/ipsec/ipsec.c b/src/plugins/dpdk/ipsec/ipsec.c
index 6aa5fae8b26..dfbda5ba473 100644
--- a/src/plugins/dpdk/ipsec/ipsec.c
+++ b/src/plugins/dpdk/ipsec/ipsec.c
@@ -974,7 +974,7 @@ crypto_create_pools (void)
/* *INDENT-OFF* */
vec_foreach (dev, dcm->dev)
{
- vec_validate (dcm->data, dev->numa);
+ vec_validate_aligned (dcm->data, dev->numa, CLIB_CACHE_LINE_BYTES);
error = crypto_create_crypto_op_pool (dev->numa);
if (error)
@@ -1016,7 +1016,6 @@ crypto_disable (void)
/* *INDENT-ON* */
vec_free (dcm->data);
-
vec_free (dcm->workers_main);
vec_free (dcm->sa_session);
vec_free (dcm->dev);
@@ -1050,12 +1049,15 @@ dpdk_ipsec_process (vlib_main_t * vm, vlib_node_runtime_t * rt,
return 0;
}
- vec_validate_init_empty (dcm->workers_main, n_mains - 1,
- (crypto_worker_main_t) EMPTY_STRUCT);
+ vec_validate_init_empty_aligned (dcm->workers_main, n_mains - 1,
+ (crypto_worker_main_t) EMPTY_STRUCT,
+ CLIB_CACHE_LINE_BYTES);
/* *INDENT-OFF* */
vec_foreach (cwm, dcm->workers_main)
{
+ vec_validate_init_empty_aligned (cwm->ops, VLIB_FRAME_SIZE - 1, 0,
+ CLIB_CACHE_LINE_BYTES);
memset (cwm->cipher_resource_idx, ~0,
IPSEC_CRYPTO_N_ALG * sizeof(*cwm->cipher_resource_idx));
memset (cwm->auth_resource_idx, ~0,
diff --git a/src/plugins/dpdk/ipsec/ipsec.h b/src/plugins/dpdk/ipsec/ipsec.h
index 2a48e4e6110..d40e480ae42 100644
--- a/src/plugins/dpdk/ipsec/ipsec.h
+++ b/src/plugins/dpdk/ipsec/ipsec.h
@@ -66,9 +66,9 @@ typedef struct
{
u16 *resource_idx;
uword *session_by_drv_id_and_sa_index;
+ struct rte_crypto_op **ops;
u16 cipher_resource_idx[IPSEC_CRYPTO_N_ALG];
u16 auth_resource_idx[IPSEC_INTEG_N_ALG];
- struct rte_crypto_op *ops[VLIB_FRAME_SIZE];
} crypto_worker_main_t __attribute__ ((aligned (CLIB_CACHE_LINE_BYTES)));
typedef struct