diff options
author | Neale Ranns <neale@graphiant.com> | 2021-02-25 16:01:28 +0000 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2021-02-26 02:12:06 +0000 |
commit | c5fe57dac12a46fa618259643909afaec1ac5aae (patch) | |
tree | 6962f3f1a8d10f2f30f0884889aaa379d0d3e509 /src/vnet/ipsec/ah_decrypt.c | |
parent | cc9a1a0d39f22f653801f5d08bfe4892325254b5 (diff) |
ipsec: move the IPSec SA pool out of ipsec_main
Type: refactor
this allows the ipsec_sa_get funtion to be moved from ipsec.h to
ipsec_sa.h where it belongs.
Also use ipsec_sa_get throughout the code base.
Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I2dce726c4f7052b5507dd8dcfead0ed5604357df
Diffstat (limited to 'src/vnet/ipsec/ah_decrypt.c')
-rw-r--r-- | src/vnet/ipsec/ah_decrypt.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/vnet/ipsec/ah_decrypt.c b/src/vnet/ipsec/ah_decrypt.c index a5e277ee09f..d192fb6b80a 100644 --- a/src/vnet/ipsec/ah_decrypt.c +++ b/src/vnet/ipsec/ah_decrypt.c @@ -169,7 +169,7 @@ ah_decrypt_inline (vlib_main_t * vm, current_sa_pkts, current_sa_bytes); current_sa_index = vnet_buffer (b[0])->ipsec.sad_index; - sa0 = pool_elt_at_index (im->sad, current_sa_index); + sa0 = ipsec_sa_get (current_sa_index); current_sa_bytes = current_sa_pkts = 0; vlib_prefetch_combined_counter (&ipsec_sa_counters, @@ -317,7 +317,7 @@ ah_decrypt_inline (vlib_main_t * vm, if (next[0] < AH_DECRYPT_N_NEXT) goto trace; - sa0 = vec_elt_at_index (im->sad, pd->sa_index); + sa0 = ipsec_sa_get (pd->sa_index); if (PREDICT_TRUE (sa0->integ_alg != IPSEC_INTEG_ALG_NONE)) { @@ -399,8 +399,7 @@ ah_decrypt_inline (vlib_main_t * vm, trace: if (PREDICT_FALSE (b[0]->flags & VLIB_BUFFER_IS_TRACED)) { - sa0 = pool_elt_at_index (im->sad, - vnet_buffer (b[0])->ipsec.sad_index); + sa0 = ipsec_sa_get (vnet_buffer (b[0])->ipsec.sad_index); ah_decrypt_trace_t *tr = vlib_add_trace (vm, node, b[0], sizeof (*tr)); tr->integ_alg = sa0->integ_alg; |