compress/qat: fix dataplane return
authorFiona Trahe <fiona.trahe@intel.com>
Mon, 8 Apr 2019 16:16:28 +0000 (17:16 +0100)
committerAkhil Goyal <akhil.goyal@nxp.com>
Thu, 18 Apr 2019 14:01:28 +0000 (16:01 +0200)
Fixes: 352332744c3a ("compress/qat: add dynamic SGL allocation")
Cc: stable@dpdk.org
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
drivers/compress/qat/qat_comp.c

index 2fadb02..dd0fe1b 100644 (file)
@@ -93,7 +93,7 @@ qat_comp_build_request(void *in_op, uint8_t *out_msg,
                                QAT_DP_LOG(ERR, "QAT PMD can't allocate memory"
                                           " for %d elements of SGL",
                                           op->m_src->nb_segs);
-                               op->status = RTE_COMP_OP_STATUS_INVALID_ARGS;
+                               op->status = RTE_COMP_OP_STATUS_ERROR;
                                return -ENOMEM;
                        }
                        /* new SGL is valid now */
@@ -128,8 +128,8 @@ qat_comp_build_request(void *in_op, uint8_t *out_msg,
                                QAT_DP_LOG(ERR, "QAT PMD can't allocate memory"
                                           " for %d elements of SGL",
                                           op->m_dst->nb_segs);
-                               op->status = RTE_COMP_OP_STATUS_INVALID_ARGS;
-                               return -EINVAL;
+                               op->status = RTE_COMP_OP_STATUS_ERROR;
+                               return -ENOMEM;
                        }
                        /* new SGL is valid now */
                        cookie->qat_sgl_dst_d = (struct qat_sgl *)tmp;