]> git.droids-corp.org - dpdk.git/commitdiff
crypto/dpaa2_sec: fix operation status for simple FD
authorGagandeep Singh <g.singh@nxp.com>
Thu, 28 Apr 2022 11:47:30 +0000 (17:17 +0530)
committerAkhil Goyal <gakhil@marvell.com>
Fri, 29 Apr 2022 09:27:35 +0000 (11:27 +0200)
Driver is not filling the operation status on dequeue
in case the FD is simple.

So setting the status as per the results.

Fixes: 0a23d4b6f4c2 ("crypto/dpaa2_sec: support protocol offload IPsec")
Cc: stable@dpdk.org
Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c

index 9f2b384af9ee12d386ad4c8ea5ae95a9fd62e3ba..8444f1a7950d6a654d2c2aa31d68aab8d3be25cb 100644 (file)
@@ -1591,6 +1591,14 @@ sec_simple_fd_to_mbuf(const struct qbman_fd *fd)
        else
                mbuf->data_off += SEC_FLC_DHR_INBOUND;
 
+       if (unlikely(fd->simple.frc)) {
+               DPAA2_SEC_ERR("SEC returned Error - %x",
+                               fd->simple.frc);
+               op->status = RTE_CRYPTO_OP_STATUS_ERROR;
+       } else {
+               op->status = RTE_CRYPTO_OP_STATUS_SUCCESS;
+       }
+
        return op;
 }
 #endif