DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] compress/qat: fix error counter in dequeue errors
@ 2018-12-14 12:11 Tomasz Jozwiak
  2018-12-14 18:56 ` Trahe, Fiona
  0 siblings, 1 reply; 3+ messages in thread
From: Tomasz Jozwiak @ 2018-12-14 12:11 UTC (permalink / raw)
  To: dev, fiona.trahe, tomaszx.jozwiak, akhil.goyal, stable

This patch increments error counter (stats.dequeue_err_count)
in case of any error detection during qat_comp_process_response
function.

Fixes: 3cc14fc48e35 ("compress/qat: check that correct firmware is in use")
Fixes: 32842f2a6d7d ("compress/qat: create FW request and process response")
Cc: stable@dpdk.org

Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
---
 drivers/common/qat/qat_qp.c     | 6 ++++--
 drivers/common/qat/qat_qp.h     | 3 ++-
 drivers/compress/qat/qat_comp.c | 4 +++-
 drivers/compress/qat/qat_comp.h | 4 ++--
 4 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/drivers/common/qat/qat_qp.c b/drivers/common/qat/qat_qp.c
index 79f6a01..f0386ac 100644
--- a/drivers/common/qat/qat_qp.c
+++ b/drivers/common/qat/qat_qp.c
@@ -654,7 +654,8 @@ qat_dequeue_op_burst(void *qp, void **ops, uint16_t nb_ops)
 		if (tmp_qp->service_type == QAT_SERVICE_SYMMETRIC)
 			qat_sym_process_response(ops, resp_msg);
 		else if (tmp_qp->service_type == QAT_SERVICE_COMPRESSION)
-			qat_comp_process_response(ops, resp_msg);
+			qat_comp_process_response(ops, resp_msg,
+					&tmp_qp->stats.dequeue_err_count);
 
 		head = adf_modulo(head + rx_queue->msg_size,
 				  rx_queue->modulo_mask);
@@ -682,7 +683,8 @@ qat_dequeue_op_burst(void *qp, void **ops, uint16_t nb_ops)
 }
 
 __rte_weak int
-qat_comp_process_response(void **op __rte_unused, uint8_t *resp __rte_unused)
+qat_comp_process_response(void **op __rte_unused, uint8_t *resp __rte_unused,
+			  uint64_t *dequeue_err_count __rte_unused)
 {
 	return  0;
 }
diff --git a/drivers/common/qat/qat_qp.h b/drivers/common/qat/qat_qp.h
index 6f1525e..9833bcb 100644
--- a/drivers/common/qat/qat_qp.h
+++ b/drivers/common/qat/qat_qp.h
@@ -107,6 +107,7 @@ qat_qps_per_service(const struct qat_qp_hw_data *qp_hw_data,
 
 /* Needed for weak function*/
 int
-qat_comp_process_response(void **op __rte_unused, uint8_t *resp __rte_unused);
+qat_comp_process_response(void **op __rte_unused, uint8_t *resp __rte_unused,
+			  uint64_t *dequeue_err_count);
 
 #endif /* _QAT_QP_H_ */
diff --git a/drivers/compress/qat/qat_comp.c b/drivers/compress/qat/qat_comp.c
index 2754742..342d2f7 100644
--- a/drivers/compress/qat/qat_comp.c
+++ b/drivers/compress/qat/qat_comp.c
@@ -106,7 +106,7 @@ qat_comp_build_request(void *in_op, uint8_t *out_msg,
 }
 
 int
-qat_comp_process_response(void **op, uint8_t *resp)
+qat_comp_process_response(void **op, uint8_t *resp, uint64_t *dequeue_err_count)
 {
 	struct icp_qat_fw_comp_resp *resp_msg =
 			(struct icp_qat_fw_comp_resp *)resp;
@@ -132,6 +132,7 @@ qat_comp_process_response(void **op, uint8_t *resp)
 			rx_op->debug_status = ERR_CODE_QAT_COMP_WRONG_FW;
 			*op = (void *)rx_op;
 			QAT_DP_LOG(ERR, "QAT has wrong firmware");
+			++(*dequeue_err_count);
 			return 0;
 		}
 	}
@@ -149,6 +150,7 @@ qat_comp_process_response(void **op, uint8_t *resp)
 			QAT_DP_LOG(ERR, "QAT intermediate buffer may be too "
 			    "small for output, try configuring a larger size");
 
+		++(*dequeue_err_count);
 		rx_op->status = RTE_COMP_OP_STATUS_ERROR;
 		rx_op->debug_status =
 			*((uint16_t *)(&resp_msg->comn_resp.comn_error));
diff --git a/drivers/compress/qat/qat_comp.h b/drivers/compress/qat/qat_comp.h
index 99a4462..19f48df 100644
--- a/drivers/compress/qat/qat_comp.h
+++ b/drivers/compress/qat/qat_comp.h
@@ -60,8 +60,8 @@ qat_comp_build_request(void *in_op, uint8_t *out_msg, void *op_cookie,
 		       enum qat_device_gen qat_dev_gen __rte_unused);
 
 int
-qat_comp_process_response(void **op, uint8_t *resp);
-
+qat_comp_process_response(void **op, uint8_t *resp,
+			  uint64_t *dequeue_err_count);
 
 int
 qat_comp_private_xform_create(struct rte_compressdev *dev,
-- 
2.7.4

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] compress/qat: fix error counter in dequeue errors
  2018-12-14 12:11 [dpdk-dev] [PATCH] compress/qat: fix error counter in dequeue errors Tomasz Jozwiak
@ 2018-12-14 18:56 ` Trahe, Fiona
  2018-12-18 10:32   ` Akhil Goyal
  0 siblings, 1 reply; 3+ messages in thread
From: Trahe, Fiona @ 2018-12-14 18:56 UTC (permalink / raw)
  To: Jozwiak, TomaszX, dev, akhil.goyal, stable



> -----Original Message-----
> From: Jozwiak, TomaszX
> Sent: Friday, December 14, 2018 5:12 AM
> To: dev@dpdk.org; Trahe, Fiona <fiona.trahe@intel.com>; Jozwiak, TomaszX
> <tomaszx.jozwiak@intel.com>; akhil.goyal@nxp.com; stable@dpdk.org
> Subject: [PATCH] compress/qat: fix error counter in dequeue errors
> 
> This patch increments error counter (stats.dequeue_err_count)
> in case of any error detection during qat_comp_process_response
> function.
> 
> Fixes: 3cc14fc48e35 ("compress/qat: check that correct firmware is in use")
> Fixes: 32842f2a6d7d ("compress/qat: create FW request and process response")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] compress/qat: fix error counter in dequeue errors
  2018-12-14 18:56 ` Trahe, Fiona
