summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2020-03-05 16:17:59 +0000
committerDave Barach <openvpp@barachs.net>2020-03-06 13:33:58 +0000
commit1322375357fb7596fc976b5613181a3587163099 (patch)
tree355e8a92bb8f43db8ed4f325197b0555594857eb
parent724c8051d1f589c8890b0a4ad41a29d8d6581c9c (diff)
ikev2: align per thread data to cache line
Type: improvement Change-Id: Id8fc6750e856862157917587234a6b7b03531b13 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
-rw-r--r--src/plugins/ikev2/ikev2.c3
-rw-r--r--src/plugins/ikev2/ikev2_priv.h2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/ikev2/ikev2.c b/src/plugins/ikev2/ikev2.c
index a9d7e5696a8..03757c45ec3 100644
--- a/src/plugins/ikev2/ikev2.c
+++ b/src/plugins/ikev2/ikev2.c
@@ -3596,7 +3596,8 @@ ikev2_init (vlib_main_t * vm)
mhash_init_vec_string (&km->profile_index_by_name, sizeof (uword));
- vec_validate (km->per_thread_data, tm->n_vlib_mains - 1);
+ vec_validate_aligned (km->per_thread_data, tm->n_vlib_mains - 1,
+ CLIB_CACHE_LINE_BYTES);
for (thread_id = 0; thread_id < tm->n_vlib_mains - 1; thread_id++)
{
km->per_thread_data[thread_id].sa_by_rspi =
diff --git a/src/plugins/ikev2/ikev2_priv.h b/src/plugins/ikev2/ikev2_priv.h
index 7609166cb6a..1cae47b4290 100644
--- a/src/plugins/ikev2/ikev2_priv.h
+++ b/src/plugins/ikev2/ikev2_priv.h
@@ -436,6 +436,8 @@ typedef struct
typedef struct
{
+ CLIB_CACHE_LINE_ALIGN_MARK (cacheline0);
+
/* pool of IKEv2 Security Associations */
ikev2_sa_t *sas;