DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Cc: olivier.matz@6wind.com, sergio.gonzalez.monroy@intel.com,
	anatoly.burakov@intel.com, dev@dpdk.org
Subject: [dpdk-dev] [PATCH v4 13/15] cryptodev: rename physical address type to IOVA
Date: Mon,  6 Nov 2017 02:41:39 +0100	[thread overview]
Message-ID: <20171106014141.13266-14-thomas@monjalon.net> (raw)
In-Reply-To: <20171106014141.13266-1-thomas@monjalon.net>

From: Santosh Shukla <santosh.shukla@caviumnetworks.com>

Renamed data type from phys_addr_t to rte_iova_t.

Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 app/test-crypto-perf/cperf_test_common.c  |  2 +-
 app/test-crypto-perf/cperf_test_vectors.h |  4 ++--
 doc/guides/prog_guide/cryptodev_lib.rst   |  6 +++---
 drivers/crypto/dpaa_sec/dpaa_sec.c        | 18 +++++++++---------
 drivers/crypto/qat/qat_adf/qat_algs.h     |  6 +++---
 drivers/crypto/qat/qat_crypto.c           |  2 +-
 drivers/crypto/qat/qat_crypto.h           |  2 +-
 examples/l2fwd-crypto/main.c              |  2 +-
 lib/librte_cryptodev/rte_crypto.h         |  2 +-
 lib/librte_cryptodev/rte_crypto_sym.h     |  6 +++---
 lib/librte_cryptodev/rte_cryptodev.h      |  2 +-
 test/test/test_cryptodev.h                |  2 +-
 12 files changed, 27 insertions(+), 27 deletions(-)

diff --git a/app/test-crypto-perf/cperf_test_common.c b/app/test-crypto-perf/cperf_test_common.c
index 84c5a3d76..a95899a3f 100644
--- a/app/test-crypto-perf/cperf_test_common.c
+++ b/app/test-crypto-perf/cperf_test_common.c
@@ -74,7 +74,7 @@ fill_multi_seg_mbuf(struct rte_mbuf *m, struct rte_mempool *mp,
 	uint16_t mbuf_hdr_size = sizeof(struct rte_mbuf);
 	uint16_t remaining_segments = segments_nb;
 	struct rte_mbuf *next_mbuf;
-	phys_addr_t next_seg_phys_addr = rte_mempool_virt2iova(obj) +
+	rte_iova_t next_seg_phys_addr = rte_mempool_virt2iova(obj) +
 			 mbuf_offset + mbuf_hdr_size;
 
 	do {
diff --git a/app/test-crypto-perf/cperf_test_vectors.h b/app/test-crypto-perf/cperf_test_vectors.h
index 85955703c..cb5d82845 100644
--- a/app/test-crypto-perf/cperf_test_vectors.h
+++ b/app/test-crypto-perf/cperf_test_vectors.h
@@ -78,13 +78,13 @@ struct cperf_test_vector {
 
 	struct {
 		uint8_t *data;
-		phys_addr_t phys_addr;
+		rte_iova_t phys_addr;
 		uint16_t length;
 	} aad;
 
 	struct {
 		uint8_t *data;
-		phys_addr_t phys_addr;
+		rte_iova_t phys_addr;
 		uint16_t length;
 	} digest;
 
diff --git a/doc/guides/prog_guide/cryptodev_lib.rst b/doc/guides/prog_guide/cryptodev_lib.rst
index 75ae085f6..2b338b926 100644
--- a/doc/guides/prog_guide/cryptodev_lib.rst
+++ b/doc/guides/prog_guide/cryptodev_lib.rst
@@ -539,12 +539,12 @@ chain.
 
                 struct {
                     uint8_t *data;
-                    phys_addr_t phys_addr;
+                    rte_iova_t phys_addr;
                 } digest; /**< Digest parameters */
 
                 struct {
                     uint8_t *data;
-                    phys_addr_t phys_addr;
+                    rte_iova_t phys_addr;
                 } aad;
                 /**< Additional authentication parameters */
             } aead;
@@ -566,7 +566,7 @@ chain.
 
                     struct {
                         uint8_t *data;
-                        phys_addr_t phys_addr;
+                        rte_iova_t phys_addr;
                     } digest; /**< Digest parameters */
                 } auth;
             };
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 1d9d03aaa..d1ef241aa 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -110,7 +110,7 @@ dpaa_sec_alloc_ctx(dpaa_sec_session *ses)
 	return ctx;
 }
 
