From 652b59df06ccf554d4c39ab76f8b85cc003cf9b0 Mon Sep 17 00:00:00 2001 From: Tomasz Jozwiak Date: Fri, 14 Dec 2018 12:19:31 +0100 Subject: [PATCH] compress/qat: fix return on building request error This patch fixes error status which should be set inside qat_comp_build_request function in case any errors are detected. In these cases op.status is set to RTE_COMP_OP_STATUS_INVALID_ARGS to help application debug. Fixes: 1947bd18580b ("compress/qat: support scatter-gather buffers") Cc: stable@dpdk.org Signed-off-by: Tomasz Jozwiak Acked-by: Fiona Trahe --- drivers/compress/qat/qat_comp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/compress/qat/qat_comp.c b/drivers/compress/qat/qat_comp.c index 27547428f4..8a6fad06a4 100644 --- a/drivers/compress/qat/qat_comp.c +++ b/drivers/compress/qat/qat_comp.c @@ -36,6 +36,7 @@ qat_comp_build_request(void *in_op, uint8_t *out_msg, QAT_DP_LOG(ERR, "QAT PMD only supports stateless compression " "operation requests, op (%p) is not a " "stateless operation.", op); + op->status = RTE_COMP_OP_STATUS_INVALID_ARGS; return -EINVAL; } @@ -61,6 +62,7 @@ qat_comp_build_request(void *in_op, uint8_t *out_msg, RTE_PMD_QAT_COMP_SGL_MAX_SEGMENTS); if (ret) { QAT_DP_LOG(ERR, "QAT PMD Cannot fill source sgl array"); + op->status = RTE_COMP_OP_STATUS_INVALID_ARGS; return ret; } @@ -71,6 +73,7 @@ qat_comp_build_request(void *in_op, uint8_t *out_msg, RTE_PMD_QAT_COMP_SGL_MAX_SEGMENTS); if (ret) { QAT_DP_LOG(ERR, "QAT PMD Cannot fill dest. sgl array"); + op->status = RTE_COMP_OP_STATUS_INVALID_ARGS; return ret; } -- 2.20.1