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/plugins/dpdk/ipsec/ipsec.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/plugins/dpdk/ipsec/ipsec.c')
-rw-r--r-- | src/plugins/dpdk/ipsec/ipsec.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/plugins/dpdk/ipsec/ipsec.c b/src/plugins/dpdk/ipsec/ipsec.c index 5d9e10b3aa5..e260ba7dcc4 100644 --- a/src/plugins/dpdk/ipsec/ipsec.c +++ b/src/plugins/dpdk/ipsec/ipsec.c @@ -325,7 +325,6 @@ create_sym_session (struct rte_cryptodev_sym_session **session, crypto_worker_main_t * cwm, u8 is_outbound) { dpdk_crypto_main_t *dcm = &dpdk_crypto_main; - ipsec_main_t *im = &ipsec_main; crypto_data_t *data; ipsec_sa_t *sa; struct rte_crypto_sym_xform cipher_xform = { 0 }; @@ -334,8 +333,7 @@ create_sym_session (struct rte_cryptodev_sym_session **session, struct rte_cryptodev_sym_session **s; clib_error_t *error = 0; - - sa = pool_elt_at_index (im->sad, sa_idx); + sa = ipsec_sa_get (sa_idx); if ((sa->crypto_alg == IPSEC_CRYPTO_ALG_AES_GCM_128) | (sa->crypto_alg == IPSEC_CRYPTO_ALG_AES_GCM_192) | |