Skip to content

Commit

Permalink
crypto/dpaa2_sec: fix buffer pool ID check
Browse files Browse the repository at this point in the history
[ upstream commit e2b70a309f901b6aa947087a318ba0be3ea8782b ]

Simple fd rely on bpid of the buffers whereas
other FD types can support buffers without bpid
of pool.

So moving the bpid check to simple fd to mbuf
conversion function.

Fixes: 8d1f3a5 ("crypto/dpaa2_sec: support crypto operation")

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
  • Loading branch information
Gagandeep Singh authored and cpaelzer committed Jul 6, 2022
1 parent 69e05f6 commit 003f602
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1530,6 +1530,10 @@ sec_simple_fd_to_mbuf(const struct qbman_fd *fd)
int16_t diff = 0;
dpaa2_sec_session *sess_priv __rte_unused;

if (unlikely(DPAA2_GET_FD_IVP(fd))) {
DPAA2_SEC_ERR("error: non inline buffer");
return NULL;
}
struct rte_mbuf *mbuf = DPAA2_INLINE_MBUF_FROM_BUF(
DPAA2_IOVA_TO_VADDR(DPAA2_GET_FD_ADDR(fd)),
rte_dpaa2_bpid_info[DPAA2_GET_FD_BPID(fd)].meta_data_size);
Expand Down Expand Up @@ -1576,11 +1580,6 @@ sec_fd_to_mbuf(const struct qbman_fd *fd)
* We can have a better approach to use the inline Mbuf
*/

if (unlikely(DPAA2_GET_FD_IVP(fd))) {
/* TODO complete it. */
DPAA2_SEC_ERR("error: non inline buffer");
return NULL;
}
op = (struct rte_crypto_op *)DPAA2_GET_FLE_ADDR((fle - 1));

/* Prefeth op */
Expand Down

0 comments on commit 003f602

Please sign in to comment.