From 850d2304ee0527856cfebe07404715b7a8bd6c10 Mon Sep 17 00:00:00 2001 From: Fiona Trahe Date: Wed, 13 Jun 2018 14:14:10 +0200 Subject: [PATCH] crypto/qat: rename variables Renamed sgl_cookie to cookie and qp_gen_config to qat_gen_config, as it is intended to hold more than just queue pair data. Signed-off-by: Fiona Trahe Signed-off-by: Tomasz Jozwiak --- drivers/crypto/qat/qat_device.c | 2 +- drivers/crypto/qat/qat_device.h | 2 +- drivers/crypto/qat/qat_sym_pmd.c | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/crypto/qat/qat_device.c b/drivers/crypto/qat/qat_device.c index c9d4b32eda..a0e4149050 100644 --- a/drivers/crypto/qat/qat_device.c +++ b/drivers/crypto/qat/qat_device.c @@ -10,7 +10,7 @@ /* Hardware device information per generation */ __extension__ -struct qat_gen_hw_data qp_gen_config[] = { +struct qat_gen_hw_data qat_gen_config[] = { [QAT_GEN1] = { .dev_gen = QAT_GEN1, .qp_hw_data = qat_gen1_qps, diff --git a/drivers/crypto/qat/qat_device.h b/drivers/crypto/qat/qat_device.h index fd20a01477..4201a1c719 100644 --- a/drivers/crypto/qat/qat_device.h +++ b/drivers/crypto/qat/qat_device.h @@ -62,7 +62,7 @@ struct qat_gen_hw_data { const struct qat_qp_hw_data (*qp_hw_data)[ADF_MAX_QPS_ON_ANY_SERVICE]; }; -extern struct qat_gen_hw_data qp_gen_config[]; +extern struct qat_gen_hw_data qat_gen_config[]; struct qat_pci_device * qat_pci_device_allocate(struct rte_pci_device *pci_dev); diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c index aa71b4641c..e6760b8f84 100644 --- a/drivers/crypto/qat/qat_sym_pmd.c +++ b/drivers/crypto/qat/qat_sym_pmd.c @@ -68,7 +68,7 @@ static void qat_sym_dev_info_get(struct rte_cryptodev *dev, { struct qat_sym_dev_private *internals = dev->data->dev_private; const struct qat_qp_hw_data *sym_hw_qps = - qp_gen_config[internals->qat_dev->qat_dev_gen] + qat_gen_config[internals->qat_dev->qat_dev_gen] .qp_hw_data[QAT_SERVICE_SYMMETRIC]; PMD_INIT_FUNC_TRACE(); @@ -143,7 +143,7 @@ static int qat_sym_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id, (struct qat_qp **)&(dev->data->queue_pairs[qp_id]); struct qat_sym_dev_private *qat_private = dev->data->dev_private; const struct qat_qp_hw_data *sym_hw_qps = - qp_gen_config[qat_private->qat_dev->qat_dev_gen] + qat_gen_config[qat_private->qat_dev->qat_dev_gen] .qp_hw_data[QAT_SERVICE_SYMMETRIC]; const struct qat_qp_hw_data *qp_hw_data = sym_hw_qps + qp_id; @@ -178,16 +178,16 @@ static int qat_sym_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id, for (i = 0; i < qp->nb_descriptors; i++) { - struct qat_sym_op_cookie *sql_cookie = + struct qat_sym_op_cookie *cookie = qp->op_cookies[i]; - sql_cookie->qat_sgl_src_phys_addr = - rte_mempool_virt2iova(sql_cookie) + + cookie->qat_sgl_src_phys_addr = + rte_mempool_virt2iova(cookie) + offsetof(struct qat_sym_op_cookie, qat_sgl_src); - sql_cookie->qat_sgl_dst_phys_addr = - rte_mempool_virt2iova(sql_cookie) + + cookie->qat_sgl_dst_phys_addr = + rte_mempool_virt2iova(cookie) + offsetof(struct qat_sym_op_cookie, qat_sgl_dst); } -- 2.20.1