From 00502929258e09014c7027e2088c5ae85d04f201 Mon Sep 17 00:00:00 2001 From: Fiona Trahe Date: Wed, 13 Jun 2018 14:14:20 +0200 Subject: [PATCH] crypto/qat: check for service type Other services, apart from symmetric crypto, such as compression, will be added in future patches. Therefore, the assumption that only symmetric crypto operations are processed will not be valid anymore, and service type needs to be checked. Signed-off-by: Tomasz Jozwiak Signed-off-by: Fiona Trahe --- drivers/crypto/qat/qat_qp.c | 6 +++++- drivers/crypto/qat/qat_qp.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/qat/qat_qp.c b/drivers/crypto/qat/qat_qp.c index b190f2cee4..f9d3762d72 100644 --- a/drivers/crypto/qat/qat_qp.c +++ b/drivers/crypto/qat/qat_qp.c @@ -239,6 +239,7 @@ int qat_qp_setup(struct qat_pci_device *qat_dev, qp->qat_dev_gen = qat_dev->qat_dev_gen; qp->build_request = qat_qp_conf->build_request; + qp->service_type = qat_qp_conf->hw->service_type; qp->qat_dev = qat_dev; PMD_DRV_LOG(DEBUG, "QP setup complete: id: %d, cookiepool: %s", @@ -612,7 +613,10 @@ qat_dequeue_op_burst(void *qp, void **ops, uint16_t nb_ops) while (*(uint32_t *)resp_msg != ADF_RING_EMPTY_SIG && resp_counter != nb_ops) { - qat_sym_process_response(ops, resp_msg); + if (tmp_qp->service_type == QAT_SERVICE_SYMMETRIC) + qat_sym_process_response(ops, resp_msg); + /* add qat_asym_process_response here */ + /* add qat_comp_process_response here */ head = adf_modulo(head + rx_queue->msg_size, rx_queue->modulo_mask); diff --git a/drivers/crypto/qat/qat_qp.h b/drivers/crypto/qat/qat_qp.h index 0b3d6d3aa9..59db945e73 100644 --- a/drivers/crypto/qat/qat_qp.h +++ b/drivers/crypto/qat/qat_qp.h @@ -79,6 +79,7 @@ struct qat_qp { uint32_t nb_descriptors; enum qat_device_gen qat_dev_gen; build_request_t build_request; + enum qat_service_type service_type; struct qat_pci_device *qat_dev; /**< qat device this qp is on */ } __rte_cache_aligned; -- 2.20.1