From: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
To: dev@dpdk.org, fiona.trahe@intel.com, tomaszx.jozwiak@intel.com,
akhil.goyal@nxp.com, stable@dpdk.org
Subject: [dpdk-dev] [PATCH] compress/qat: fix status return on error building request
Date: Fri, 14 Dec 2018 12:19:31 +0100 [thread overview]
Message-ID: <1544786371-29799-2-git-send-email-tomaszx.jozwiak@intel.com> (raw)
In-Reply-To: <1544786371-29799-1-git-send-email-tomaszx.jozwiak@intel.com>
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 <tomaszx.jozwiak@intel.com>
---
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 2754742..8a6fad0 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.7.4
next prev parent reply other threads:[~2018-12-14 11:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-14 11:19 [dpdk-dev] [PATCH] common/qat: revert fix for invalid response from firmware Tomasz Jozwiak
2018-12-14 11:19 ` Tomasz Jozwiak [this message]
2018-12-14 18:48 ` [dpdk-dev] [PATCH] compress/qat: fix status return on error building request Trahe, Fiona
2018-12-18 10:32 ` Akhil Goyal
2019-01-09 22:43 ` De Lara Guarch, Pablo
2018-12-14 18:47 ` [dpdk-dev] [PATCH] common/qat: revert fix for invalid response from firmware Trahe, Fiona
2018-12-18 10:31 ` Akhil Goyal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1544786371-29799-2-git-send-email-tomaszx.jozwiak@intel.com \
--to=tomaszx.jozwiak@intel.com \
--cc=akhil.goyal@nxp.com \
--cc=dev@dpdk.org \
--cc=fiona.trahe@intel.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).