summaryrefslogtreecommitdiffstats
path: root/src/vnet/ipsec/ah_encrypt.c
diff options
context:
space:
mode:
authorNeale Ranns <neale@graphiant.com>2021-02-04 11:33:32 +0000
committerNeale Ranns <neale@graphiant.com>2021-02-04 11:33:32 +0000
commit1a52d37fc50acd479274c29c2e92b05cf32c3a6d (patch)
tree65552badb1eff7b5557e2e1a47f39553d42efada /src/vnet/ipsec/ah_encrypt.c
parent38fae310843b7431136f40bfa8cf7c6bec59450f (diff)
ipsec: one thread index per-SA
Type: improvement AN SA is uni-drectional therefore it can be used only for encrypt or decrypt, not both. So it only needs one thread ID. free up some space on the 1st cacheline. Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: I21cb7cff70a763cbe2bffead860b574bc80b3136
Diffstat (limited to 'src/vnet/ipsec/ah_encrypt.c')
-rw-r--r--src/vnet/ipsec/ah_encrypt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vnet/ipsec/ah_encrypt.c b/src/vnet/ipsec/ah_encrypt.c
index d89cb093f26..a4c34917550 100644
--- a/src/vnet/ipsec/ah_encrypt.c
+++ b/src/vnet/ipsec/ah_encrypt.c
@@ -184,16 +184,16 @@ ah_encrypt_inline (vlib_main_t * vm,
pd->sa_index = current_sa_index;
next[0] = AH_ENCRYPT_NEXT_DROP;
- if (PREDICT_FALSE (~0 == sa0->encrypt_thread_index))
+ if (PREDICT_FALSE (~0 == sa0->thread_index))
{
/* this is the first packet to use this SA, claim the SA
* for this thread. this could happen simultaneously on
* another thread */
- clib_atomic_cmp_and_swap (&sa0->encrypt_thread_index, ~0,
+ clib_atomic_cmp_and_swap (&sa0->thread_index, ~0,
ipsec_sa_assign_thread (thread_index));
}
- if (PREDICT_TRUE (thread_index != sa0->encrypt_thread_index))
+ if (PREDICT_TRUE (thread_index != sa0->thread_index))
{
next[0] = AH_ENCRYPT_NEXT_HANDOFF;
goto next;