summaryrefslogtreecommitdiff
path: root/drivers/compress
diff options
context:
space:
mode:
authorTomasz Jozwiak <tomaszx.jozwiak@intel.com>2018-12-14 13:11:47 +0100
committerAkhil Goyal <akhil.goyal@nxp.com>2018-12-19 11:19:10 +0100
commitba83e5c0062936dab5c017da574036788c64fb6b (patch)
treebd22f4557a37f3b7500b8f0c3ab5f72e4cb63cae /drivers/compress
parent652b59df06ccf554d4c39ab76f8b85cc003cf9b0 (diff)
downloaddpdk-next-eventdev-ba83e5c0062936dab5c017da574036788c64fb6b.zip
dpdk-next-eventdev-ba83e5c0062936dab5c017da574036788c64fb6b.tar.gz
dpdk-next-eventdev-ba83e5c0062936dab5c017da574036788c64fb6b.tar.xz
compress/qat: fix dequeue error counter
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>
Diffstat (limited to 'drivers/compress')
-rw-r--r--drivers/compress/qat/qat_comp.c4
-rw-r--r--drivers/compress/qat/qat_comp.h4
2 files changed, 5 insertions, 3 deletions
diff --git a/drivers/compress/qat/qat_comp.c b/drivers/compress/qat/qat_comp.c
index 8a6fad0..bb00610 100644
--- a/drivers/compress/qat/qat_comp.c
+++ b/drivers/compress/qat/qat_comp.c
@@ -109,7 +109,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;
@@ -135,6 +135,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;
}
}
@@ -152,6 +153,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,