crypto/dpaa2_sec: fix FLC address for physical mode
authorAkhil Goyal <akhil.goyal@nxp.com>
Wed, 9 Jan 2019 15:14:21 +0000 (15:14 +0000)
committerPablo de Lara <pablo.de.lara.guarch@intel.com>
Thu, 10 Jan 2019 15:57:22 +0000 (16:57 +0100)
Fixes: 547a4d40e7bf ("crypto/dpaa2_sec: support out of place protocol offload")
Fixes: 0a23d4b6f4c2 ("crypto/dpaa2_sec: support protocol offload IPsec")
Cc: stable@dpdk.org
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c

index 82220ac..ef6e9c1 100644 (file)
@@ -108,7 +108,7 @@ build_proto_compound_fd(dpaa2_sec_session *sess,
        /* Configure FD as a FRAME LIST */
        DPAA2_SET_FD_ADDR(fd, DPAA2_VADDR_TO_IOVA(op_fle));
        DPAA2_SET_FD_COMPOUND_FMT(fd);
-       DPAA2_SET_FD_FLC(fd, (ptrdiff_t)flc);
+       DPAA2_SET_FD_FLC(fd, DPAA2_VADDR_TO_IOVA(flc));
 
        /* Configure Output FLE with dst mbuf data  */
        DPAA2_SET_FLE_ADDR(op_fle, DPAA2_MBUF_VADDR_TO_IOVA(dst_mbuf));
@@ -160,7 +160,7 @@ build_proto_fd(dpaa2_sec_session *sess,
        DPAA2_SET_FD_ADDR(fd, DPAA2_MBUF_VADDR_TO_IOVA(sym_op->m_src));
        DPAA2_SET_FD_OFFSET(fd, sym_op->m_src->data_off);
        DPAA2_SET_FD_LEN(fd, sym_op->m_src->pkt_len);
-       DPAA2_SET_FD_FLC(fd, (ptrdiff_t)flc);
+       DPAA2_SET_FD_FLC(fd, DPAA2_VADDR_TO_IOVA(flc));
 
        /* save physical address of mbuf */
        op->sym->aead.digest.phys_addr = mbuf->buf_iova;