X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Fdpdk%2Fipsec%2Fesp_decrypt.c;h=9a782abeb949b273a66c345cb353c6feb4edbcce;hb=refs%2Fchanges%2F45%2F31445%2F3;hp=dcf7fda915c9df3117a1437eedf91cb4448247c5;hpb=f6cb04460465d48a155aa3363106a82d160c7328;p=vpp.git diff --git a/src/plugins/dpdk/ipsec/esp_decrypt.c b/src/plugins/dpdk/ipsec/esp_decrypt.c index dcf7fda915c..9a782abeb94 100644 --- a/src/plugins/dpdk/ipsec/esp_decrypt.c +++ b/src/plugins/dpdk/ipsec/esp_decrypt.c @@ -98,7 +98,6 @@ dpdk_esp_decrypt_inline (vlib_main_t * vm, vlib_frame_t * from_frame, int is_ip6) { u32 n_left_from, *from, *to_next, next_index, thread_index; - ipsec_main_t *im = &ipsec_main; u32 thread_idx = vlib_get_thread_index (); dpdk_crypto_main_t *dcm = &dpdk_crypto_main; crypto_resource_t *res = 0; @@ -181,7 +180,7 @@ dpdk_esp_decrypt_inline (vlib_main_t * vm, if (sa_index0 != last_sa_index) { - sa0 = pool_elt_at_index (im->sad, sa_index0); + sa0 = ipsec_sa_get (sa_index0); cipher_alg = vec_elt_at_index (dcm->cipher_algs, sa0->crypto_alg); @@ -308,8 +307,7 @@ dpdk_esp_decrypt_inline (vlib_main_t * vm, cipher_len = payload_len; u8 *digest = vlib_buffer_get_tail (b0) - trunc_size; - u64 digest_paddr = - mb0->buf_physaddr + digest - ((u8 *) mb0->buf_addr); + u64 digest_paddr = mb0->buf_iova + digest - ((u8 *) mb0->buf_addr); if (!is_aead && cipher_alg->alg == RTE_CRYPTO_CIPHER_AES_CBC) clib_memcpy_fast (icb, iv, 16); @@ -499,7 +497,6 @@ dpdk_esp_decrypt_post_inline (vlib_main_t * vm, u32 n_left_from, *from, *to_next = 0, next_index; ipsec_sa_t *sa0; u32 sa_index0 = ~0; - ipsec_main_t *im = &ipsec_main; dpdk_crypto_main_t *dcm = &dpdk_crypto_main; from = vlib_frame_vector_args (from_frame); @@ -536,7 +533,7 @@ dpdk_esp_decrypt_post_inline (vlib_main_t * vm, esp0 = vlib_buffer_get_current (b0); sa_index0 = vnet_buffer (b0)->ipsec.sad_index; - sa0 = pool_elt_at_index (im->sad, sa_index0); + sa0 = ipsec_sa_get (sa_index0); to_next[0] = bi0; to_next += 1;