From: Adam Dybkowski Date: Wed, 6 May 2020 11:29:43 +0000 (+0200) Subject: common/qat: fix enqueue/dequeue statistics X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=7277e63f5955fa30898cb6cd739f5e72b8c89ace;p=dpdk.git common/qat: fix enqueue/dequeue statistics This patch fixes enqueued and dequeued count statistics that should contain the number of operations enqueued by the end user app instead of the total number of QAT requests - bigger in case of a multiple-request dynamic Huffman compression operation. Fixes: c13cecf60f12 ("compress/qat: support IM buffer too small operation") Signed-off-by: Adam Dybkowski Acked-by: Fiona Trahe --- diff --git a/drivers/common/qat/qat_qp.c b/drivers/common/qat/qat_qp.c index 098b997864..9d7091af34 100644 --- a/drivers/common/qat/qat_qp.c +++ b/drivers/common/qat/qat_qp.c @@ -818,7 +818,7 @@ qat_enqueue_comp_op_burst(void *qp, void **ops, uint16_t nb_ops) kick_tail: queue->tail = tail; tmp_qp->enqueued += total_descriptors_built; - tmp_qp->stats.enqueued_count += total_descriptors_built; + tmp_qp->stats.enqueued_count += nb_ops_sent; txq_write_tail(tmp_qp, queue); return nb_ops_sent; } @@ -880,7 +880,7 @@ qat_dequeue_op_burst(void *qp, void **ops, uint16_t nb_ops) } tmp_qp->dequeued += fw_resp_counter; - tmp_qp->stats.dequeued_count += fw_resp_counter; + tmp_qp->stats.dequeued_count += op_resp_counter; rx_queue->head = head; if (rx_queue->nb_processed_responses > QAT_CSR_HEAD_WRITE_THRESH)