From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 9AA401CEF2 for ; Fri, 6 Apr 2018 20:52:42 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Apr 2018 11:52:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,416,1517904000"; d="scan'208";a="189275760" Received: from sivswdev01.ir.intel.com (HELO localhost.localdomain) ([10.237.217.45]) by orsmga004.jf.intel.com with ESMTP; 06 Apr 2018 11:52:40 -0700 From: Fiona Trahe To: dev@dpdk.org, pablo.de.lara.guarch@intel.com Cc: fiona.trahe@intel.com, tomaszx.jozwiak@intel.com Date: Fri, 6 Apr 2018 19:51:59 +0100 Message-Id: <1523040732-3290-18-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 17/30] 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Apr 2018 18:52:43 -0000 Change SGL (Scatter-Gather List) related structs and member names Signed-off-by: ArkadiuszX Kusztal --- 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