@ 2018-12-18 10:32   ` Akhil Goyal
  0 siblings, 0 replies; 3+ messages in thread
From: Akhil Goyal @ 2018-12-18 10:32 UTC (permalink / raw)
  To: Trahe, Fiona, Jozwiak, TomaszX, dev, stable



On 12/15/2018 12:26 AM, Trahe, Fiona wrote:
>
>> -----Original Message-----
>> From: Jozwiak, TomaszX
>> Sent: Friday, December 14, 2018 5:12 AM
>> To: dev@dpdk.org; Trahe, Fiona <fiona.trahe@intel.com>; Jozwiak, TomaszX
>> <tomaszx.jozwiak@intel.com>; akhil.goyal@nxp.com; stable@dpdk.org
>> Subject: [PATCH] compress/qat: fix error counter in dequeue errors
>>
>> This patch increments error counter (stats.dequeue_err_count)
>> in case of any error detection during qat_comp_process_response
>> function.
>>
>> Fixes: 3cc14fc48e35 ("compress/qat: check that correct firmware is in use")
>> Fixes: 32842f2a6d7d ("compress/qat: create FW request and process response")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
> Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Applied to dpdk-next-crypto

Thanks

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-12-18 10:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-14 12:11 [dpdk-dev] [PATCH] compress/qat: fix error counter in dequeue errors Tomasz Jozwiak
2018-12-14 18:56 ` Trahe, Fiona
2018-12-18 10:32   ` Akhil Goyal

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).