summaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/ipsec/ipsec.c
diff options
context:
space:
mode:
authorSergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>2017-10-31 15:58:57 +0000
committerDamjan Marion <dmarion.lists@gmail.com>2017-11-01 09:28:59 +0000
commitdf36f2176d7e90dcd3e895b08ee2d69f42d15426 (patch)
treeb85528902608caf36a4416db02d2a20fc745f788 /src/plugins/dpdk/ipsec/ipsec.c
parentaa3a25c1c9534a634ca20f64cbeb287733c67d9d (diff)
dpdk/ipsec: align memory
Change-Id: I2feb3e07c3070e8a525c539dd2feffa0dd1bca21 Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Diffstat (limited to 'src/plugins/dpdk/ipsec/ipsec.c')
-rw-r--r--src/plugins/dpdk/ipsec/ipsec.c10
1 files changed, 6 insertions, 4 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,