aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/ipsec/esp_decrypt.c
diff options
context:
space:
mode:
authorSergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>2017-10-18 14:44:24 +0100
committerDamjan Marion <dmarion.lists@gmail.com>2017-10-19 12:35:25 +0000
commitc47652c50bd1dcf7492d5e991d99be284a0683fd (patch)
treed0ec28db919605ea01f644f21a09117b1c248f19 /src/plugins/dpdk/ipsec/esp_decrypt.c
parentfb353ce54efc3abf3c2ba7795d0c9bf7aed6df96 (diff)
dpdk/ipsec: fix digest physical address
VPP-1034 Change-Id: Ib13cf0395bc2e42d24de51347e0aeed8a137f2f2 Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Diffstat (limited to 'src/plugins/dpdk/ipsec/esp_decrypt.c')
-rw-r--r--src/plugins/dpdk/ipsec/esp_decrypt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/dpdk/ipsec/esp_decrypt.c b/src/plugins/dpdk/ipsec/esp_decrypt.c
index c4f295d3..20936b36 100644
--- a/src/plugins/dpdk/ipsec/esp_decrypt.c
+++ b/src/plugins/dpdk/ipsec/esp_decrypt.c
@@ -236,7 +236,7 @@ dpdk_esp_decrypt_node_fn (vlib_main_t * vm,
u32 cipher_off, cipher_len;
u32 auth_off = 0, auth_len = 0, aad_size = 0;
u8 *aad = NULL, *digest = NULL;
- u64 digest_paddr = 0;
+ u64 digest_paddr;
u8 *iv = rte_pktmbuf_mtod_offset(mb0, void*, sizeof (esp_header_t));
dpdk_cop_priv_t *priv = (dpdk_cop_priv_t *)(sym_cop + 1);
@@ -249,6 +249,8 @@ dpdk_esp_decrypt_node_fn (vlib_main_t * vm,
vlib_buffer_get_current (b0) + sizeof(esp_header_t) +
iv_size + payload_len;
+ digest_paddr = mb0->buf_physaddr + (digest - (u8 *) mb0->buf_addr);
+
if (is_aead)
{
u32 *_iv = (u32 *) iv;