From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <fiona.trahe@intel.com>
Received: from mga17.intel.com (mga17.intel.com [192.55.52.151])
 by dpdk.org (Postfix) with ESMTP id 757981C32E
 for <dev@dpdk.org>; Fri, 11 May 2018 13:15:44 +0200 (CEST)
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
Received: from orsmga008.jf.intel.com ([10.7.209.65])
 by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 11 May 2018 04:15:44 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.49,388,1520924400"; d="scan'208";a="40443900"
Received: from sivswdev01.ir.intel.com (HELO localhost.localdomain)
 ([10.237.217.45])
 by orsmga008.jf.intel.com with ESMTP; 11 May 2018 04:15:42 -0700
From: Fiona Trahe <fiona.trahe@intel.com>
To: dev@dpdk.org
Cc: pablo.de.lara.guarch@intel.com, fiona.trahe@intel.com,
 tomaszx.jozwiak@intel.com,
 ArkadiuszX Kusztal <arkadiuszx.kusztal@intel.com>
Date: Fri, 11 May 2018 12:13:54 +0100
Message-Id: <1526037249-25545-17-git-send-email-fiona.trahe@intel.com>
X-Mailer: git-send-email 1.7.0.7
In-Reply-To: <1523040732-3290-1-git-send-email-fiona.trahe@intel.com>
References: <1523040732-3290-1-git-send-email-fiona.trahe@intel.com>
Subject: [dpdk-dev] [PATCH v2 16/31] crypto/qat: rename sgl related objects
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Fri, 11 May 2018 11:15:45 -0000

Change SGL (Scatter-Gather List) related structs and member names

Signed-off-by: ArkadiuszX Kusztal <arkadiuszx.kusztal@intel.com>
---
 drivers/crypto/qat/qat_common.h | 10 +++++-----
 drivers/crypto/qat/qat_sym.c    | 28 ++++++++++++++--------------
 2 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/drivers/crypto/qat/qat_common.h b/drivers/crypto/qat/qat_common.h
index c3e7bd9a7..193639550 100644
--- a/drivers/crypto/qat/qat_common.h
+++ b/drivers/crypto/qat/qat_common.h
@@ -32,22 +32,22 @@ enum qat_service_type {
 #define QAT_MAX_SERVICES		(QAT_SERVICE_INVALID)
 
 /**< Common struct for scatter-gather list operations */
-struct qat_alg_buf {
+struct qat_flat_buf {
 	uint32_t len;
 	uint32_t resrvd;
 	uint64_t addr;
 } __rte_packed;
 
-struct qat_alg_buf_list {
+struct qat_sgl {
 	uint64_t resrvd;
 	uint32_t num_bufs;
 	uint32_t num_mapped_bufs;
-	struct qat_alg_buf bufers[QAT_SGL_MAX_NUMBER];
+	struct qat_flat_buf buffers[QAT_SGL_MAX_NUMBER];
 } __rte_packed __rte_cache_aligned;
 
 struct qat_sym_op_cookie {
-	struct qat_alg_buf_list qat_sgl_list_src;
-	struct qat_alg_buf_list qat_sgl_list_dst;
+	struct qat_sgl qat_sgl_src;
+	struct qat_sgl qat_sgl_dst;
 	phys_addr_t qat_sgl_src_phys_addr;
 	phys_addr_t qat_sgl_dst_phys_addr;
 };
diff --git a/drivers/crypto/qat/qat_sym.c b/drivers/crypto/qat/qat_sym.c
index e448dc859..a9beff064 100644
--- a/drivers/crypto/qat/qat_sym.c
+++ b/drivers/crypto/qat/qat_sym.c
@@ -250,20 +250,20 @@ qat_sym_pmd_dequeue_op_burst(void *qp, struct rte_crypto_op **ops,
 
 static inline int
 qat_sgl_fill_array(struct rte_mbuf *buf, uint64_t buff_start,
-		struct qat_alg_buf_list *list, uint32_t data_len)
+		struct qat_sgl *list, uint32_t data_len)
 {
 	int nr = 1;
 
 	uint32_t buf_len = rte_pktmbuf_iova(buf) -
 			buff_start + rte_pktmbuf_data_len(buf);
 
-	list->bufers[0].addr = buff_start;
-	list->bufers[0].resrvd = 0;
-	list->bufers[0].len = buf_len;
+	list->buffers[0].addr = buff_start;
+	list->buffers[0].resrvd = 0;
+	list->buffers[0].len = buf_len;
 
 	if (data_len <= buf_len) {
 		list->num_bufs = nr;
-		list->bufers[0].len = data_len;
+		list->buffers[0].len = data_len;
 		return 0;
 	}
 
@@ -276,15 +276,15 @@ qat_sgl_fill_array(struct rte_mbuf *buf, uint64_t buff_start,
 			return -EINVAL;
 		}
 
-		list->bufers[nr].len = rte_pktmbuf_data_len(buf);
-		list->bufers[nr].resrvd = 0;
-		list->bufers[nr].addr = rte_pktmbuf_iova(buf);
+		list->buffers[nr].len = rte_pktmbuf_data_len(buf);
+		list->buffers[nr].resrvd = 0;
+		list->buffers[nr].addr = rte_pktmbuf_iova(buf);
 
-		buf_len += list->bufers[nr].len;
+		buf_len += list->buffers[nr].len;
 		buf = buf->next;
 
 		if (buf_len > data_len) {
-			list->bufers[nr].len -=
+			list->buffers[nr].len -=
 				buf_len - data_len;
 			buf = NULL;
 		}
@@ -695,7 +695,7 @@ qat_sym_build_request(void *in_op, uint8_t *out_msg,
 		ICP_QAT_FW_COMN_PTR_TYPE_SET(qat_req->comn_hdr.comn_req_flags,
 				QAT_COMN_PTR_TYPE_SGL);
 		ret = qat_sgl_fill_array(op->sym->m_src, src_buf_start,
-				&cookie->qat_sgl_list_src,
+				&cookie->qat_sgl_src,
 				qat_req->comn_mid.src_length);
 		if (ret) {
 			PMD_DRV_LOG(ERR, "QAT PMD Cannot fill sgl array");
@@ -709,7 +709,7 @@ qat_sym_build_request(void *in_op, uint8_t *out_msg,
 		else {
 			ret = qat_sgl_fill_array(op->sym->m_dst,
 					dst_buf_start,
-					&cookie->qat_sgl_list_dst,
+					&cookie->qat_sgl_dst,
 						qat_req->comn_mid.dst_length);
 
 			if (ret) {
@@ -859,12 +859,12 @@ int qat_sym_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 		sql_cookie->qat_sgl_src_phys_addr =
 				rte_mempool_virt2iova(sql_cookie) +
 				offsetof(struct qat_sym_op_cookie,
-				qat_sgl_list_src);
+				qat_sgl_src);
 
 		sql_cookie->qat_sgl_dst_phys_addr =
 				rte_mempool_virt2iova(sql_cookie) +
 				offsetof(struct qat_sym_op_cookie,
-				qat_sgl_list_dst);
+				qat_sgl_dst);
 	}
 
 	return ret;
-- 
2.13.6