-static inline phys_addr_t
+static inline rte_iova_t
 dpaa_mem_vtop(void *vaddr)
 {
 	const struct rte_memseg *memseg = rte_eal_get_physmem_layout();
@@ -124,14 +124,14 @@ dpaa_mem_vtop(void *vaddr)
 			paddr = memseg[i].phys_addr +
 				(vaddr_64 - memseg[i].addr_64);
 
-			return (phys_addr_t)paddr;
+			return (rte_iova_t)paddr;
 		}
 	}
-	return (phys_addr_t)(NULL);
+	return (rte_iova_t)(NULL);
 }
 
 static inline void *
-dpaa_mem_ptov(phys_addr_t paddr)
+dpaa_mem_ptov(rte_iova_t paddr)
 {
 	const struct rte_memseg *memseg = rte_eal_get_physmem_layout();
 	int i;
@@ -158,7 +158,7 @@ ern_sec_fq_handler(struct qman_portal *qm __rte_unused,
  * all the packets in this queue could be dispatched into caam
  */
 static int
-dpaa_sec_init_rx(struct qman_fq *fq_in, phys_addr_t hwdesc,
+dpaa_sec_init_rx(struct qman_fq *fq_in, rte_iova_t hwdesc,
 		 uint32_t fqid_out)
 {
 	struct qm_mcc_initfq fq_opts;
@@ -566,7 +566,7 @@ build_auth_only(struct rte_crypto_op *op, dpaa_sec_session *ses)
 	struct dpaa_sec_job *cf;
 	struct dpaa_sec_op_ctx *ctx;
 	struct qm_sg_entry *sg;
-	phys_addr_t start_addr;
+	rte_iova_t start_addr;
 	uint8_t *old_digest;
 
 	ctx = dpaa_sec_alloc_ctx(ses);
@@ -626,7 +626,7 @@ build_cipher_only(struct rte_crypto_op *op, dpaa_sec_session *ses)
 	struct dpaa_sec_job *cf;
 	struct dpaa_sec_op_ctx *ctx;
 	struct qm_sg_entry *sg;
-	phys_addr_t src_start_addr, dst_start_addr;
+	rte_iova_t src_start_addr, dst_start_addr;
 	uint8_t *IV_ptr = rte_crypto_op_ctod_offset(op, uint8_t *,
 			ses->iv.offset);
 
@@ -682,7 +682,7 @@ build_cipher_auth_gcm(struct rte_crypto_op *op, dpaa_sec_session *ses)
 	struct dpaa_sec_op_ctx *ctx;
 	struct qm_sg_entry *sg;
 	uint32_t length = 0;
-	phys_addr_t src_start_addr, dst_start_addr;
+	rte_iova_t src_start_addr, dst_start_addr;
 	uint8_t *IV_ptr = rte_crypto_op_ctod_offset(op, uint8_t *,
 			ses->iv.offset);
 
@@ -793,7 +793,7 @@ build_cipher_auth(struct rte_crypto_op *op, dpaa_sec_session *ses)
 	struct dpaa_sec_job *cf;
 	struct dpaa_sec_op_ctx *ctx;
 	struct qm_sg_entry *sg;
-	phys_addr_t src_start_addr, dst_start_addr;
+	rte_iova_t src_start_addr, dst_start_addr;
 	uint32_t length = 0;
 	uint8_t *IV_ptr = rte_crypto_op_ctod_offset(op, uint8_t *,
 			ses->iv.offset);
diff --git a/drivers/crypto/qat/qat_adf/qat_algs.h b/drivers/crypto/qat/qat_adf/qat_algs.h
index 2c8e03c0a..802ba95d1 100644
--- a/drivers/crypto/qat/qat_adf/qat_algs.h
+++ b/drivers/crypto/qat/qat_adf/qat_algs.h
@@ -104,8 +104,8 @@ struct qat_alg_buf_list {
 struct qat_crypto_op_cookie {
 	struct qat_alg_buf_list qat_sgl_list_src;
 	struct qat_alg_buf_list qat_sgl_list_dst;
-	phys_addr_t qat_sgl_src_phys_addr;
-	phys_addr_t qat_sgl_dst_phys_addr;
+	rte_iova_t qat_sgl_src_phys_addr;
+	rte_iova_t qat_sgl_dst_phys_addr;
 };
 
 /* Common content descriptor */
@@ -124,7 +124,7 @@ struct qat_session {
 	void *bpi_ctx;
 	struct qat_alg_cd cd;
 	uint8_t *cd_cur_ptr;
-	phys_addr_t cd_paddr;
+	rte_iova_t cd_paddr;
 	struct icp_qat_fw_la_bulk_req fw_req;
 	uint8_t aad_len;
 	struct qat_crypto_instance *inst;
diff --git a/drivers/crypto/qat/qat_crypto.c b/drivers/crypto/qat/qat_crypto.c
index 60148416b..a572967c4 100644
--- a/drivers/crypto/qat/qat_crypto.c
+++ b/drivers/crypto/qat/qat_crypto.c
@@ -1376,7 +1376,7 @@ qat_write_hw_desc_entry(struct rte_crypto_op *op, uint8_t *out_msg,
 		 * This address may used for setting AAD physical pointer
 		 * into IV offset from op
 		 */
-		phys_addr_t aad_phys_addr_aead = op->sym->aead.aad.phys_addr;
+		rte_iova_t aad_phys_addr_aead = op->sym->aead.aad.phys_addr;
 		if (ctx->qat_hash_alg ==
 				ICP_QAT_HW_AUTH_ALGO_GALOIS_128 ||
 				ctx->qat_hash_alg ==
diff --git a/drivers/crypto/qat/qat_crypto.h b/drivers/crypto/qat/qat_crypto.h
index 0ebb08349..c64d7756c 100644
--- a/drivers/crypto/qat/qat_crypto.h
+++ b/drivers/crypto/qat/qat_crypto.h
@@ -70,7 +70,7 @@ enum qat_device_gen {
 struct qat_queue {
 	char		memz_name[RTE_MEMZONE_NAMESIZE];
 	void		*base_addr;		/* Base address */
-	phys_addr_t	base_phys_addr;		/* Queue physical address */
+	rte_iova_t	base_phys_addr;		/* Queue physical address */
 	uint32_t	head;			/* Shadow copy of the head */
 	uint32_t	tail;			/* Shadow copy of the tail */
 	uint32_t	modulo;
diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index b97367944..8c625edd1 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -140,7 +140,7 @@ enum l2fwd_crypto_xform_chain {
 struct l2fwd_key {
 	uint8_t *data;
 	uint32_t length;
-	phys_addr_t phys_addr;
+	rte_iova_t phys_addr;
 };
 
 struct l2fwd_iv {
diff --git a/lib/librte_cryptodev/rte_crypto.h b/lib/librte_cryptodev/rte_crypto.h
index eeed9ee25..3d672fe7d 100644
--- a/lib/librte_cryptodev/rte_crypto.h
+++ b/lib/librte_cryptodev/rte_crypto.h
@@ -118,7 +118,7 @@ struct rte_crypto_op {
 	struct rte_mempool *mempool;
 	/**< crypto operation mempool which operation is allocated from */
 
-	phys_addr_t phys_addr;
+	rte_iova_t phys_addr;
 	/**< physical address of crypto operation */
 
 	RTE_STD_C11
diff --git a/lib/librte_cryptodev/rte_crypto_sym.h b/lib/librte_cryptodev/rte_crypto_sym.h
index 599206370..c981f0b98 100644
--- a/lib/librte_cryptodev/rte_crypto_sym.h
+++ b/lib/librte_cryptodev/rte_crypto_sym.h
@@ -548,7 +548,7 @@ struct rte_crypto_sym_op {
 				 * For GCM (@ref RTE_CRYPTO_AEAD_AES_GCM), for
 				 * "digest result" read "authentication tag T".
 				 */
-				phys_addr_t phys_addr;
+				rte_iova_t phys_addr;
 				/**< Physical address of digest */
 			} digest; /**< Digest parameters */
 			struct {
@@ -583,7 +583,7 @@ struct rte_crypto_sym_op {
 				 * of the block size (16 bytes).
 				 *
 				 */
-				phys_addr_t phys_addr;	/**< physical address */
+				rte_iova_t phys_addr;	/**< physical address */
 			} aad;
 			/**< Additional authentication parameters */
 		} aead;
@@ -680,7 +680,7 @@ struct rte_crypto_sym_op {
 					 * will overwrite any data at this location.
 					 *
 					 */
-					phys_addr_t phys_addr;
+					rte_iova_t phys_addr;
 					/**< Physical address of digest */
 				} digest; /**< Digest parameters */
 			} auth;
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index a0d3a12ab..a25bff9ba 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -110,7 +110,7 @@ extern const char **rte_cyptodev_names;
  *   to calculate address from.
  */
 #define rte_crypto_op_ctophys_offset(c, o)	\
-	(phys_addr_t)((c)->phys_addr + (o))
+	(rte_iova_t)((c)->phys_addr + (o))
 
 /**
  * Crypto parameters range description
diff --git a/test/test/test_cryptodev.h b/test/test/test_cryptodev.h
index e040b814f..bbdb91394 100644
--- a/test/test/test_cryptodev.h
+++ b/test/test/test_cryptodev.h
@@ -153,7 +153,7 @@ pktmbuf_mtod_offset(struct rte_mbuf *mbuf, int offset) {
 	return rte_pktmbuf_mtod_offset(m, uint8_t *, offset);
 }
 
-static inline phys_addr_t
+static inline rte_iova_t
 pktmbuf_mtophys_offset(struct rte_mbuf *mbuf, int offset) {
 	struct rte_mbuf *m;
 
-- 
2.14.2

  parent reply	other threads:[~2017-11-06  1:42 UTC|newest]

Thread overview: 91+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-14 15:15 [dpdk-dev] [PATCH v1 0/4] make dpdk iova aware Santosh Shukla
2017-08-14 15:15 ` [dpdk-dev] [PATCH v1 1/4] eal: rename phys_addr_t to iova_addr_t Santosh Shukla
2017-09-18 14:06   ` Burakov, Anatoly
2017-09-18 14:31     ` santosh
2017-09-18 14:32     ` Burakov, Anatoly
2017-08-14 15:15 ` [dpdk-dev] [PATCH v1 2/4] eal/memory: rename buf_physaddr to buf_iovaaddr Santosh Shukla
2017-08-14 15:15 ` [dpdk-dev] [PATCH v1 3/4] eal/memory: rename memory translational api to _iova types Santosh Shukla
2017-08-14 15:15 ` [dpdk-dev] [PATCH v1 4/4] doc: remove dpdk iova aware notice Santosh Shukla
2017-09-18 18:44   ` Mcnamara, John
2017-09-05 10:31 ` [dpdk-dev] [PATCH v2 0/5] make dpdk iova aware Santosh Shukla
2017-09-05 10:31   ` [dpdk-dev] [PATCH v2 1/5] eal: rename phys_addr_t to iova_addr_t Santosh Shukla
2017-09-18 15:19     ` Burakov, Anatoly
2017-09-05 10:31   ` [dpdk-dev] [PATCH v2 2/5] eal/memory: rename buf_physaddr to buf_iovaaddr Santosh Shukla
2017-09-18 15:20     ` Burakov, Anatoly
2017-09-05 10:31   ` [dpdk-dev] [PATCH v2 3/5] eal/memory: rename memseg member phys to iova addr Santosh Shukla
2017-09-18 15:04     ` Burakov, Anatoly
2017-09-18 15:08       ` santosh
2017-09-18 15:11         ` Burakov, Anatoly
2017-09-18 15:21     ` Burakov, Anatoly
2017-09-05 10:31   ` [dpdk-dev] [PATCH v2 4/5] eal/memory: rename memory api to iova types Santosh Shukla
2017-09-05 10:31   ` [dpdk-dev] [PATCH v2 5/5] doc: remove dpdk iova aware notice Santosh Shukla
2017-09-19 13:38     ` Mcnamara, John
2017-10-17 13:31   ` [dpdk-dev] [PATCH v2 0/5] make dpdk iova aware Thomas Monjalon
2017-10-17 14:12     ` santosh
2017-10-20 12:31   ` [dpdk-dev] [PATCH v3 0/6] " Santosh Shukla
2017-10-20 12:31     ` [dpdk-dev] [PATCH v3 1/6] eal: rename phys addr to iova addr Santosh Shukla
2017-10-23 20:32       ` Thomas Monjalon
2017-10-24  5:16         ` santosh
2017-10-20 12:31     ` [dpdk-dev] [PATCH v3 2/6] eal/memory: rename buf physaddr to buf iovaaddr Santosh Shukla
2017-10-23 20:15       ` Thomas Monjalon
2017-10-25  9:55         ` Olivier MATZ
2017-10-23 20:34       ` Thomas Monjalon
2017-10-24  5:17         ` santosh
2017-10-25  9:44       ` Olivier MATZ
2017-10-20 12:31     ` [dpdk-dev] [PATCH v3 3/6] eal/memory: rename memseg member phys to iova addr Santosh Shukla
2017-10-20 12:31     ` [dpdk-dev] [PATCH v3 4/6] eal/memory: rename memory API to iova types Santosh Shukla
2017-11-03 11:11       ` Thomas Monjalon
2017-11-03 11:35         ` santosh
2017-11-03 13:58           ` Thomas Monjalon
2017-11-03 15:22             ` [dpdk-dev] [PATCH v3 4/6] eal/memory: rename memory API to iovatypes Jonas Pfefferle1
2017-10-20 12:31     ` [dpdk-dev] [PATCH v3 5/6] doc: remove dpdk iova aware notice Santosh Shukla
2017-10-23 20:29       ` Thomas Monjalon
2017-10-24  5:06         ` santosh
2017-10-25  9:45           ` Thomas Monjalon
2017-10-25  9:50             ` Richardson, Bruce
2017-10-25 10:01               ` Thomas Monjalon
2017-10-25 10:05                 ` Bruce Richardson
2017-10-25 10:12                   ` Thomas Monjalon
2017-10-25 10:32                     ` Bruce Richardson
2017-10-20 12:31     ` [dpdk-dev] [PATCH v3 6/6] eal/common/rte_malloc: use pointer diff in virt2iova Santosh Shukla
2017-10-23 14:58     ` [dpdk-dev] [PATCH v3 0/6] make dpdk iova aware Thomas Monjalon
2017-10-24  5:12       ` santosh
2017-10-24  7:38         ` Thomas Monjalon
2017-11-06  1:41 ` [dpdk-dev] [PATCH v4 00/15] make DPDK IOVA aware Thomas Monjalon
2017-11-06  1:41   ` [dpdk-dev] [PATCH v4 01/15] mem: hide physical address error in VA mode Thomas Monjalon
2017-11-06  5:39     ` santosh
2017-11-06  1:41   ` [dpdk-dev] [PATCH v4 02/15] mem: introduce IOVA type Thomas Monjalon
2017-11-06  5:38     ` santosh
2017-11-06  8:37       ` Thomas Monjalon
2017-11-06  8:51         ` santosh
2017-11-06  9:08           ` Thomas Monjalon
2017-11-06  1:41   ` [dpdk-dev] [PATCH v4 03/15] mem: rename segment address from physical to IOVA Thomas Monjalon
2017-11-06  1:41   ` [dpdk-dev] [PATCH v4 04/15] mem: rename address mapping function " Thomas Monjalon
2017-11-06  5:41     ` santosh
2017-11-06  1:41   ` [dpdk-dev] [PATCH v4 05/15] malloc: " Thomas Monjalon
2017-11-06  5:47     ` santosh
2017-11-06  1:41   ` [dpdk-dev] [PATCH v4 06/15] malloc: use pointer diff macro in IOVA mapping Thomas Monjalon
2017-11-06  1:41   ` [dpdk-dev] [PATCH v4 07/15] memzone: rename address from physical to IOVA Thomas Monjalon
2017-11-06  5:50     ` santosh
2017-11-06  1:41   ` [dpdk-dev] [PATCH v4 08/15] mempool: rename addresses " Thomas Monjalon
2017-11-06  5:52     ` santosh
2017-11-06 15:44     ` Olivier MATZ
2017-11-06  1:41   ` [dpdk-dev] [PATCH v4 09/15] mempool: rename address mapping function " Thomas Monjalon
2017-11-06  5:54     ` santosh
2017-11-06 15:44     ` Olivier MATZ
2017-11-06  1:41   ` [dpdk-dev] [PATCH v4 10/15] mempool: rename populate functions " Thomas Monjalon
2017-11-06 15:49     ` Olivier MATZ
2017-11-06 15:58       ` Thomas Monjalon
2017-11-06 16:39         ` Olivier MATZ
2017-11-06  1:41   ` [dpdk-dev] [PATCH v4 11/15] mbuf: rename physical address " Thomas Monjalon
2017-11-06 15:52     ` Olivier MATZ
2017-11-06 16:00       ` Thomas Monjalon
2017-11-06  1:41   ` [dpdk-dev] [PATCH v4 12/15] mbuf: rename data address helpers " Thomas Monjalon
2017-11-06 15:56     ` Olivier MATZ
2017-11-06 16:03       ` Thomas Monjalon
2017-11-06  1:41   ` Thomas Monjalon [this message]
2017-11-06  1:41   ` [dpdk-dev] [PATCH v4 14/15] drivers/net: rename physical address type " Thomas Monjalon
2017-11-06  1:41   ` [dpdk-dev] [PATCH v4 15/15] doc: add IOVA aware API changes in release notes Thomas Monjalon
2017-11-06  5:56     ` santosh
2017-11-06  8:50     ` Mcnamara, John
2017-11-06 22:48   ` [dpdk-dev] [PATCH v4 00/15] make DPDK IOVA aware Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171106014141.13266-14-thomas@monjalon.net \
    --to=thomas@monjalon.net \
    --cc=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --cc=olivier.matz@6wind.com \
    --cc=santosh.shukla@caviumnetworks.com \
    --cc=sergio.gonzalez.monroy@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).