[dpdk-stable] patch 'compress/qat: fix returned status on overflow' has been queued to LTS release 18.11.1

Kevin Traynor ktraynor at redhat.com
Thu Jan 31 16:48:13 CET 2019


Hi,

FYI, your patch has been queued to LTS release 18.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/07/19. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Kevin Traynor

---
>From 210b4407288a9ad4d001723535610adc0559bce6 Mon Sep 17 00:00:00 2001
From: Tomasz Jozwiak <tomaszx.jozwiak at intel.com>
Date: Thu, 27 Dec 2018 11:42:19 +0100
Subject: [PATCH] compress/qat: fix returned status on overflow

[ upstream commit 3dc9ef2d23fe4787947f58758394444e677ea311 ]

This patch fixes correct status in case of overflow on
QAT is detected.
In that case RTE_COMP_OP_STATUS_OUT_OF_SPACE_TERMINATED value is set in
rte_comp_op.status field instead of RTE_COMP_OP_STATUS_ERROR

Fixes: 32842f2a6d7d ("compress/qat: create FW request and process response")

Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak at intel.com>
Acked-by: Fiona Trahe <fiona.trahe at intel.com>
---
 drivers/compress/qat/qat_comp.c | 35 ++++++++++++++++++++++-----------
 1 file changed, 24 insertions(+), 11 deletions(-)

diff --git a/drivers/compress/qat/qat_comp.c b/drivers/compress/qat/qat_comp.c
index bb006104f..450cfd659 100644
--- a/drivers/compress/qat/qat_comp.c
+++ b/drivers/compress/qat/qat_comp.c
@@ -118,4 +118,7 @@ qat_comp_process_response(void **op, uint8_t *resp, uint64_t *dequeue_err_count)
 	struct qat_comp_xform *qat_xform = (struct qat_comp_xform *)
 				(rx_op->private_xform);
+	int err = resp_msg->comn_resp.comn_status &
+			((1 << QAT_COMN_RESP_CMP_STATUS_BITPOS) |
+			 (1 << QAT_COMN_RESP_XLAT_STATUS_BITPOS));
 
 #if RTE_LOG_DP_LEVEL >= RTE_LOG_DEBUG
@@ -141,19 +144,29 @@ qat_comp_process_response(void **op, uint8_t *resp, uint64_t *dequeue_err_count)
 	}
 
-	if ((ICP_QAT_FW_COMN_RESP_CMP_STAT_GET(resp_msg->comn_resp.comn_status)
-		| ICP_QAT_FW_COMN_RESP_XLAT_STAT_GET(
-				resp_msg->comn_resp.comn_status)) !=
-				ICP_QAT_FW_COMN_STATUS_FLAG_OK) {
-
-		if (unlikely((ICP_QAT_FW_COMN_RESP_XLAT_STAT_GET(
-				resp_msg->comn_resp.comn_status) !=
-				ICP_QAT_FW_COMN_STATUS_FLAG_OK) &&
-				(qat_xform->qat_comp_request_type
-				== QAT_COMP_REQUEST_DYNAMIC_COMP_STATELESS)))
+	if (err) {
+		if (unlikely((err & (1 << QAT_COMN_RESP_XLAT_STATUS_BITPOS))
+			     &&	(qat_xform->qat_comp_request_type
+				 == QAT_COMP_REQUEST_DYNAMIC_COMP_STATELESS))) {
 			QAT_DP_LOG(ERR, "QAT intermediate buffer may be too "
 			    "small for output, try configuring a larger size");
+		}
+
+		int8_t cmp_err_code =
+			(int8_t)resp_msg->comn_resp.comn_error.cmp_err_code;
+		int8_t xlat_err_code =
+			(int8_t)resp_msg->comn_resp.comn_error.xlat_err_code;
+
+		if ((cmp_err_code == ERR_CODE_OVERFLOW_ERROR && !xlat_err_code)
+				||
+		    (!cmp_err_code && xlat_err_code == ERR_CODE_OVERFLOW_ERROR)
+				||
+		    (cmp_err_code == ERR_CODE_OVERFLOW_ERROR &&
+		     xlat_err_code == ERR_CODE_OVERFLOW_ERROR))
+			rx_op->status =
+				RTE_COMP_OP_STATUS_OUT_OF_SPACE_TERMINATED;
+		else
+			rx_op->status = RTE_COMP_OP_STATUS_ERROR;
 
 		++(*dequeue_err_count);
-		rx_op->status = RTE_COMP_OP_STATUS_ERROR;
 		rx_op->debug_status =
 			*((uint16_t *)(&resp_msg->comn_resp.comn_error));
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-01-31 15:44:05.868608611 +0000
+++ 0005-compress-qat-fix-returned-status-on-overflow.patch	2019-01-31 15:44:05.000000000 +0000
@@ -1,15 +1,16 @@
-From 3dc9ef2d23fe4787947f58758394444e677ea311 Mon Sep 17 00:00:00 2001
+From 210b4407288a9ad4d001723535610adc0559bce6 Mon Sep 17 00:00:00 2001
 From: Tomasz Jozwiak <tomaszx.jozwiak at intel.com>
 Date: Thu, 27 Dec 2018 11:42:19 +0100
 Subject: [PATCH] compress/qat: fix returned status on overflow
 
+[ upstream commit 3dc9ef2d23fe4787947f58758394444e677ea311 ]
+
 This patch fixes correct status in case of overflow on
 QAT is detected.
 In that case RTE_COMP_OP_STATUS_OUT_OF_SPACE_TERMINATED value is set in
 rte_comp_op.status field instead of RTE_COMP_OP_STATUS_ERROR
 
 Fixes: 32842f2a6d7d ("compress/qat: create FW request and process response")
-Cc: stable at dpdk.org
 
 Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak at intel.com>
 Acked-by: Fiona Trahe <fiona.trahe at intel.com>
@@ -18,7 +19,7 @@
  1 file changed, 24 insertions(+), 11 deletions(-)
 
 diff --git a/drivers/compress/qat/qat_comp.c b/drivers/compress/qat/qat_comp.c
-index e745d1362..32ca753b7 100644
+index bb006104f..450cfd659 100644
 --- a/drivers/compress/qat/qat_comp.c
 +++ b/drivers/compress/qat/qat_comp.c
 @@ -118,4 +118,7 @@ qat_comp_process_response(void **op, uint8_t *resp, uint64_t *dequeue_err_count)


More information about the stable mailing list