DPDK patches and discussions
 help / color / Atom feed
* [dpdk-dev] [PATCH 0/4] remove aliases replaced with IOVA
@ 2020-09-14 16:17 Thomas Monjalon
  2020-09-14 16:17 ` [dpdk-dev] [PATCH 1/4] mem: remove physical address aliases Thomas Monjalon
                   ` (4 more replies)
  0 siblings, 5 replies; 23+ messages in thread
From: Thomas Monjalon @ 2020-09-14 16:17 UTC (permalink / raw)
  To: dev; +Cc: mdr, david.marchand

When introducing IOVA semantic, 3 years ago,
some fields, functions and macros mentioning "physical address"
were marked as deprecated and replaced with IOVA aliases.
Some parts of the original "physical address" semantic
have been removed over the years, other parts are still there.

This pathset proposes removing the remaining parts in
memseg, memzone, mempool and mbuf components.
The mbuf field removal was announced, and the rest of those removals
were not announced, except it is marked deprecated for 3 years.


Thomas Monjalon (4):
  mem: remove physical address aliases
  mempool: remove physical address aliases
  mbuf: remove deprecated function and macro aliases
  mbuf: remove physical address alias

 doc/guides/rel_notes/deprecation.rst          |  2 -
 doc/guides/rel_notes/release_20_11.rst        |  3 ++
 .../fpga_5gnr_fec/rte_fpga_5gnr_fec.c         | 16 +++----
 drivers/baseband/fpga_lte_fec/fpga_lte_fec.c  | 16 +++----
 drivers/bus/fslmc/portal/dpaa2_hw_pvt.h       |  2 +-
 drivers/common/cpt/cpt_ucode.h                | 14 +++----
 drivers/common/dpaax/dpaax_iova_table.c       |  2 +-
 drivers/compress/qat/qat_comp.c               |  6 +--
 drivers/compress/qat/qat_comp_pmd.c           |  2 +-
 drivers/crypto/ccp/ccp_crypto.c               | 22 +++++-----
 drivers/crypto/ccp/ccp_dev.c                  |  2 +-
 drivers/crypto/dpaa_sec/dpaa_sec.c            | 42 +++++++++----------
 drivers/crypto/nitrox/nitrox_sym_reqmgr.c     |  6 +--
 .../crypto/octeontx/otx_cryptodev_hw_access.c |  2 +-
 drivers/crypto/virtio/virtio_cryptodev.c      |  6 +--
 drivers/crypto/virtio/virtio_rxtx.c           |  6 +--
 drivers/net/axgbe/axgbe_rxtx.c                |  4 +-
 drivers/net/i40e/i40e_rxtx_vec_avx2.c         | 18 ++++----
 drivers/net/iavf/iavf_rxtx_vec_avx2.c         | 18 ++++----
 drivers/net/ice/base/ice_osdep.h              |  2 +-
 drivers/net/ice/ice_rxtx_vec_avx2.c           | 18 ++++----
 drivers/net/octeontx2/otx2_ethdev_sec_tx.h    |  2 +-
 drivers/net/pfe/base/pfe.h                    |  2 +-
 examples/fips_validation/main.c               |  4 +-
 kernel/linux/kni/kni_net.c                    |  6 +--
 lib/librte_eal/include/rte_memory.h           |  6 +--
 lib/librte_eal/include/rte_memzone.h          |  6 +--
 lib/librte_eal/linux/include/rte_kni_common.h |  2 +-
 lib/librte_kni/rte_kni.c                      | 14 +++----
 lib/librte_mbuf/rte_mbuf.h                    | 21 ----------
 lib/librte_mbuf/rte_mbuf_core.h               |  6 +--
 lib/librte_mempool/rte_mempool.h              | 13 +-----
 32 files changed, 125 insertions(+), 166 deletions(-)

-- 
2.28.0


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [dpdk-dev] [PATCH 1/4] mem: remove physical address aliases
  2020-09-14 16:17 [dpdk-dev] [PATCH 0/4] remove aliases replaced with IOVA Thomas Monjalon
@ 2020-09-14 16:17 ` Thomas Monjalon
  2020-09-15  7:07   ` Andrew Rybchenko
  2020-09-15 11:46   ` Burakov, Anatoly
  2020-09-14 16:17 ` [dpdk-dev] [PATCH 2/4] mempool: " Thomas Monjalon
                   ` (3 subsequent siblings)
  4 siblings, 2 replies; 23+ messages in thread
From: Thomas Monjalon @ 2020-09-14 16:17 UTC (permalink / raw)
  To: dev
  Cc: mdr, david.marchand, Hemant Agrawal, Sachin Saxena, Fiona Trahe,
	Ashish Gupta, Somalapuram Amaranath, Anoob Joseph, Jay Zhou,
	Qiming Yang, Qi Zhang, Gagandeep Singh, Akhil Goyal,
	Anatoly Burakov, Ferruh Yigit

Remove the deprecated unioned fields phys_addr
from the structures rte_memseg and rte_memzone.
They are replaced with the fields iova which are at the same offsets.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 drivers/bus/fslmc/portal/dpaa2_hw_pvt.h           |  2 +-
 drivers/common/dpaax/dpaax_iova_table.c           |  2 +-
 drivers/compress/qat/qat_comp.c                   |  2 +-
 drivers/compress/qat/qat_comp_pmd.c               |  2 +-
 drivers/crypto/ccp/ccp_dev.c                      |  2 +-
 drivers/crypto/octeontx/otx_cryptodev_hw_access.c |  2 +-
 drivers/crypto/virtio/virtio_cryptodev.c          |  6 +++---
 drivers/net/ice/base/ice_osdep.h                  |  2 +-
 drivers/net/pfe/base/pfe.h                        |  2 +-
 lib/librte_eal/include/rte_memory.h               |  6 +-----
 lib/librte_eal/include/rte_memzone.h              |  6 +-----
 lib/librte_kni/rte_kni.c                          | 14 +++++++-------
 12 files changed, 20 insertions(+), 28 deletions(-)

diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
index 35423df12b..2dd53c63ba 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
@@ -368,7 +368,7 @@ static phys_addr_t dpaa2_mem_vtop(uint64_t vaddr)
 
 	memseg = rte_mem_virt2memseg((void *)(uintptr_t)vaddr, NULL);
 	if (memseg)
-		return memseg->phys_addr + RTE_PTR_DIFF(vaddr, memseg->addr);
+		return memseg->iova + RTE_PTR_DIFF(vaddr, memseg->addr);
 	return (size_t)NULL;
 }
 
diff --git a/drivers/common/dpaax/dpaax_iova_table.c b/drivers/common/dpaax/dpaax_iova_table.c
index 5ba8ed1933..91bee65e7b 100644
--- a/drivers/common/dpaax/dpaax_iova_table.c
+++ b/drivers/common/dpaax/dpaax_iova_table.c
@@ -440,7 +440,7 @@ dpaax_memevent_walk_memsegs(const struct rte_memseg_list *msl __rte_unused,
 			    void *arg __rte_unused)
 {
 	DPAAX_DEBUG("Walking for %p (pa=%"PRIu64") and len %zu",
-		    ms->addr, ms->phys_addr, len);
+		    ms->addr, ms->iova, len);
 	dpaax_iova_table_update(rte_mem_virt2phy(ms->addr), ms->addr, len);
 	return 0;
 }
diff --git a/drivers/compress/qat/qat_comp.c b/drivers/compress/qat/qat_comp.c
index 9e1fd2fe91..335fd63b98 100644
--- a/drivers/compress/qat/qat_comp.c
+++ b/drivers/compress/qat/qat_comp.c
@@ -957,7 +957,7 @@ static int qat_comp_create_templates(struct qat_comp_xform *qat_xform,
 				ICP_QAT_FW_SLICE_XLAT);
 
 		comp_req->u1.xlt_pars.inter_buff_ptr =
-				interm_buff_mz->phys_addr;
+				interm_buff_mz->iova;
 	}
 
 #if RTE_LOG_DP_LEVEL >= RTE_LOG_DEBUG
diff --git a/drivers/compress/qat/qat_comp_pmd.c b/drivers/compress/qat/qat_comp_pmd.c
index 311e561685..18ecb34ba7 100644
--- a/drivers/compress/qat/qat_comp_pmd.c
+++ b/drivers/compress/qat/qat_comp_pmd.c
@@ -242,7 +242,7 @@ qat_comp_setup_inter_buffers(struct qat_comp_dev_private *comp_dev,
 	}
 
 	mz_start = (uint8_t *)memzone->addr;
-	mz_start_phys = memzone->phys_addr;
+	mz_start_phys = memzone->iova;
 	QAT_LOG(DEBUG, "Memzone %s: addr = %p, phys = 0x%"PRIx64
 			", size required %d, size created %zu",
 			inter_buff_mz_name, mz_start, mz_start_phys,
diff --git a/drivers/crypto/ccp/ccp_dev.c b/drivers/crypto/ccp/ccp_dev.c
index 7d98b2eb25..664ddc1747 100644
--- a/drivers/crypto/ccp/ccp_dev.c
+++ b/drivers/crypto/ccp/ccp_dev.c
@@ -546,7 +546,7 @@ ccp_add_device(struct ccp_device *dev, int type)
 						  cmd_q->qsize, SOCKET_ID_ANY);
 		cmd_q->qbase_addr = (void *)q_mz->addr;
 		cmd_q->qbase_desc = (void *)q_mz->addr;
-		cmd_q->qbase_phys_addr =  q_mz->phys_addr;
+		cmd_q->qbase_phys_addr =  q_mz->iova;
 
 		cmd_q->qcontrol = 0;
 		/* init control reg to zero */
diff --git a/drivers/crypto/octeontx/otx_cryptodev_hw_access.c b/drivers/crypto/octeontx/otx_cryptodev_hw_access.c
index ce546c2ffe..ee36b0183e 100644
--- a/drivers/crypto/octeontx/otx_cryptodev_hw_access.c
+++ b/drivers/crypto/octeontx/otx_cryptodev_hw_access.c
@@ -556,7 +556,7 @@ otx_cpt_get_resource(const struct rte_cryptodev *dev, uint8_t group,
 	}
 
 	mem = rz->addr;
-	dma_addr = rz->phys_addr;
+	dma_addr = rz->iova;
 	alloc_len = len;
 
 	memset(mem, 0, len);
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index 31a5f1072a..1822f21744 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -411,7 +411,7 @@ virtio_crypto_queue_setup(struct rte_cryptodev *dev,
 	 * and only accepts 32 bit page frame number.
 	 * Check if the allocated physical memory exceeds 16TB.
 	 */
-	if ((mz->phys_addr + vq->vq_ring_size - 1)
+	if ((mz->iova + vq->vq_ring_size - 1)
 				>> (VIRTIO_PCI_QUEUE_ADDR_SHIFT + 32)) {
 		VIRTIO_CRYPTO_INIT_LOG_ERR("vring address shouldn't be "
 					"above 16TB!");
@@ -420,10 +420,10 @@ virtio_crypto_queue_setup(struct rte_cryptodev *dev,
 
 	memset(mz->addr, 0, sizeof(mz->len));
 	vq->mz = mz;
-	vq->vq_ring_mem = mz->phys_addr;
+	vq->vq_ring_mem = mz->iova;
 	vq->vq_ring_virt_mem = mz->addr;
 	VIRTIO_CRYPTO_INIT_LOG_DBG("vq->vq_ring_mem(physical): 0x%"PRIx64,
-					(uint64_t)mz->phys_addr);
+					(uint64_t)mz->iova);
 	VIRTIO_CRYPTO_INIT_LOG_DBG("vq->vq_ring_virt_mem: 0x%"PRIx64,
 					(uint64_t)(uintptr_t)mz->addr);
 
diff --git a/drivers/net/ice/base/ice_osdep.h b/drivers/net/ice/base/ice_osdep.h
index 360e435b8d..9a170b5143 100644
--- a/drivers/net/ice/base/ice_osdep.h
+++ b/drivers/net/ice/base/ice_osdep.h
@@ -258,7 +258,7 @@ ice_alloc_dma_mem(__rte_unused struct ice_hw *hw,
 
 	mem->size = size;
 	mem->va = mz->addr;
-	mem->pa = mz->phys_addr;
+	mem->pa = mz->iova;
 	mem->zone = (const void *)mz;
 	PMD_DRV_LOG(DEBUG, "memzone %s allocated with physical address: "
 		    "%"PRIu64, mz->name, mem->pa);
diff --git a/drivers/net/pfe/base/pfe.h b/drivers/net/pfe/base/pfe.h
index 72741ba4a8..0a88e98c1b 100644
--- a/drivers/net/pfe/base/pfe.h
+++ b/drivers/net/pfe/base/pfe.h
@@ -414,7 +414,7 @@ static inline phys_addr_t pfe_mem_vtop(uint64_t vaddr)
 
 	memseg = rte_mem_virt2memseg((void *)(uintptr_t)vaddr, NULL);
 	if (memseg)
-		return memseg->phys_addr + RTE_PTR_DIFF(vaddr, memseg->addr);
+		return memseg->iova + RTE_PTR_DIFF(vaddr, memseg->addr);
 
 	return (size_t)NULL;
 }
diff --git a/lib/librte_eal/include/rte_memory.h b/lib/librte_eal/include/rte_memory.h
index 65374d53a3..bba9b5300a 100644
--- a/lib/librte_eal/include/rte_memory.h
+++ b/lib/librte_eal/include/rte_memory.h
@@ -43,11 +43,7 @@ extern "C" {
 #define RTE_MEMSEG_FLAG_DO_NOT_FREE (1 << 0)
 /**< Prevent this segment from being freed back to the OS. */
 struct rte_memseg {
-	RTE_STD_C11
-	union {
-		phys_addr_t phys_addr;  /**< deprecated - Start physical address. */
-		rte_iova_t iova;        /**< Start IO address. */
-	};
+	rte_iova_t iova;            /**< Start IO address. */
 	RTE_STD_C11
 	union {
 		void *addr;         /**< Start virtual address. */
diff --git a/lib/librte_eal/include/rte_memzone.h b/lib/librte_eal/include/rte_memzone.h
index 091c9522f7..5db1210831 100644
--- a/lib/librte_eal/include/rte_memzone.h
+++ b/lib/librte_eal/include/rte_memzone.h
@@ -51,11 +51,7 @@ struct rte_memzone {
 #define RTE_MEMZONE_NAMESIZE 32       /**< Maximum length of memory zone name.*/
 	char name[RTE_MEMZONE_NAMESIZE];  /**< Name of the memory zone. */
 
-	RTE_STD_C11
-	union {
-		phys_addr_t phys_addr;        /**< deprecated - Start physical address. */
-		rte_iova_t iova;              /**< Start IO address. */
-	};
+	rte_iova_t iova;                  /**< Start IO address. */
 	RTE_STD_C11
 	union {
 		void *addr;                   /**< Start virtual address. */
diff --git a/lib/librte_kni/rte_kni.c b/lib/librte_kni/rte_kni.c
index bcf82cc2d5..837d0217d2 100644
--- a/lib/librte_kni/rte_kni.c
+++ b/lib/librte_kni/rte_kni.c
@@ -276,37 +276,37 @@ rte_kni_alloc(struct rte_mempool *pktmbuf_pool,
 	/* TX RING */
 	kni->tx_q = kni->m_tx_q->addr;
 	kni_fifo_init(kni->tx_q, KNI_FIFO_COUNT_MAX);
-	dev_info.tx_phys = kni->m_tx_q->phys_addr;
+	dev_info.tx_phys = kni->m_tx_q->iova;
 
 	/* RX RING */
 	kni->rx_q = kni->m_rx_q->addr;
 	kni_fifo_init(kni->rx_q, KNI_FIFO_COUNT_MAX);
-	dev_info.rx_phys = kni->m_rx_q->phys_addr;
+	dev_info.rx_phys = kni->m_rx_q->iova;
 
 	/* ALLOC RING */
 	kni->alloc_q = kni->m_alloc_q->addr;
 	kni_fifo_init(kni->alloc_q, KNI_FIFO_COUNT_MAX);
-	dev_info.alloc_phys = kni->m_alloc_q->phys_addr;
+	dev_info.alloc_phys = kni->m_alloc_q->iova;
 
 	/* FREE RING */
 	kni->free_q = kni->m_free_q->addr;
 	kni_fifo_init(kni->free_q, KNI_FIFO_COUNT_MAX);
-	dev_info.free_phys = kni->m_free_q->phys_addr;
+	dev_info.free_phys = kni->m_free_q->iova;
 
 	/* Request RING */
 	kni->req_q = kni->m_req_q->addr;
 	kni_fifo_init(kni->req_q, KNI_FIFO_COUNT_MAX);
-	dev_info.req_phys = kni->m_req_q->phys_addr;
+	dev_info.req_phys = kni->m_req_q->iova;
 
 	/* Response RING */
 	kni->resp_q = kni->m_resp_q->addr;
 	kni_fifo_init(kni->resp_q, KNI_FIFO_COUNT_MAX);
-	dev_info.resp_phys = kni->m_resp_q->phys_addr;
+	dev_info.resp_phys = kni->m_resp_q->iova;
 
 	/* Req/Resp sync mem area */
 	kni->sync_addr = kni->m_sync_addr->addr;
 	dev_info.sync_va = kni->m_sync_addr->addr;
-	dev_info.sync_phys = kni->m_sync_addr->phys_addr;
+	dev_info.sync_phys = kni->m_sync_addr->iova;
 
 	kni->pktmbuf_pool = pktmbuf_pool;
 	kni->group_id = conf->group_id;
-- 
2.28.0


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [dpdk-dev] [PATCH 2/4] mempool: remove physical address aliases
  2020-09-14 16:17 [dpdk-dev] [PATCH 0/4] remove aliases replaced with IOVA Thomas Monjalon
  2020-09-14 16:17 ` [dpdk-dev] [PATCH 1/4] mem: remove physical address aliases Thomas Monjalon
@ 2020-09-14 16:17 ` " Thomas Monjalon
  2020-09-15  7:08   ` Andrew Rybchenko
  2020-09-14 16:17 ` [dpdk-dev] [PATCH 3/4] mbuf: remove deprecated function and macro aliases Thomas Monjalon
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 23+ messages in thread
From: Thomas Monjalon @ 2020-09-14 16:17 UTC (permalink / raw)
  To: dev; +Cc: mdr, david.marchand, Olivier Matz, Andrew Rybchenko

Remove the deprecated unioned fields physaddr and phys_addr
from the structures rte_mempool_objhdr and rte_mempool_memhdr.
They are replaced with the fields iova which are at the same offsets.

Remove the deprecated macro MEMPOOL_F_NO_PHYS_CONTIG
which is an alias of the more recent MEMPOOL_F_NO_IOVA_CONTIG.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 lib/librte_mempool/rte_mempool.h | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h
index 6ad7e31170..9ea7ff934c 100644
--- a/lib/librte_mempool/rte_mempool.h
+++ b/lib/librte_mempool/rte_mempool.h
@@ -138,11 +138,7 @@ struct rte_mempool_objsz {
 struct rte_mempool_objhdr {
 	STAILQ_ENTRY(rte_mempool_objhdr) next; /**< Next in list. */
 	struct rte_mempool *mp;          /**< The mempool owning the object. */
-	RTE_STD_C11
-	union {
-		rte_iova_t iova;         /**< IO address of the object. */
-		phys_addr_t physaddr;    /**< deprecated - Physical address of the object. */
-	};
+	rte_iova_t iova;                 /**< IO address of the object. */
 #ifdef RTE_LIBRTE_MEMPOOL_DEBUG
 	uint64_t cookie;                 /**< Debug cookie. */
 #endif
@@ -188,11 +184,7 @@ struct rte_mempool_memhdr {
 	STAILQ_ENTRY(rte_mempool_memhdr) next; /**< Next in list. */
 	struct rte_mempool *mp;  /**< The mempool owning the chunk */
 	void *addr;              /**< Virtual address of the chunk */
-	RTE_STD_C11
-	union {
-		rte_iova_t iova;       /**< IO address of the chunk */
-		phys_addr_t phys_addr; /**< Physical address of the chunk */
-	};
+	rte_iova_t iova;         /**< IO address of the chunk */
 	size_t len;              /**< length of the chunk */
 	rte_mempool_memchunk_free_cb_t *free_cb; /**< Free callback */
 	void *opaque;            /**< Argument passed to the free callback */
@@ -269,7 +261,6 @@ struct rte_mempool {
 #define MEMPOOL_F_SC_GET         0x0008 /**< Default get is "single-consumer".*/
 #define MEMPOOL_F_POOL_CREATED   0x0010 /**< Internal: pool is created. */
 #define MEMPOOL_F_NO_IOVA_CONTIG 0x0020 /**< Don't need IOVA contiguous objs. */
-#define MEMPOOL_F_NO_PHYS_CONTIG MEMPOOL_F_NO_IOVA_CONTIG /* deprecated */
 
 /**
  * @internal When debug is enabled, store some statistics.
-- 
2.28.0


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [dpdk-dev] [PATCH 3/4] mbuf: remove deprecated function and macro aliases
  2020-09-14 16:17 [dpdk-dev] [PATCH 0/4] remove aliases replaced with IOVA Thomas Monjalon
  2020-09-14 16:17 ` [dpdk-dev] [PATCH 1/4] mem: remove physical address aliases Thomas Monjalon
  2020-09-14 16:17 ` [dpdk-dev] [PATCH 2/4] mempool: " Thomas Monjalon
@ 2020-09-14 16:17 ` Thomas Monjalon
  2020-09-15  7:09   ` Andrew Rybchenko
  2020-09-14 16:18 ` [dpdk-dev] [PATCH 4/4] mbuf: remove physical address alias Thomas Monjalon
  2020-09-17 10:41 ` [dpdk-dev] [PATCH v2 0/4] remove aliases replaced with IOVA Thomas Monjalon
  4 siblings, 1 reply; 23+ messages in thread
From: Thomas Monjalon @ 2020-09-14 16:17 UTC (permalink / raw)
  To: dev
  Cc: mdr, david.marchand, Nicolas Chautru, Anoob Joseph, Fiona Trahe,
	Ashish Gupta, Somalapuram Amaranath, Akhil Goyal, Hemant Agrawal,
	Nagadheeraj Rottela, Srikanth Jampala, Jay Zhou, Jerin Jacob,
	Nithin Dabilpuram, Kiran Kumar K, Marko Kovacevic, Ori Kam,
	Bruce Richardson, Radu Nicolau, Tomasz Kantecki,
	Sunil Kumar Kori, Pavan Nikhilesh, Olivier Matz

Remove the deprecated functions
	- rte_mbuf_data_dma_addr
	- rte_mbuf_data_dma_addr_default
which aliased the more recent functions
	- rte_mbuf_data_iova
	- rte_mbuf_data_iova_default

Remove the deprecated macros
	- rte_pktmbuf_mtophys
	- rte_pktmbuf_mtophys_offset
which aliased the more recent macros
	- rte_pktmbuf_iova
	- rte_pktmbuf_iova_offset

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 .../fpga_5gnr_fec/rte_fpga_5gnr_fec.c         | 16 +++----
 drivers/baseband/fpga_lte_fec/fpga_lte_fec.c  | 16 +++----
 drivers/common/cpt/cpt_ucode.h                | 12 +++---
 drivers/compress/qat/qat_comp.c               |  4 +-
 drivers/crypto/ccp/ccp_crypto.c               | 22 +++++-----
 drivers/crypto/dpaa_sec/dpaa_sec.c            | 42 +++++++++----------
 drivers/crypto/nitrox/nitrox_sym_reqmgr.c     |  6 +--
 drivers/crypto/virtio/virtio_rxtx.c           |  6 +--
 drivers/net/axgbe/axgbe_rxtx.c                |  4 +-
 drivers/net/octeontx2/otx2_ethdev_sec_tx.h    |  2 +-
 examples/fips_validation/main.c               |  4 +-
 lib/librte_mbuf/rte_mbuf.h                    | 21 ----------
 12 files changed, 67 insertions(+), 88 deletions(-)

diff --git a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
index 930718cd47..61f9c04ba2 100644
--- a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
+++ b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
@@ -950,14 +950,14 @@ fpga_dma_desc_te_fill(struct rte_bbdev_enc_op *op,
 	desc->num_null = op->ldpc_enc.n_filler;
 	/* Set inbound data buffer address */
 	desc->in_addr_hi = (uint32_t)(
-			rte_pktmbuf_mtophys_offset(input, in_offset) >> 32);
+			rte_pktmbuf_iova_offset(input, in_offset) >> 32);
 	desc->in_addr_lw = (uint32_t)(
-			rte_pktmbuf_mtophys_offset(input, in_offset));
+			rte_pktmbuf_iova_offset(input, in_offset));
 
 	desc->out_addr_hi = (uint32_t)(
-			rte_pktmbuf_mtophys_offset(output, out_offset) >> 32);
+			rte_pktmbuf_iova_offset(output, out_offset) >> 32);
 	desc->out_addr_lw = (uint32_t)(
-			rte_pktmbuf_mtophys_offset(output, out_offset));
+			rte_pktmbuf_iova_offset(output, out_offset));
 	/* Save software context needed for dequeue */
 	desc->op_addr = op;
 	/* Set total number of CBs in an op */
@@ -998,9 +998,9 @@ fpga_dma_desc_ld_fill(struct rte_bbdev_dec_op *op,
 	desc->error = 0;
 	/* Set inbound data buffer address */
 	desc->in_addr_hi = (uint32_t)(
-			rte_pktmbuf_mtophys_offset(input, in_offset) >> 32);
+			rte_pktmbuf_iova_offset(input, in_offset) >> 32);
 	desc->in_addr_lw = (uint32_t)(
-			rte_pktmbuf_mtophys_offset(input, in_offset));
+			rte_pktmbuf_iova_offset(input, in_offset));
 	desc->rm_e = op->ldpc_dec.cb_params.e;
 	desc->harq_input_length = harq_in_length;
 	desc->et_dis = !check_bit(op->ldpc_dec.op_flags,
@@ -1021,9 +1021,9 @@ fpga_dma_desc_ld_fill(struct rte_bbdev_dec_op *op,
 	desc->max_iter = op->ldpc_dec.iter_max;
 	desc->qm_idx = op->ldpc_dec.q_m / 2;
 	desc->out_addr_hi = (uint32_t)(
-			rte_pktmbuf_mtophys_offset(output, out_offset) >> 32);
+			rte_pktmbuf_iova_offset(output, out_offset) >> 32);
 	desc->out_addr_lw = (uint32_t)(
-			rte_pktmbuf_mtophys_offset(output, out_offset));
+			rte_pktmbuf_iova_offset(output, out_offset));
 	/* Save software context needed for dequeue */
 	desc->op_addr = op;
 	/* Set total number of CBs in an op */
diff --git a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
index 6be9131e72..37018b9c7f 100644
--- a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
+++ b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
@@ -1251,14 +1251,14 @@ fpga_dma_desc_te_fill(struct rte_bbdev_enc_op *op,
 	desc->offset = desc_offset;
 	/* Set inbound data buffer address */
 	desc->in_addr_hi = (uint32_t)(
-			rte_pktmbuf_mtophys_offset(input, in_offset) >> 32);
+			rte_pktmbuf_iova_offset(input, in_offset) >> 32);
 	desc->in_addr_lw = (uint32_t)(
-			rte_pktmbuf_mtophys_offset(input, in_offset));
+			rte_pktmbuf_iova_offset(input, in_offset));
 
 	desc->out_addr_hi = (uint32_t)(
-			rte_pktmbuf_mtophys_offset(output, out_offset) >> 32);
+			rte_pktmbuf_iova_offset(output, out_offset) >> 32);
 	desc->out_addr_lw = (uint32_t)(
-			rte_pktmbuf_mtophys_offset(output, out_offset));
+			rte_pktmbuf_iova_offset(output, out_offset));
 
 	/* Save software context needed for dequeue */
 	desc->op_addr = op;
@@ -1302,9 +1302,9 @@ fpga_dma_desc_td_fill(struct rte_bbdev_dec_op *op,
 	desc->done = 0;
 	/* Set inbound data buffer address */
 	desc->in_addr_hi = (uint32_t)(
-			rte_pktmbuf_mtophys_offset(input, in_offset) >> 32);
+			rte_pktmbuf_iova_offset(input, in_offset) >> 32);
 	desc->in_addr_lw = (uint32_t)(
-			rte_pktmbuf_mtophys_offset(input, in_offset));
+			rte_pktmbuf_iova_offset(input, in_offset));
 	desc->in_len = in_length;
 	desc->k = k;
 	desc->crc_type = !check_bit(op->turbo_dec.op_flags,
@@ -1316,9 +1316,9 @@ fpga_dma_desc_td_fill(struct rte_bbdev_dec_op *op,
 	desc->max_iter = op->turbo_dec.iter_max * 2;
 	desc->offset = desc_offset;
 	desc->out_addr_hi = (uint32_t)(
-			rte_pktmbuf_mtophys_offset(output, out_offset) >> 32);
+			rte_pktmbuf_iova_offset(output, out_offset) >> 32);
 	desc->out_addr_lw = (uint32_t)(
-			rte_pktmbuf_mtophys_offset(output, out_offset));
+			rte_pktmbuf_iova_offset(output, out_offset));
 
 	/* Save software context needed for dequeue */
 	desc->op_addr = op;
diff --git a/drivers/common/cpt/cpt_ucode.h b/drivers/common/cpt/cpt_ucode.h
index 44067cf1b1..4e79fbf7a5 100644
--- a/drivers/common/cpt/cpt_ucode.h
+++ b/drivers/common/cpt/cpt_ucode.h
@@ -2918,7 +2918,7 @@ prepare_iov_from_pkt(struct rte_mbuf *pkt,
 
 	if (!start_offset) {
 		seg_data = rte_pktmbuf_mtod(pkt, void *);
-		seg_phys = rte_pktmbuf_mtophys(pkt);
+		seg_phys = rte_pktmbuf_iova(pkt);
 		seg_size = pkt->data_len;
 	} else {
 		while (start_offset >= pkt->data_len) {
@@ -2927,7 +2927,7 @@ prepare_iov_from_pkt(struct rte_mbuf *pkt,
 		}
 
 		seg_data = rte_pktmbuf_mtod_offset(pkt, void *, start_offset);
-		seg_phys = rte_pktmbuf_mtophys_offset(pkt, start_offset);
+		seg_phys = rte_pktmbuf_iova_offset(pkt, start_offset);
 		seg_size = pkt->data_len - start_offset;
 		if (!seg_size)
 			return 1;
@@ -2942,7 +2942,7 @@ prepare_iov_from_pkt(struct rte_mbuf *pkt,
 
 	while (unlikely(pkt != NULL)) {
 		seg_data = rte_pktmbuf_mtod(pkt, void *);
-		seg_phys = rte_pktmbuf_mtophys(pkt);
+		seg_phys = rte_pktmbuf_iova(pkt);
 		seg_size = pkt->data_len;
 		if (!seg_size)
 			break;
@@ -2972,7 +2972,7 @@ prepare_iov_from_pkt_inplace(struct rte_mbuf *pkt,
 	iov_ptr_t *iovec;
 
 	seg_data = rte_pktmbuf_mtod(pkt, void *);
-	seg_phys = rte_pktmbuf_mtophys(pkt);
+	seg_phys = rte_pktmbuf_iova(pkt);
 	seg_size = pkt->data_len;
 
 	/* first seg */
@@ -3001,7 +3001,7 @@ prepare_iov_from_pkt_inplace(struct rte_mbuf *pkt,
 
 	while (unlikely(pkt != NULL)) {
 		seg_data = rte_pktmbuf_mtod(pkt, void *);
-		seg_phys = rte_pktmbuf_mtophys(pkt);
+		seg_phys = rte_pktmbuf_iova(pkt);
 		seg_size = pkt->data_len;
 
 		if (!seg_size)
@@ -3463,7 +3463,7 @@ fill_digest_params(struct rte_crypto_op *cop,
 			params.mac_buf.vaddr =
 				rte_pktmbuf_mtod_offset(m_dst, void *, off);
 			params.mac_buf.dma_addr =
-				rte_pktmbuf_mtophys_offset(m_dst, off);
+				rte_pktmbuf_iova_offset(m_dst, off);
 			params.mac_buf.size = mac_len;
 		}
 	} else {
diff --git a/drivers/compress/qat/qat_comp.c b/drivers/compress/qat/qat_comp.c
index 335fd63b98..3a064ec3b2 100644
--- a/drivers/compress/qat/qat_comp.c
+++ b/drivers/compress/qat/qat_comp.c
@@ -305,9 +305,9 @@ qat_comp_build_request(void *in_op, uint8_t *out_msg,
 				comp_req->comp_pars.out_buffer_sz;
 
 		comp_req->comn_mid.src_data_addr =
-		    rte_pktmbuf_mtophys_offset(op->m_src, op->src.offset);
+		    rte_pktmbuf_iova_offset(op->m_src, op->src.offset);
 		comp_req->comn_mid.dest_data_addr =
-		    rte_pktmbuf_mtophys_offset(op->m_dst, op->dst.offset);
+		    rte_pktmbuf_iova_offset(op->m_dst, op->dst.offset);
 	}
 
 	if (unlikely(rte_pktmbuf_pkt_len(op->m_dst) < QAT_MIN_OUT_BUF_SIZE)) {
diff --git a/drivers/crypto/ccp/ccp_crypto.c b/drivers/crypto/ccp/ccp_crypto.c
index 4256734d16..db3fb6eff8 100644
--- a/drivers/crypto/ccp/ccp_crypto.c
+++ b/drivers/crypto/ccp/ccp_crypto.c
@@ -1571,7 +1571,7 @@ ccp_perform_hmac(struct rte_crypto_op *op,
 					 ccp_cryptodev_driver_id);
 	addr = session->auth.pre_compute;
 
-	src_addr = rte_pktmbuf_mtophys_offset(op->sym->m_src,
+	src_addr = rte_pktmbuf_iova_offset(op->sym->m_src,
 					      op->sym->auth.data.offset);
 	append_ptr = (void *)rte_pktmbuf_append(op->sym->m_src,
 						session->auth.ctx_len);
@@ -1743,7 +1743,7 @@ ccp_perform_sha(struct rte_crypto_op *op,
 					 op->sym->session,
 					ccp_cryptodev_driver_id);
 
-	src_addr = rte_pktmbuf_mtophys_offset(op->sym->m_src,
+	src_addr = rte_pktmbuf_iova_offset(op->sym->m_src,
 					      op->sym->auth.data.offset);
 
 	append_ptr = (void *)rte_pktmbuf_append(op->sym->m_src,
@@ -1832,7 +1832,7 @@ ccp_perform_sha3_hmac(struct rte_crypto_op *op,
 					 op->sym->session,
 					ccp_cryptodev_driver_id);
 
-	src_addr = rte_pktmbuf_mtophys_offset(op->sym->m_src,
+	src_addr = rte_pktmbuf_iova_offset(op->sym->m_src,
 					      op->sym->auth.data.offset);
 	append_ptr = (uint8_t *)rte_pktmbuf_append(op->sym->m_src,
 						session->auth.ctx_len);
@@ -1972,7 +1972,7 @@ ccp_perform_sha3(struct rte_crypto_op *op,
 					 op->sym->session,
 					ccp_cryptodev_driver_id);
 
-	src_addr = rte_pktmbuf_mtophys_offset(op->sym->m_src,
+	src_addr = rte_pktmbuf_iova_offset(op->sym->m_src,
 					      op->sym->auth.data.offset);
 	append_ptr = (uint8_t *)rte_pktmbuf_append(op->sym->m_src,
 						session->auth.ctx_len);
@@ -2041,7 +2041,7 @@ ccp_perform_aes_cmac(struct rte_crypto_op *op,
 					ccp_cryptodev_driver_id);
 	key_addr = rte_mem_virt2phy(session->auth.key_ccp);
 
-	src_addr = rte_pktmbuf_mtophys_offset(op->sym->m_src,
+	src_addr = rte_pktmbuf_iova_offset(op->sym->m_src,
 					      op->sym->auth.data.offset);
 	append_ptr = (uint8_t *)rte_pktmbuf_append(op->sym->m_src,
 						session->auth.ctx_len);
@@ -2221,10 +2221,10 @@ ccp_perform_aes(struct rte_crypto_op *op,
 
 	desc = &cmd_q->qbase_desc[cmd_q->qidx];
 
-	src_addr = rte_pktmbuf_mtophys_offset(op->sym->m_src,
+	src_addr = rte_pktmbuf_iova_offset(op->sym->m_src,
 					      op->sym->cipher.data.offset);
 	if (likely(op->sym->m_dst != NULL))
-		dest_addr = rte_pktmbuf_mtophys_offset(op->sym->m_dst,
+		dest_addr = rte_pktmbuf_iova_offset(op->sym->m_dst,
 						op->sym->cipher.data.offset);
 	else
 		dest_addr = src_addr;
@@ -2303,11 +2303,11 @@ ccp_perform_3des(struct rte_crypto_op *op,
 		return -ENOTSUP;
 	}
 
-	src_addr = rte_pktmbuf_mtophys_offset(op->sym->m_src,
+	src_addr = rte_pktmbuf_iova_offset(op->sym->m_src,
 					      op->sym->cipher.data.offset);
 	if (unlikely(op->sym->m_dst != NULL))
 		dest_addr =
-			rte_pktmbuf_mtophys_offset(op->sym->m_dst,
+			rte_pktmbuf_iova_offset(op->sym->m_dst,
 						   op->sym->cipher.data.offset);
 	else
 		dest_addr = src_addr;
@@ -2385,10 +2385,10 @@ ccp_perform_aes_gcm(struct rte_crypto_op *op, struct ccp_queue *cmd_q)
 	iv = rte_crypto_op_ctod_offset(op, uint8_t *, session->iv.offset);
 	key_addr = session->cipher.key_phys;
 
-	src_addr = rte_pktmbuf_mtophys_offset(op->sym->m_src,
+	src_addr = rte_pktmbuf_iova_offset(op->sym->m_src,
 					      op->sym->aead.data.offset);
 	if (unlikely(op->sym->m_dst != NULL))
-		dest_addr = rte_pktmbuf_mtophys_offset(op->sym->m_dst,
+		dest_addr = rte_pktmbuf_iova_offset(op->sym->m_dst,
 						op->sym->aead.data.offset);
 	else
 		dest_addr = src_addr;
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index c4339336de..97002170b0 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -748,7 +748,7 @@ build_auth_only_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
 		sg++;
 	}
 
-	qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
+	qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
 	sg->offset = data_offset;
 
 	if (data_len <= (mbuf->data_len - data_offset)) {
@@ -761,7 +761,7 @@ build_auth_only_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
 		       (mbuf = mbuf->next)) {
 			cpu_to_hw_sg(sg);
 			sg++;
-			qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
+			qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
 			if (data_len > mbuf->data_len)
 				sg->length = mbuf->data_len;
 			else
@@ -866,7 +866,7 @@ build_auth_only(struct rte_crypto_op *op, dpaa_sec_session *ses)
 		sg++;
 	}
 
-	qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
+	qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
 	sg->offset = data_offset;
 	sg->length = data_len;
 
@@ -946,7 +946,7 @@ build_cipher_only_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
 
 	/* 1st seg */
 	sg = &cf->sg[2];
-	qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
+	qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
 	sg->length = mbuf->data_len - data_offset;
 	sg->offset = data_offset;
 
@@ -955,7 +955,7 @@ build_cipher_only_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
 	while (mbuf) {
 		cpu_to_hw_sg(sg);
 		sg++;
-		qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
+		qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
 		sg->length = mbuf->data_len;
 		mbuf = mbuf->next;
 	}
@@ -980,7 +980,7 @@ build_cipher_only_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
 
 	/* 1st seg */
 	sg++;
-	qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
+	qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
 	sg->length = mbuf->data_len - data_offset;
 	sg->offset = data_offset;
 
@@ -989,7 +989,7 @@ build_cipher_only_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
 	while (mbuf) {
 		cpu_to_hw_sg(sg);
 		sg++;
-		qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
+		qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
 		sg->length = mbuf->data_len;
 		mbuf = mbuf->next;
 	}
@@ -1121,7 +1121,7 @@ build_cipher_auth_gcm_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
 	cpu_to_hw_sg(out_sg);
 
 	/* 1st seg */
-	qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
+	qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
 	sg->length = mbuf->data_len - sym->aead.data.offset;
 	sg->offset = sym->aead.data.offset;
 
@@ -1130,7 +1130,7 @@ build_cipher_auth_gcm_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
 	while (mbuf) {
 		cpu_to_hw_sg(sg);
 		sg++;
-		qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
+		qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
 		sg->length = mbuf->data_len;
 		mbuf = mbuf->next;
 	}
@@ -1178,7 +1178,7 @@ build_cipher_auth_gcm_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
 
 	/* 3rd seg */
 	sg++;
-	qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
+	qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
 	sg->length = mbuf->data_len - sym->aead.data.offset;
 	sg->offset = sym->aead.data.offset;
 
@@ -1187,7 +1187,7 @@ build_cipher_auth_gcm_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
 	while (mbuf) {
 		cpu_to_hw_sg(sg);
 		sg++;
-		qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
+		qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
 		sg->length = mbuf->data_len;
 		mbuf = mbuf->next;
 	}
@@ -1367,7 +1367,7 @@ build_cipher_auth_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
 	cpu_to_hw_sg(out_sg);
 
 	/* 1st seg */
-	qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
+	qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
 	sg->length = mbuf->data_len - sym->auth.data.offset;
 	sg->offset = sym->auth.data.offset;
 
@@ -1376,7 +1376,7 @@ build_cipher_auth_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
 	while (mbuf) {
 		cpu_to_hw_sg(sg);
 		sg++;
-		qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
+		qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
 		sg->length = mbuf->data_len;
 		mbuf = mbuf->next;
 	}
@@ -1415,7 +1415,7 @@ build_cipher_auth_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
 
 	/* 2nd seg */
 	sg++;
-	qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
+	qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
 	sg->length = mbuf->data_len - sym->auth.data.offset;
 	sg->offset = sym->auth.data.offset;
 
@@ -1424,7 +1424,7 @@ build_cipher_auth_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
 	while (mbuf) {
 		cpu_to_hw_sg(sg);
 		sg++;
-		qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
+		qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
 		sg->length = mbuf->data_len;
 		mbuf = mbuf->next;
 	}
@@ -1555,10 +1555,10 @@ build_proto(struct rte_crypto_op *op, dpaa_sec_session *ses)
 	cf = &ctx->job;
 	ctx->op = op;
 
-	src_start_addr = rte_pktmbuf_mtophys(sym->m_src);
+	src_start_addr = rte_pktmbuf_iova(sym->m_src);
 
 	if (sym->m_dst)
-		dst_start_addr = rte_pktmbuf_mtophys(sym->m_dst);
+		dst_start_addr = rte_pktmbuf_iova(sym->m_dst);
 	else
 		dst_start_addr = src_start_addr;
 
@@ -1614,7 +1614,7 @@ build_proto_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
 
 	/* 1st seg */
 	sg = &cf->sg[2];
-	qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
+	qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
 	sg->offset = 0;
 
 	/* Successive segs */
@@ -1624,7 +1624,7 @@ build_proto_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
 		mbuf = mbuf->next;
 		cpu_to_hw_sg(sg);
 		sg++;
-		qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
+		qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
 		sg->offset = 0;
 	}
 	sg->length = mbuf->buf_len - mbuf->data_off;
@@ -1646,7 +1646,7 @@ build_proto_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
 	qm_sg_entry_set64(in_sg, rte_dpaa_mem_vtop(sg));
 
 	/* 1st seg */
-	qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
+	qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
 	sg->length = mbuf->data_len;
 	sg->offset = 0;
 
@@ -1655,7 +1655,7 @@ build_proto_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
 	while (mbuf) {
 		cpu_to_hw_sg(sg);
 		sg++;
-		qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
+		qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
 		sg->length = mbuf->data_len;
 		sg->offset = 0;
 		in_len += sg->length;
diff --git a/drivers/crypto/nitrox/nitrox_sym_reqmgr.c b/drivers/crypto/nitrox/nitrox_sym_reqmgr.c
index d9b4267764..4492247801 100644
--- a/drivers/crypto/nitrox/nitrox_sym_reqmgr.c
+++ b/drivers/crypto/nitrox/nitrox_sym_reqmgr.c
@@ -269,7 +269,7 @@ extract_cipher_auth_digest(struct nitrox_softreq *sr,
 	       op->sym->auth.data.length + digest->len))
 		return -EINVAL;
 
-	digest->iova = rte_pktmbuf_mtophys_offset(mdst,
+	digest->iova = rte_pktmbuf_iova_offset(mdst,
 					op->sym->auth.data.offset +
 					op->sym->auth.data.length);
 	digest->virt = rte_pktmbuf_mtod_offset(mdst, uint8_t *,
@@ -318,7 +318,7 @@ create_sglist_from_mbuf(struct nitrox_sgtable *sgtbl, struct rte_mbuf *mbuf,
 	if (datalen <= mlen)
 		mlen = datalen;
 	sglist[cnt].len = mlen;
-	sglist[cnt].iova = rte_pktmbuf_mtophys_offset(m, off);
+	sglist[cnt].iova = rte_pktmbuf_iova_offset(m, off);
 	sglist[cnt].virt = rte_pktmbuf_mtod_offset(m, uint8_t *, off);
 	sgtbl->total_bytes += mlen;
 	cnt++;
@@ -327,7 +327,7 @@ create_sglist_from_mbuf(struct nitrox_sgtable *sgtbl, struct rte_mbuf *mbuf,
 		mlen = rte_pktmbuf_data_len(m) < datalen ?
 			rte_pktmbuf_data_len(m) : datalen;
 		sglist[cnt].len = mlen;
-		sglist[cnt].iova = rte_pktmbuf_mtophys(m);
+		sglist[cnt].iova = rte_pktmbuf_iova(m);
 		sglist[cnt].virt = rte_pktmbuf_mtod(m, uint8_t *);
 		sgtbl->total_bytes += mlen;
 		cnt++;
diff --git a/drivers/crypto/virtio/virtio_rxtx.c b/drivers/crypto/virtio/virtio_rxtx.c
index e9a63cb5a0..e1cb4ad104 100644
--- a/drivers/crypto/virtio/virtio_rxtx.c
+++ b/drivers/crypto/virtio/virtio_rxtx.c
@@ -284,18 +284,18 @@ virtqueue_crypto_sym_enqueue_xmit(
 	}
 
 	/* indirect vring: src data */
-	desc[idx].addr = rte_pktmbuf_mtophys_offset(sym_op->m_src, 0);
+	desc[idx].addr = rte_pktmbuf_iova_offset(sym_op->m_src, 0);
 	desc[idx].len = (sym_op->cipher.data.offset
 		+ sym_op->cipher.data.length);
 	desc[idx++].flags = VRING_DESC_F_NEXT;
 
 	/* indirect vring: dst data */
 	if (sym_op->m_dst) {
-		desc[idx].addr = rte_pktmbuf_mtophys_offset(sym_op->m_dst, 0);
+		desc[idx].addr = rte_pktmbuf_iova_offset(sym_op->m_dst, 0);
 		desc[idx].len = (sym_op->cipher.data.offset
 			+ sym_op->cipher.data.length);
 	} else {
-		desc[idx].addr = rte_pktmbuf_mtophys_offset(sym_op->m_src, 0);
+		desc[idx].addr = rte_pktmbuf_iova_offset(sym_op->m_src, 0);
 		desc[idx].len = (sym_op->cipher.data.offset
 			+ sym_op->cipher.data.length);
 	}
diff --git a/drivers/net/axgbe/axgbe_rxtx.c b/drivers/net/axgbe/axgbe_rxtx.c
index 30c467db71..da3a9822b8 100644
--- a/drivers/net/axgbe/axgbe_rxtx.c
+++ b/drivers/net/axgbe/axgbe_rxtx.c
@@ -95,7 +95,7 @@ int axgbe_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 		axgbe_rx_queue_release(rxq);
 		return -ENOMEM;
 	}
-	rxq->ring_phys_addr = (uint64_t)dma->phys_addr;
+	rxq->ring_phys_addr = (uint64_t)dma->iova;
 	rxq->desc = (volatile union axgbe_rx_desc *)dma->addr;
 	memset((void *)rxq->desc, 0, size);
 	/* Allocate software ring */
@@ -530,7 +530,7 @@ int axgbe_dev_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 		return -ENOMEM;
 	}
 	memset(tz->addr, 0, tsize);
-	txq->ring_phys_addr = (uint64_t)tz->phys_addr;
+	txq->ring_phys_addr = (uint64_t)tz->iova;
 	txq->desc = tz->addr;
 	txq->queue_id = queue_idx;
 	txq->port_id = dev->data->port_id;
diff --git a/drivers/net/octeontx2/otx2_ethdev_sec_tx.h b/drivers/net/octeontx2/otx2_ethdev_sec_tx.h
index f8130ca624..15122b4154 100644
--- a/drivers/net/octeontx2/otx2_ethdev_sec_tx.h
+++ b/drivers/net/octeontx2/otx2_ethdev_sec_tx.h
@@ -87,7 +87,7 @@ otx2_sec_event_tx(struct otx2_ssogws *ws, struct rte_event *ev,
 	 */
 	rte_pktmbuf_append(m, extend_tail);
 	data = rte_pktmbuf_prepend(m, extend_head);
-	data_addr = rte_pktmbuf_mtophys(m);
+	data_addr = rte_pktmbuf_iova(m);
 
 	/*
 	 * Move the Ethernet header, to insert otx2_ipsec_fp_out_hdr prior
diff --git a/examples/fips_validation/main.c b/examples/fips_validation/main.c
index efd32a86a5..0a1c8b568c 100644
--- a/examples/fips_validation/main.c
+++ b/examples/fips_validation/main.c
@@ -531,7 +531,7 @@ prepare_auth_op(void)
 
 	sym->auth.data.length = vec.pt.len;
 	sym->auth.digest.data = pt + vec.pt.len;
-	sym->auth.digest.phys_addr = rte_pktmbuf_mtophys_offset(
+	sym->auth.digest.phys_addr = rte_pktmbuf_iova_offset(
 			env.mbuf, vec.pt.len);
 
 	memcpy(pt, vec.pt.val, vec.pt.len);
@@ -584,7 +584,7 @@ prepare_aead_op(void)
 		memcpy(pt, vec.pt.val, vec.pt.len);
 		sym->aead.data.length = vec.pt.len;
 		sym->aead.digest.data = pt + vec.pt.len;
-		sym->aead.digest.phys_addr = rte_pktmbuf_mtophys_offset(
+		sym->aead.digest.phys_addr = rte_pktmbuf_iova_offset(
 				env.mbuf, vec.pt.len);
 	} else {
 		uint8_t *ct;
diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index 7259575a77..a1414ed7cd 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -151,13 +151,6 @@ rte_mbuf_data_iova(const struct rte_mbuf *mb)
 	return mb->buf_iova + mb->data_off;
 }
 
-__rte_deprecated
-static inline phys_addr_t
-rte_mbuf_data_dma_addr(const struct rte_mbuf *mb)
-{
-	return rte_mbuf_data_iova(mb);
-}
-
 /**
  * Return the default IO address of the beginning of the mbuf data
  *
@@ -176,13 +169,6 @@ rte_mbuf_data_iova_default(const struct rte_mbuf *mb)
 	return mb->buf_iova + RTE_PKTMBUF_HEADROOM;
 }
 
-__rte_deprecated
-static inline phys_addr_t
-rte_mbuf_data_dma_addr_default(const struct rte_mbuf *mb)
-{
-	return rte_mbuf_data_iova_default(mb);
-}
-
 /**
  * Return the mbuf owning the data buffer address of an indirect mbuf.
  *
@@ -1537,13 +1523,6 @@ static inline struct rte_mbuf *rte_pktmbuf_lastseg(struct rte_mbuf *m)
 	return m;
 }
 
-/* deprecated */
-#define rte_pktmbuf_mtophys_offset(m, o) \
-	rte_pktmbuf_iova_offset(m, o)
-
-/* deprecated */
-#define rte_pktmbuf_mtophys(m) rte_pktmbuf_iova(m)
-
 /**
  * A macro that returns the length of the packet.
  *
-- 
2.28.0


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [dpdk-dev] [PATCH 4/4] mbuf: remove physical address alias
  2020-09-14 16:17 [dpdk-dev] [PATCH 0/4] remove aliases replaced with IOVA Thomas Monjalon
                   ` (2 preceding siblings ...)
  2020-09-14 16:17 ` [dpdk-dev] [PATCH 3/4] mbuf: remove deprecated function and macro aliases Thomas Monjalon
@ 2020-09-14 16:18 ` Thomas Monjalon
  2020-09-15  7:10   ` Andrew Rybchenko
  2020-09-17 10:41 ` [dpdk-dev] [PATCH v2 0/4] remove aliases replaced with IOVA Thomas Monjalon
  4 siblings, 1 reply; 23+ messages in thread
From: Thomas Monjalon @ 2020-09-14 16:18 UTC (permalink / raw)
  To: dev
  Cc: mdr, david.marchand, Neil Horman, John McNamara, Marko Kovacevic,
	Anoob Joseph, Beilei Xing, Jeff Guo, Jingjing Wu, Qiming Yang,
	Qi Zhang, Ferruh Yigit, Olivier Matz

Remove the deprecated buf_physaddr union field from rte_mbuf.
It is replaced with buf_iova which is at the same offset.

The single field buf_physaddr in rte_kni_mbuf is also renamed.

This concludes a 3-year process of semantic change.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 doc/guides/rel_notes/deprecation.rst          |  2 --
 doc/guides/rel_notes/release_20_11.rst        |  3 +++
 drivers/common/cpt/cpt_ucode.h                |  2 +-
 drivers/net/i40e/i40e_rxtx_vec_avx2.c         | 18 +++++++++---------
 drivers/net/iavf/iavf_rxtx_vec_avx2.c         | 18 +++++++++---------
 drivers/net/ice/ice_rxtx_vec_avx2.c           | 18 +++++++++---------
 kernel/linux/kni/kni_net.c                    |  6 +++---
 lib/librte_eal/linux/include/rte_kni_common.h |  2 +-
 lib/librte_mbuf/rte_mbuf_core.h               |  6 +-----
 9 files changed, 36 insertions(+), 39 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 52168f7751..143b7694a5 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -148,8 +148,6 @@ Deprecation Notices
   avoiding impact on vectorized implementation of the driver datapaths,
   while evaluating performance gains of a better use of the first cache line.
 
-  The deprecated unioned field ``buf_physaddr`` will be removed in DPDK 20.11.
-
 * ethdev: Split the ``struct eth_dev_ops`` struct to hide it as much as possible
   will be done in 20.11.
   Currently the ``struct eth_dev_ops`` struct is accessible by the application
diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst
index b729bdf200..64348ad2c8 100644
--- a/doc/guides/rel_notes/release_20_11.rst
+++ b/doc/guides/rel_notes/release_20_11.rst
@@ -88,6 +88,9 @@ API Changes
   the structures ``rte_mbuf`` and ``rte_mbuf_ext_shared_info``.
   The field ``refcnt`` is remaining from the old unions.
 
+* mbuf: Removed the unioned field ``buf_physaddr`` from ``rte_mbuf``.
+  The field ``buf_iova`` is remaining from the old union.
+
 * rawdev: Added a structure size parameter to the functions
   ``rte_rawdev_queue_setup()``, ``rte_rawdev_queue_conf_get()``,
   ``rte_rawdev_info_get()`` and ``rte_rawdev_configure()``,
diff --git a/drivers/common/cpt/cpt_ucode.h b/drivers/common/cpt/cpt_ucode.h
index 4e79fbf7a5..763355fb1f 100644
--- a/drivers/common/cpt/cpt_ucode.h
+++ b/drivers/common/cpt/cpt_ucode.h
@@ -2862,7 +2862,7 @@ alloc_op_meta(struct rte_mbuf *m_src,
 		tailroom = rte_pktmbuf_tailroom(m_src);
 		if (likely(tailroom > len + 8)) {
 			mdata = (uint8_t *)m_src->buf_addr + m_src->buf_len;
-			mphys = m_src->buf_physaddr + m_src->buf_len;
+			mphys = m_src->buf_iova + m_src->buf_len;
 			mdata -= len;
 			mphys -= len;
 			buf->vaddr = mdata;
diff --git a/drivers/net/i40e/i40e_rxtx_vec_avx2.c b/drivers/net/i40e/i40e_rxtx_vec_avx2.c
index 3bcef13638..37e7db5d7e 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_avx2.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_avx2.c
@@ -59,8 +59,8 @@ i40e_rxq_rearm(struct i40e_rx_queue *rxq)
 		mb0 = rxep[0].mbuf;
 		mb1 = rxep[1].mbuf;
 
-		/* load buf_addr(lo 64bit) and buf_physaddr(hi 64bit) */
-		RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_physaddr) !=
+		/* load buf_addr(lo 64bit) and buf_iova(hi 64bit) */
+		RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_iova) !=
 				offsetof(struct rte_mbuf, buf_addr) + 8);
 		vaddr0 = _mm_loadu_si128((__m128i *)&mb0->buf_addr);
 		vaddr1 = _mm_loadu_si128((__m128i *)&mb1->buf_addr);
@@ -92,8 +92,8 @@ i40e_rxq_rearm(struct i40e_rx_queue *rxq)
 		mb2 = rxep[2].mbuf;
 		mb3 = rxep[3].mbuf;
 
-		/* load buf_addr(lo 64bit) and buf_physaddr(hi 64bit) */
-		RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_physaddr) !=
+		/* load buf_addr(lo 64bit) and buf_iova(hi 64bit) */
+		RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_iova) !=
 				offsetof(struct rte_mbuf, buf_addr) + 8);
 		vaddr0 = _mm_loadu_si128((__m128i *)&mb0->buf_addr);
 		vaddr1 = _mm_loadu_si128((__m128i *)&mb1->buf_addr);
@@ -814,7 +814,7 @@ vtx1(volatile struct i40e_tx_desc *txdp,
 			((uint64_t)pkt->data_len << I40E_TXD_QW1_TX_BUF_SZ_SHIFT));
 
 	__m128i descriptor = _mm_set_epi64x(high_qw,
-				pkt->buf_physaddr + pkt->data_off);
+				pkt->buf_iova + pkt->data_off);
 	_mm_store_si128((__m128i *)txdp, descriptor);
 }
 
@@ -843,11 +843,11 @@ vtx(volatile struct i40e_tx_desc *txdp,
 				((uint64_t)pkt[0]->data_len << I40E_TXD_QW1_TX_BUF_SZ_SHIFT);
 
 		__m256i desc2_3 = _mm256_set_epi64x(
-				hi_qw3, pkt[3]->buf_physaddr + pkt[3]->data_off,
-				hi_qw2, pkt[2]->buf_physaddr + pkt[2]->data_off);
+				hi_qw3, pkt[3]->buf_iova + pkt[3]->data_off,
+				hi_qw2, pkt[2]->buf_iova + pkt[2]->data_off);
 		__m256i desc0_1 = _mm256_set_epi64x(
-				hi_qw1, pkt[1]->buf_physaddr + pkt[1]->data_off,
-				hi_qw0, pkt[0]->buf_physaddr + pkt[0]->data_off);
+				hi_qw1, pkt[1]->buf_iova + pkt[1]->data_off,
+				hi_qw0, pkt[0]->buf_iova + pkt[0]->data_off);
 		_mm256_store_si256((void *)(txdp + 2), desc2_3);
 		_mm256_store_si256((void *)txdp, desc0_1);
 	}
diff --git a/drivers/net/iavf/iavf_rxtx_vec_avx2.c b/drivers/net/iavf/iavf_rxtx_vec_avx2.c
index e5e0fd3095..8f28afc8c5 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_avx2.c
+++ b/drivers/net/iavf/iavf_rxtx_vec_avx2.c
@@ -52,8 +52,8 @@ iavf_rxq_rearm(struct iavf_rx_queue *rxq)
 		mb0 = rxp[0];
 		mb1 = rxp[1];
 
-		/* load buf_addr(lo 64bit) and buf_physaddr(hi 64bit) */
-		RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_physaddr) !=
+		/* load buf_addr(lo 64bit) and buf_iova(hi 64bit) */
+		RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_iova) !=
 				offsetof(struct rte_mbuf, buf_addr) + 8);
 		vaddr0 = _mm_loadu_si128((__m128i *)&mb0->buf_addr);
 		vaddr1 = _mm_loadu_si128((__m128i *)&mb1->buf_addr);
@@ -85,8 +85,8 @@ iavf_rxq_rearm(struct iavf_rx_queue *rxq)
 		mb2 = rxp[2];
 		mb3 = rxp[3];
 
-		/* load buf_addr(lo 64bit) and buf_physaddr(hi 64bit) */
-		RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_physaddr) !=
+		/* load buf_addr(lo 64bit) and buf_iova(hi 64bit) */
+		RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_iova) !=
 				offsetof(struct rte_mbuf, buf_addr) + 8);
 		vaddr0 = _mm_loadu_si128((__m128i *)&mb0->buf_addr);
 		vaddr1 = _mm_loadu_si128((__m128i *)&mb1->buf_addr);
@@ -1391,7 +1391,7 @@ iavf_vtx1(volatile struct iavf_tx_desc *txdp,
 		 ((uint64_t)pkt->data_len << IAVF_TXD_QW1_TX_BUF_SZ_SHIFT));
 
 	__m128i descriptor = _mm_set_epi64x(high_qw,
-				pkt->buf_physaddr + pkt->data_off);
+				pkt->buf_iova + pkt->data_off);
 	_mm_store_si128((__m128i *)txdp, descriptor);
 }
 
@@ -1430,15 +1430,15 @@ iavf_vtx(volatile struct iavf_tx_desc *txdp,
 		__m256i desc2_3 =
 			_mm256_set_epi64x
 				(hi_qw3,
-				 pkt[3]->buf_physaddr + pkt[3]->data_off,
+				 pkt[3]->buf_iova + pkt[3]->data_off,
 				 hi_qw2,
-				 pkt[2]->buf_physaddr + pkt[2]->data_off);
+				 pkt[2]->buf_iova + pkt[2]->data_off);
 		__m256i desc0_1 =
 			_mm256_set_epi64x
 				(hi_qw1,
-				 pkt[1]->buf_physaddr + pkt[1]->data_off,
+				 pkt[1]->buf_iova + pkt[1]->data_off,
 				 hi_qw0,
-				 pkt[0]->buf_physaddr + pkt[0]->data_off);
+				 pkt[0]->buf_iova + pkt[0]->data_off);
 		_mm256_store_si256((void *)(txdp + 2), desc2_3);
 		_mm256_store_si256((void *)txdp, desc0_1);
 	}
diff --git a/drivers/net/ice/ice_rxtx_vec_avx2.c b/drivers/net/ice/ice_rxtx_vec_avx2.c
index be50677c2f..b653805160 100644
--- a/drivers/net/ice/ice_rxtx_vec_avx2.c
+++ b/drivers/net/ice/ice_rxtx_vec_avx2.c
@@ -52,8 +52,8 @@ ice_rxq_rearm(struct ice_rx_queue *rxq)
 		mb0 = rxep[0].mbuf;
 		mb1 = rxep[1].mbuf;
 
-		/* load buf_addr(lo 64bit) and buf_physaddr(hi 64bit) */
-		RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_physaddr) !=
+		/* load buf_addr(lo 64bit) and buf_iova(hi 64bit) */
+		RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_iova) !=
 				offsetof(struct rte_mbuf, buf_addr) + 8);
 		vaddr0 = _mm_loadu_si128((__m128i *)&mb0->buf_addr);
 		vaddr1 = _mm_loadu_si128((__m128i *)&mb1->buf_addr);
@@ -85,8 +85,8 @@ ice_rxq_rearm(struct ice_rx_queue *rxq)
 		mb2 = rxep[2].mbuf;
 		mb3 = rxep[3].mbuf;
 
-		/* load buf_addr(lo 64bit) and buf_physaddr(hi 64bit) */
-		RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_physaddr) !=
+		/* load buf_addr(lo 64bit) and buf_iova(hi 64bit) */
+		RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_iova) !=
 				offsetof(struct rte_mbuf, buf_addr) + 8);
 		vaddr0 = _mm_loadu_si128((__m128i *)&mb0->buf_addr);
 		vaddr1 = _mm_loadu_si128((__m128i *)&mb1->buf_addr);
@@ -689,7 +689,7 @@ ice_vtx1(volatile struct ice_tx_desc *txdp,
 		 ((uint64_t)pkt->data_len << ICE_TXD_QW1_TX_BUF_SZ_S));
 
 	__m128i descriptor = _mm_set_epi64x(high_qw,
-				pkt->buf_physaddr + pkt->data_off);
+				pkt->buf_iova + pkt->data_off);
 	_mm_store_si128((__m128i *)txdp, descriptor);
 }
 
@@ -728,15 +728,15 @@ ice_vtx(volatile struct ice_tx_desc *txdp,
 		__m256i desc2_3 =
 			_mm256_set_epi64x
 				(hi_qw3,
-				 pkt[3]->buf_physaddr + pkt[3]->data_off,
+				 pkt[3]->buf_iova + pkt[3]->data_off,
 				 hi_qw2,
-				 pkt[2]->buf_physaddr + pkt[2]->data_off);
+				 pkt[2]->buf_iova + pkt[2]->data_off);
 		__m256i desc0_1 =
 			_mm256_set_epi64x
 				(hi_qw1,
-				 pkt[1]->buf_physaddr + pkt[1]->data_off,
+				 pkt[1]->buf_iova + pkt[1]->data_off,
 				 hi_qw0,
-				 pkt[0]->buf_physaddr + pkt[0]->data_off);
+				 pkt[0]->buf_iova + pkt[0]->data_off);
 		_mm256_store_si256((void *)(txdp + 2), desc2_3);
 		_mm256_store_si256((void *)txdp, desc0_1);
 	}
diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c
index c82c881a2c..4b752083da 100644
--- a/kernel/linux/kni/kni_net.c
+++ b/kernel/linux/kni/kni_net.c
@@ -47,7 +47,7 @@ iova2kva(struct kni_dev *kni, void *iova)
 static inline void *
 iova2data_kva(struct kni_dev *kni, struct rte_kni_mbuf *m)
 {
-	return phys_to_virt(iova_to_phys(kni->usr_tsk, m->buf_physaddr) +
+	return phys_to_virt(iova_to_phys(kni->usr_tsk, m->buf_iova) +
 			    m->data_off);
 }
 #endif
@@ -67,7 +67,7 @@ pa2va(void *pa, struct rte_kni_mbuf *m)
 
 	va = (void *)((unsigned long)pa +
 			(unsigned long)m->buf_addr -
-			(unsigned long)m->buf_physaddr);
+			(unsigned long)m->buf_iova);
 	return va;
 }
 
@@ -75,7 +75,7 @@ pa2va(void *pa, struct rte_kni_mbuf *m)
 static void *
 kva2data_kva(struct rte_kni_mbuf *m)
 {
-	return phys_to_virt(m->buf_physaddr + m->data_off);
+	return phys_to_virt(m->buf_iova + m->data_off);
 }
 
 static inline void *
diff --git a/lib/librte_eal/linux/include/rte_kni_common.h b/lib/librte_eal/linux/include/rte_kni_common.h
index 7313ef504e..21b477f0aa 100644
--- a/lib/librte_eal/linux/include/rte_kni_common.h
+++ b/lib/librte_eal/linux/include/rte_kni_common.h
@@ -75,7 +75,7 @@ struct rte_kni_fifo {
  */
 struct rte_kni_mbuf {
 	void *buf_addr __attribute__((__aligned__(RTE_CACHE_LINE_SIZE)));
-	uint64_t buf_physaddr;
+	uint64_t buf_iova;
 	uint16_t data_off;      /**< Start address of data in segment buffer. */
 	char pad1[2];
 	uint16_t nb_segs;       /**< Number of segments. */
diff --git a/lib/librte_mbuf/rte_mbuf_core.h b/lib/librte_mbuf/rte_mbuf_core.h
index cee3d5aff5..8c2c20644d 100644
--- a/lib/librte_mbuf/rte_mbuf_core.h
+++ b/lib/librte_mbuf/rte_mbuf_core.h
@@ -476,11 +476,7 @@ struct rte_mbuf {
 	 * same mbuf cacheline0 layout for 32-bit and 64-bit. This makes
 	 * working on vector drivers easier.
 	 */
-	RTE_STD_C11
-	union {
-		rte_iova_t buf_iova;
-		rte_iova_t buf_physaddr; /**< deprecated */
-	} __rte_aligned(sizeof(rte_iova_t));
+	rte_iova_t buf_iova __rte_aligned(sizeof(rte_iova_t));
 
 	/* next 8 bytes are initialised on RX descriptor rearm */
 	RTE_MARKER64 rearm_data;
-- 
2.28.0


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [dpdk-dev] [PATCH 1/4] mem: remove physical address aliases
  2020-09-14 16:17 ` [dpdk-dev] [PATCH 1/4] mem: remove physical address aliases Thomas Monjalon
@ 2020-09-15  7:07   ` Andrew Rybchenko
  2020-09-15 11:46   ` Burakov, Anatoly
  1 sibling, 0 replies; 23+ messages in thread
From: Andrew Rybchenko @ 2020-09-15  7:07 UTC (permalink / raw)
  To: Thomas Monjalon, dev
  Cc: mdr, david.marchand, Hemant Agrawal, Sachin Saxena, Fiona Trahe,
	Ashish Gupta, Somalapuram Amaranath, Anoob Joseph, Jay Zhou,
	Qiming Yang, Qi Zhang, Gagandeep Singh, Akhil Goyal,
	Anatoly Burakov, Ferruh Yigit

On 9/14/20 7:17 PM, Thomas Monjalon wrote:
> Remove the deprecated unioned fields phys_addr
> from the structures rte_memseg and rte_memzone.
> They are replaced with the fields iova which are at the same offsets.
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>

I think that the change should be listed in release notes.

Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [dpdk-dev] [PATCH 2/4] mempool: remove physical address aliases
  2020-09-14 16:17 ` [dpdk-dev] [PATCH 2/4] mempool: " Thomas Monjalon
@ 2020-09-15  7:08   ` Andrew Rybchenko
  0 siblings, 0 replies; 23+ messages in thread
From: Andrew Rybchenko @ 2020-09-15  7:08 UTC (permalink / raw)
  To: Thomas Monjalon, dev; +Cc: mdr, david.marchand, Olivier Matz

On 9/14/20 7:17 PM, Thomas Monjalon wrote:
> Remove the deprecated unioned fields physaddr and phys_addr
> from the structures rte_mempool_objhdr and rte_mempool_memhdr.
> They are replaced with the fields iova which are at the same offsets.
> 
> Remove the deprecated macro MEMPOOL_F_NO_PHYS_CONTIG
> which is an alias of the more recent MEMPOOL_F_NO_IOVA_CONTIG.
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>

I think that the change should be listed in release notes.

Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [dpdk-dev] [PATCH 3/4] mbuf: remove deprecated function and macro aliases
  2020-09-14 16:17 ` [dpdk-dev] [PATCH 3/4] mbuf: remove deprecated function and macro aliases Thomas Monjalon
@ 2020-09-15  7:09   ` Andrew Rybchenko
  2020-09-15  8:38     ` Thomas Monjalon
  0 siblings, 1 reply; 23+ messages in thread
From: Andrew Rybchenko @ 2020-09-15  7:09 UTC (permalink / raw)
  To: Thomas Monjalon, dev
  Cc: mdr, david.marchand, Nicolas Chautru, Anoob Joseph, Fiona Trahe,
	Ashish Gupta, Somalapuram Amaranath, Akhil Goyal, Hemant Agrawal,
	Nagadheeraj Rottela, Srikanth Jampala, Jay Zhou, Jerin Jacob,
	Nithin Dabilpuram, Kiran Kumar K, Marko Kovacevic, Ori Kam,
	Bruce Richardson, Radu Nicolau, Tomasz Kantecki,
	Sunil Kumar Kori, Pavan Nikhilesh, Olivier Matz

On 9/14/20 7:17 PM, Thomas Monjalon wrote:
> Remove the deprecated functions
> 	- rte_mbuf_data_dma_addr
> 	- rte_mbuf_data_dma_addr_default
> which aliased the more recent functions
> 	- rte_mbuf_data_iova
> 	- rte_mbuf_data_iova_default
> 
> Remove the deprecated macros
> 	- rte_pktmbuf_mtophys
> 	- rte_pktmbuf_mtophys_offset
> which aliased the more recent macros
> 	- rte_pktmbuf_iova
> 	- rte_pktmbuf_iova_offset
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>

I think that the change should be listed in release notes.

Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [dpdk-dev] [PATCH 4/4] mbuf: remove physical address alias
  2020-09-14 16:18 ` [dpdk-dev] [PATCH 4/4] mbuf: remove physical address alias Thomas Monjalon
@ 2020-09-15  7:10   ` Andrew Rybchenko
  0 siblings, 0 replies; 23+ messages in thread
From: Andrew Rybchenko @ 2020-09-15  7:10 UTC (permalink / raw)
  To: Thomas Monjalon, dev
  Cc: mdr, david.marchand, Neil Horman, John McNamara, Marko Kovacevic,
	Anoob Joseph, Beilei Xing, Jeff Guo, Jingjing Wu, Qiming Yang,
	Qi Zhang, Ferruh Yigit, Olivier Matz

On 9/14/20 7:18 PM, Thomas Monjalon wrote:
> Remove the deprecated buf_physaddr union field from rte_mbuf.
> It is replaced with buf_iova which is at the same offset.
> 
> The single field buf_physaddr in rte_kni_mbuf is also renamed.
> 
> This concludes a 3-year process of semantic change.
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>

Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [dpdk-dev] [PATCH 3/4] mbuf: remove deprecated function and macro aliases
  2020-09-15  7:09   ` Andrew Rybchenko
@ 2020-09-15  8:38     ` Thomas Monjalon
  0 siblings, 0 replies; 23+ messages in thread
From: Thomas Monjalon @ 2020-09-15  8:38 UTC (permalink / raw)
  To: Andrew Rybchenko
  Cc: dev, mdr, david.marchand, Nicolas Chautru, Anoob Joseph,
	Fiona Trahe, Ashish Gupta, Somalapuram Amaranath, Akhil Goyal,
	Hemant Agrawal, Nagadheeraj Rottela, Srikanth Jampala, Jay Zhou,
	Jerin Jacob, Nithin Dabilpuram, Kiran Kumar K, Marko Kovacevic,
	Ori Kam, Bruce Richardson, Radu Nicolau, Tomasz Kantecki,
	Sunil Kumar Kori, Pavan Nikhilesh, Olivier Matz

15/09/2020 09:09, Andrew Rybchenko:
> On 9/14/20 7:17 PM, Thomas Monjalon wrote:
> > Remove the deprecated functions
> > 	- rte_mbuf_data_dma_addr
> > 	- rte_mbuf_data_dma_addr_default
> > which aliased the more recent functions
> > 	- rte_mbuf_data_iova
> > 	- rte_mbuf_data_iova_default
> > 
> > Remove the deprecated macros
> > 	- rte_pktmbuf_mtophys
> > 	- rte_pktmbuf_mtophys_offset
> > which aliased the more recent macros
> > 	- rte_pktmbuf_iova
> > 	- rte_pktmbuf_iova_offset
> > 
> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> 
> I think that the change should be listed in release notes.

Yes I did it for the patch 4 and forgot for patches 1, 2 and 3.




^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [dpdk-dev] [PATCH 1/4] mem: remove physical address aliases
  2020-09-14 16:17 ` [dpdk-dev] [PATCH 1/4] mem: remove physical address aliases Thomas Monjalon
  2020-09-15  7:07   ` Andrew Rybchenko
@ 2020-09-15 11:46   ` Burakov, Anatoly
  1 sibling, 0 replies; 23+ messages in thread
From: Burakov, Anatoly @ 2020-09-15 11:46 UTC (permalink / raw)
  To: Thomas Monjalon, dev
  Cc: mdr, david.marchand, Hemant Agrawal, Sachin Saxena, Fiona Trahe,
	Ashish Gupta, Somalapuram Amaranath, Anoob Joseph, Jay Zhou,
	Qiming Yang, Qi Zhang, Gagandeep Singh, Akhil Goyal,
	Ferruh Yigit

On 14-Sep-20 5:17 PM, Thomas Monjalon wrote:
> Remove the deprecated unioned fields phys_addr
> from the structures rte_memseg and rte_memzone.
> They are replaced with the fields iova which are at the same offsets.
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---

Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>

-- 
Thanks,
Anatoly

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [dpdk-dev] [PATCH v2 0/4] remove aliases replaced with IOVA
  2020-09-14 16:17 [dpdk-dev] [PATCH 0/4] remove aliases replaced with IOVA Thomas Monjalon
                   ` (3 preceding siblings ...)
  2020-09-14 16:18 ` [dpdk-dev] [PATCH 4/4] mbuf: remove physical address alias Thomas Monjalon
@ 2020-09-17 10:41 ` Thomas Monjalon
  2020-09-17 10:41   ` [dpdk-dev] [PATCH v2 1/4] mem: remove physical address aliases Thomas Monjalon
                     ` (3 more replies)
  4 siblings, 4 replies; 23+ messages in thread
From: Thomas Monjalon @ 2020-09-17 10:41 UTC (permalink / raw)
  To: dev; +Cc: david.marchand, mdr

When introducing IOVA semantic, 3 years ago,
some fields, functions and macros mentioning "physical address"
were marked as deprecated and replaced with IOVA aliases.
Some parts of the original "physical address" semantic
have been removed over the years, other parts are still there.

This pathset proposes removing the remaining parts in
memseg, memzone, mempool and mbuf components.
The mbuf field removal was announced, and the rest of those removals
were not announced, except it is marked deprecated for 3 years.

v2: add missing release notes text for patches 1, 2 and 3

Thomas Monjalon (4):
  mem: remove physical address aliases
  mempool: remove physical address aliases
  mbuf: remove deprecated function and macro aliases
  mbuf: remove physical address alias

 doc/guides/rel_notes/deprecation.rst          |  2 -
 doc/guides/rel_notes/release_20_11.rst        | 18 ++++++++
 .../fpga_5gnr_fec/rte_fpga_5gnr_fec.c         | 16 +++----
 drivers/baseband/fpga_lte_fec/fpga_lte_fec.c  | 16 +++----
 drivers/bus/fslmc/portal/dpaa2_hw_pvt.h       |  2 +-
 drivers/common/cpt/cpt_ucode.h                | 14 +++----
 drivers/common/dpaax/dpaax_iova_table.c       |  2 +-
 drivers/compress/qat/qat_comp.c               |  6 +--
 drivers/compress/qat/qat_comp_pmd.c           |  2 +-
 drivers/crypto/ccp/ccp_crypto.c               | 22 +++++-----
 drivers/crypto/ccp/ccp_dev.c                  |  2 +-
 drivers/crypto/dpaa_sec/dpaa_sec.c            | 42 +++++++++----------
 drivers/crypto/nitrox/nitrox_sym_reqmgr.c     |  6 +--
 .../crypto/octeontx/otx_cryptodev_hw_access.c |  2 +-
 drivers/crypto/virtio/virtio_cryptodev.c      |  6 +--
 drivers/crypto/virtio/virtio_rxtx.c           |  6 +--
 drivers/net/axgbe/axgbe_rxtx.c                |  4 +-
 drivers/net/i40e/i40e_rxtx_vec_avx2.c         | 18 ++++----
 drivers/net/iavf/iavf_rxtx_vec_avx2.c         | 18 ++++----
 drivers/net/ice/base/ice_osdep.h              |  2 +-
 drivers/net/ice/ice_rxtx_vec_avx2.c           | 18 ++++----
 drivers/net/octeontx2/otx2_ethdev_sec_tx.h    |  2 +-
 drivers/net/pfe/base/pfe.h                    |  2 +-
 examples/fips_validation/main.c               |  4 +-
 kernel/linux/kni/kni_net.c                    |  6 +--
 lib/librte_eal/include/rte_memory.h           |  6 +--
 lib/librte_eal/include/rte_memzone.h          |  6 +--
 lib/librte_eal/linux/include/rte_kni_common.h |  2 +-
 lib/librte_kni/rte_kni.c                      | 14 +++----
 lib/librte_mbuf/rte_mbuf.h                    | 21 ----------
 lib/librte_mbuf/rte_mbuf_core.h               |  6 +--
 lib/librte_mempool/rte_mempool.h              | 13 +-----
 32 files changed, 140 insertions(+), 166 deletions(-)

-- 
2.28.0


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [dpdk-dev] [PATCH v2 1/4] mem: remove physical address aliases
  2020-09-17 10:41 ` [dpdk-dev] [PATCH v2 0/4] remove aliases replaced with IOVA Thomas Monjalon
@ 2020-09-17 10:41   ` Thomas Monjalon
  2020-09-17 10:53     ` Hemant Agrawal
  2020-09-18 14:38     ` Kinsella, Ray
  2020-09-17 10:41   ` [dpdk-dev] [PATCH v2 2/4] mempool: " Thomas Monjalon
                     ` (2 subsequent siblings)
  3 siblings, 2 replies; 23+ messages in thread
From: Thomas Monjalon @ 2020-09-17 10:41 UTC (permalink / raw)
  To: dev
  Cc: david.marchand, mdr, Andrew Rybchenko, Anatoly Burakov,
	John McNamara, Marko Kovacevic, Hemant Agrawal, Sachin Saxena,
	Fiona Trahe, Ashish Gupta, Somalapuram Amaranath, Anoob Joseph,
	Jay Zhou, Qiming Yang, Qi Zhang, Gagandeep Singh, Akhil Goyal,
	Ferruh Yigit

Remove the deprecated unioned fields phys_addr
from the structures rte_memseg and rte_memzone.
They are replaced with the fields iova which are at the same offsets.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 doc/guides/rel_notes/release_20_11.rst            |  4 ++++
 drivers/bus/fslmc/portal/dpaa2_hw_pvt.h           |  2 +-
 drivers/common/dpaax/dpaax_iova_table.c           |  2 +-
 drivers/compress/qat/qat_comp.c                   |  2 +-
 drivers/compress/qat/qat_comp_pmd.c               |  2 +-
 drivers/crypto/ccp/ccp_dev.c                      |  2 +-
 drivers/crypto/octeontx/otx_cryptodev_hw_access.c |  2 +-
 drivers/crypto/virtio/virtio_cryptodev.c          |  6 +++---
 drivers/net/ice/base/ice_osdep.h                  |  2 +-
 drivers/net/pfe/base/pfe.h                        |  2 +-
 lib/librte_eal/include/rte_memory.h               |  6 +-----
 lib/librte_eal/include/rte_memzone.h              |  6 +-----
 lib/librte_kni/rte_kni.c                          | 14 +++++++-------
 13 files changed, 24 insertions(+), 28 deletions(-)

diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst
index b729bdf200..c49e612c43 100644
--- a/doc/guides/rel_notes/release_20_11.rst
+++ b/doc/guides/rel_notes/release_20_11.rst
@@ -84,6 +84,10 @@ API Changes
    Also, make sure to start the actual text at the margin.
    =======================================================
 
+* mem: Removed the unioned field ``phys_addr`` from
+  the structures ``rte_memseg`` and ``rte_memzone``.
+  The field ``iova`` is remaining from the old unions.
+
 * mbuf: Removed the unioned field ``refcnt_atomic`` from
   the structures ``rte_mbuf`` and ``rte_mbuf_ext_shared_info``.
   The field ``refcnt`` is remaining from the old unions.
diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
index 35423df12b..2dd53c63ba 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
@@ -368,7 +368,7 @@ static phys_addr_t dpaa2_mem_vtop(uint64_t vaddr)
 
 	memseg = rte_mem_virt2memseg((void *)(uintptr_t)vaddr, NULL);
 	if (memseg)
-		return memseg->phys_addr + RTE_PTR_DIFF(vaddr, memseg->addr);
+		return memseg->iova + RTE_PTR_DIFF(vaddr, memseg->addr);
 	return (size_t)NULL;
 }
 
diff --git a/drivers/common/dpaax/dpaax_iova_table.c b/drivers/common/dpaax/dpaax_iova_table.c
index 5ba8ed1933..91bee65e7b 100644
--- a/drivers/common/dpaax/dpaax_iova_table.c
+++ b/drivers/common/dpaax/dpaax_iova_table.c
@@ -440,7 +440,7 @@ dpaax_memevent_walk_memsegs(const struct rte_memseg_list *msl __rte_unused,
 			    void *arg __rte_unused)
 {
 	DPAAX_DEBUG("Walking for %p (pa=%"PRIu64") and len %zu",
-		    ms->addr, ms->phys_addr, len);
+		    ms->addr, ms->iova, len);
 	dpaax_iova_table_update(rte_mem_virt2phy(ms->addr), ms->addr, len);
 	return 0;
 }
diff --git a/drivers/compress/qat/qat_comp.c b/drivers/compress/qat/qat_comp.c
index 9e1fd2fe91..335fd63b98 100644
--- a/drivers/compress/qat/qat_comp.c
+++ b/drivers/compress/qat/qat_comp.c
@@ -957,7 +957,7 @@ static int qat_comp_create_templates(struct qat_comp_xform *qat_xform,
 				ICP_QAT_FW_SLICE_XLAT);
 
 		comp_req->u1.xlt_pars.inter_buff_ptr =
-				interm_buff_mz->phys_addr;
+				interm_buff_mz->iova;
 	}
 
 #if RTE_LOG_DP_LEVEL >= RTE_LOG_DEBUG
diff --git a/drivers/compress/qat/qat_comp_pmd.c b/drivers/compress/qat/qat_comp_pmd.c
index 311e561685..18ecb34ba7 100644
--- a/drivers/compress/qat/qat_comp_pmd.c
+++ b/drivers/compress/qat/qat_comp_pmd.c
@@ -242,7 +242,7 @@ qat_comp_setup_inter_buffers(struct qat_comp_dev_private *comp_dev,
 	}
 
 	mz_start = (uint8_t *)memzone->addr;
-	mz_start_phys = memzone->phys_addr;
+	mz_start_phys = memzone->iova;
 	QAT_LOG(DEBUG, "Memzone %s: addr = %p, phys = 0x%"PRIx64
 			", size required %d, size created %zu",
 			inter_buff_mz_name, mz_start, mz_start_phys,
diff --git a/drivers/crypto/ccp/ccp_dev.c b/drivers/crypto/ccp/ccp_dev.c
index 7d98b2eb25..664ddc1747 100644
--- a/drivers/crypto/ccp/ccp_dev.c
+++ b/drivers/crypto/ccp/ccp_dev.c
@@ -546,7 +546,7 @@ ccp_add_device(struct ccp_device *dev, int type)
 						  cmd_q->qsize, SOCKET_ID_ANY);
 		cmd_q->qbase_addr = (void *)q_mz->addr;
 		cmd_q->qbase_desc = (void *)q_mz->addr;
-		cmd_q->qbase_phys_addr =  q_mz->phys_addr;
+		cmd_q->qbase_phys_addr =  q_mz->iova;
 
 		cmd_q->qcontrol = 0;
 		/* init control reg to zero */
diff --git a/drivers/crypto/octeontx/otx_cryptodev_hw_access.c b/drivers/crypto/octeontx/otx_cryptodev_hw_access.c
index ce546c2ffe..ee36b0183e 100644
--- a/drivers/crypto/octeontx/otx_cryptodev_hw_access.c
+++ b/drivers/crypto/octeontx/otx_cryptodev_hw_access.c
@@ -556,7 +556,7 @@ otx_cpt_get_resource(const struct rte_cryptodev *dev, uint8_t group,
 	}
 
 	mem = rz->addr;
-	dma_addr = rz->phys_addr;
+	dma_addr = rz->iova;
 	alloc_len = len;
 
 	memset(mem, 0, len);
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index 31a5f1072a..1822f21744 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -411,7 +411,7 @@ virtio_crypto_queue_setup(struct rte_cryptodev *dev,
 	 * and only accepts 32 bit page frame number.
 	 * Check if the allocated physical memory exceeds 16TB.
 	 */
-	if ((mz->phys_addr + vq->vq_ring_size - 1)
+	if ((mz->iova + vq->vq_ring_size - 1)
 				>> (VIRTIO_PCI_QUEUE_ADDR_SHIFT + 32)) {
 		VIRTIO_CRYPTO_INIT_LOG_ERR("vring address shouldn't be "
 					"above 16TB!");
@@ -420,10 +420,10 @@ virtio_crypto_queue_setup(struct rte_cryptodev *dev,
 
 	memset(mz->addr, 0, sizeof(mz->len));
 	vq->mz = mz;
-	vq->vq_ring_mem = mz->phys_addr;
+	vq->vq_ring_mem = mz->iova;
 	vq->vq_ring_virt_mem = mz->addr;
 	VIRTIO_CRYPTO_INIT_LOG_DBG("vq->vq_ring_mem(physical): 0x%"PRIx64,
-					(uint64_t)mz->phys_addr);
+					(uint64_t)mz->iova);
 	VIRTIO_CRYPTO_INIT_LOG_DBG("vq->vq_ring_virt_mem: 0x%"PRIx64,
 					(uint64_t)(uintptr_t)mz->addr);
 
diff --git a/drivers/net/ice/base/ice_osdep.h b/drivers/net/ice/base/ice_osdep.h
index 360e435b8d..9a170b5143 100644
--- a/drivers/net/ice/base/ice_osdep.h
+++ b/drivers/net/ice/base/ice_osdep.h
@@ -258,7 +258,7 @@ ice_alloc_dma_mem(__rte_unused struct ice_hw *hw,
 
 	mem->size = size;
 	mem->va = mz->addr;
-	mem->pa = mz->phys_addr;
+	mem->pa = mz->iova;
 	mem->zone = (const void *)mz;
 	PMD_DRV_LOG(DEBUG, "memzone %s allocated with physical address: "
 		    "%"PRIu64, mz->name, mem->pa);
diff --git a/drivers/net/pfe/base/pfe.h b/drivers/net/pfe/base/pfe.h
index 72741ba4a8..0a88e98c1b 100644
--- a/drivers/net/pfe/base/pfe.h
+++ b/drivers/net/pfe/base/pfe.h
@@ -414,7 +414,7 @@ static inline phys_addr_t pfe_mem_vtop(uint64_t vaddr)
 
 	memseg = rte_mem_virt2memseg((void *)(uintptr_t)vaddr, NULL);
 	if (memseg)
-		return memseg->phys_addr + RTE_PTR_DIFF(vaddr, memseg->addr);
+		return memseg->iova + RTE_PTR_DIFF(vaddr, memseg->addr);
 
 	return (size_t)NULL;
 }
diff --git a/lib/librte_eal/include/rte_memory.h b/lib/librte_eal/include/rte_memory.h
index 65374d53a3..bba9b5300a 100644
--- a/lib/librte_eal/include/rte_memory.h
+++ b/lib/librte_eal/include/rte_memory.h
@@ -43,11 +43,7 @@ extern "C" {
 #define RTE_MEMSEG_FLAG_DO_NOT_FREE (1 << 0)
 /**< Prevent this segment from being freed back to the OS. */
 struct rte_memseg {
-	RTE_STD_C11
-	union {
-		phys_addr_t phys_addr;  /**< deprecated - Start physical address. */
-		rte_iova_t iova;        /**< Start IO address. */
-	};
+	rte_iova_t iova;            /**< Start IO address. */
 	RTE_STD_C11
 	union {
 		void *addr;         /**< Start virtual address. */
diff --git a/lib/librte_eal/include/rte_memzone.h b/lib/librte_eal/include/rte_memzone.h
index 091c9522f7..5db1210831 100644
--- a/lib/librte_eal/include/rte_memzone.h
+++ b/lib/librte_eal/include/rte_memzone.h
@@ -51,11 +51,7 @@ struct rte_memzone {
 #define RTE_MEMZONE_NAMESIZE 32       /**< Maximum length of memory zone name.*/
 	char name[RTE_MEMZONE_NAMESIZE];  /**< Name of the memory zone. */
 
-	RTE_STD_C11
-	union {
-		phys_addr_t phys_addr;        /**< deprecated - Start physical address. */
-		rte_iova_t iova;              /**< Start IO address. */
-	};
+	rte_iova_t iova;                  /**< Start IO address. */
 	RTE_STD_C11
 	union {
 		void *addr;                   /**< Start virtual address. */
diff --git a/lib/librte_kni/rte_kni.c b/lib/librte_kni/rte_kni.c
index bcf82cc2d5..837d0217d2 100644
--- a/lib/librte_kni/rte_kni.c
+++ b/lib/librte_kni/rte_kni.c
@@ -276,37 +276,37 @@ rte_kni_alloc(struct rte_mempool *pktmbuf_pool,
 	/* TX RING */
 	kni->tx_q = kni->m_tx_q->addr;
 	kni_fifo_init(kni->tx_q, KNI_FIFO_COUNT_MAX);
-	dev_info.tx_phys = kni->m_tx_q->phys_addr;
+	dev_info.tx_phys = kni->m_tx_q->iova;
 
 	/* RX RING */
 	kni->rx_q = kni->m_rx_q->addr;
 	kni_fifo_init(kni->rx_q, KNI_FIFO_COUNT_MAX);
-	dev_info.rx_phys = kni->m_rx_q->phys_addr;
+	dev_info.rx_phys = kni->m_rx_q->iova;
 
 	/* ALLOC RING */
 	kni->alloc_q = kni->m_alloc_q->addr;
 	kni_fifo_init(kni->alloc_q, KNI_FIFO_COUNT_MAX);
-	dev_info.alloc_phys = kni->m_alloc_q->phys_addr;
+	dev_info.alloc_phys = kni->m_alloc_q->iova;
 
 	/* FREE RING */
 	kni->free_q = kni->m_free_q->addr;
 	kni_fifo_init(kni->free_q, KNI_FIFO_COUNT_MAX);
-	dev_info.free_phys = kni->m_free_q->phys_addr;
+	dev_info.free_phys = kni->m_free_q->iova;
 
 	/* Request RING */
 	kni->req_q = kni->m_req_q->addr;
 	kni_fifo_init(kni->req_q, KNI_FIFO_COUNT_MAX);
-	dev_info.req_phys = kni->m_req_q->phys_addr;
+	dev_info.req_phys = kni->m_req_q->iova;
 
 	/* Response RING */
 	kni->resp_q = kni->m_resp_q->addr;
 	kni_fifo_init(kni->resp_q, KNI_FIFO_COUNT_MAX);
-	dev_info.resp_phys = kni->m_resp_q->phys_addr;
+	dev_info.resp_phys = kni->m_resp_q->iova;
 
 	/* Req/Resp sync mem area */
 	kni->sync_addr = kni->m_sync_addr->addr;
 	dev_info.sync_va = kni->m_sync_addr->addr;
-	dev_info.sync_phys = kni->m_sync_addr->phys_addr;
+	dev_info.sync_phys = kni->m_sync_addr->iova;
 
 	kni->pktmbuf_pool = pktmbuf_pool;
 	kni->group_id = conf->group_id;
-- 
2.28.0


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [dpdk-dev] [PATCH v2 2/4] mempool: remove physical address aliases
  2020-09-17 10:41 ` [dpdk-dev] [PATCH v2 0/4] remove aliases replaced with IOVA Thomas Monjalon
  2020-09-17 10:41   ` [dpdk-dev] [PATCH v2 1/4] mem: remove physical address aliases Thomas Monjalon
@ 2020-09-17 10:41   ` " Thomas Monjalon
  2020-09-18 14:39     ` Kinsella, Ray
  2020-09-17 10:41   ` [dpdk-dev] [PATCH v2 3/4] mbuf: remove deprecated function and macro aliases Thomas Monjalon
  2020-09-17 10:41   ` [dpdk-dev] [PATCH v2 4/4] mbuf: remove physical address alias Thomas Monjalon
  3 siblings, 1 reply; 23+ messages in thread
From: Thomas Monjalon @ 2020-09-17 10:41 UTC (permalink / raw)
  To: dev
  Cc: david.marchand, mdr, Andrew Rybchenko, John McNamara,
	Marko Kovacevic, Olivier Matz

Remove the deprecated unioned fields physaddr and phys_addr
from the structures rte_mempool_objhdr and rte_mempool_memhdr.
They are replaced with the fields iova which are at the same offsets.

Remove the deprecated macro MEMPOOL_F_NO_PHYS_CONTIG
which is an alias of the more recent MEMPOOL_F_NO_IOVA_CONTIG.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 doc/guides/rel_notes/release_20_11.rst |  6 ++++++
 lib/librte_mempool/rte_mempool.h       | 13 ++-----------
 2 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst
index c49e612c43..71f970f1ac 100644
--- a/doc/guides/rel_notes/release_20_11.rst
+++ b/doc/guides/rel_notes/release_20_11.rst
@@ -88,6 +88,12 @@ API Changes
   the structures ``rte_memseg`` and ``rte_memzone``.
   The field ``iova`` is remaining from the old unions.
 
+* mempool: Removed the unioned fields ``phys_addr`` and ``physaddr`` from
+  the structures ``rte_mempool_memhdr`` and ``rte_mempool_objhdr``.
+  The field ``iova`` is remaining from the old unions.
+  The flag name ``MEMPOOL_F_NO_PHYS_CONTIG`` is removed,
+  while the aliased flag ``MEMPOOL_F_NO_IOVA_CONTIG`` is kept.
+
 * mbuf: Removed the unioned field ``refcnt_atomic`` from
   the structures ``rte_mbuf`` and ``rte_mbuf_ext_shared_info``.
   The field ``refcnt`` is remaining from the old unions.
diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h
index 6ad7e31170..9ea7ff934c 100644
--- a/lib/librte_mempool/rte_mempool.h
+++ b/lib/librte_mempool/rte_mempool.h
@@ -138,11 +138,7 @@ struct rte_mempool_objsz {
 struct rte_mempool_objhdr {
 	STAILQ_ENTRY(rte_mempool_objhdr) next; /**< Next in list. */
 	struct rte_mempool *mp;          /**< The mempool owning the object. */
-	RTE_STD_C11
-	union {
-		rte_iova_t iova;         /**< IO address of the object. */
-		phys_addr_t physaddr;    /**< deprecated - Physical address of the object. */
-	};
+	rte_iova_t iova;                 /**< IO address of the object. */
 #ifdef RTE_LIBRTE_MEMPOOL_DEBUG
 	uint64_t cookie;                 /**< Debug cookie. */
 #endif
@@ -188,11 +184,7 @@ struct rte_mempool_memhdr {
 	STAILQ_ENTRY(rte_mempool_memhdr) next; /**< Next in list. */
 	struct rte_mempool *mp;  /**< The mempool owning the chunk */
 	void *addr;              /**< Virtual address of the chunk */
-	RTE_STD_C11
-	union {
-		rte_iova_t iova;       /**< IO address of the chunk */
-		phys_addr_t phys_addr; /**< Physical address of the chunk */
-	};
+	rte_iova_t iova;         /**< IO address of the chunk */
 	size_t len;              /**< length of the chunk */
 	rte_mempool_memchunk_free_cb_t *free_cb; /**< Free callback */
 	void *opaque;            /**< Argument passed to the free callback */
@@ -269,7 +261,6 @@ struct rte_mempool {
 #define MEMPOOL_F_SC_GET         0x0008 /**< Default get is "single-consumer".*/
 #define MEMPOOL_F_POOL_CREATED   0x0010 /**< Internal: pool is created. */
 #define MEMPOOL_F_NO_IOVA_CONTIG 0x0020 /**< Don't need IOVA contiguous objs. */
-#define MEMPOOL_F_NO_PHYS_CONTIG MEMPOOL_F_NO_IOVA_CONTIG /* deprecated */
 
 /**
  * @internal When debug is enabled, store some statistics.
-- 
2.28.0


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [dpdk-dev] [PATCH v2 3/4] mbuf: remove deprecated function and macro aliases
  2020-09-17 10:41 ` [dpdk-dev] [PATCH v2 0/4] remove aliases replaced with IOVA Thomas Monjalon
  2020-09-17 10:41   ` [dpdk-dev] [PATCH v2 1/4] mem: remove physical address aliases Thomas Monjalon
  2020-09-17 10:41   ` [dpdk-dev] [PATCH v2 2/4] mempool: " Thomas Monjalon
@ 2020-09-17 10:41   ` Thomas Monjalon
  2020-09-17 10:55     ` Hemant Agrawal
  2020-09-18 14:42     ` Kinsella, Ray
  2020-09-17 10:41   ` [dpdk-dev] [PATCH v2 4/4] mbuf: remove physical address alias Thomas Monjalon
  3 siblings, 2 replies; 23+ messages in thread
From: Thomas Monjalon @ 2020-09-17 10:41 UTC (permalink / raw)
  To: dev
  Cc: david.marchand, mdr, Andrew Rybchenko, John McNamara,
	Marko Kovacevic, Nicolas Chautru, Anoob Joseph, Fiona Trahe,
	Ashish Gupta, Somalapuram Amaranath, Akhil Goyal, Hemant Agrawal,
	Nagadheeraj Rottela, Srikanth Jampala, Jay Zhou, Jerin Jacob,
	Nithin Dabilpuram, Kiran Kumar K, Ori Kam, Bruce Richardson,
	Radu Nicolau, Tomasz Kantecki, Sunil Kumar Kori, Pavan Nikhilesh,
	Olivier Matz

Remove the deprecated functions
	- rte_mbuf_data_dma_addr
	- rte_mbuf_data_dma_addr_default
which aliased the more recent functions
	- rte_mbuf_data_iova
	- rte_mbuf_data_iova_default

Remove the deprecated macros
	- rte_pktmbuf_mtophys
	- rte_pktmbuf_mtophys_offset
which aliased the more recent macros
	- rte_pktmbuf_iova
	- rte_pktmbuf_iova_offset

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 doc/guides/rel_notes/release_20_11.rst        |  5 +++
 .../fpga_5gnr_fec/rte_fpga_5gnr_fec.c         | 16 +++----
 drivers/baseband/fpga_lte_fec/fpga_lte_fec.c  | 16 +++----
 drivers/common/cpt/cpt_ucode.h                | 12 +++---
 drivers/compress/qat/qat_comp.c               |  4 +-
 drivers/crypto/ccp/ccp_crypto.c               | 22 +++++-----
 drivers/crypto/dpaa_sec/dpaa_sec.c            | 42 +++++++++----------
 drivers/crypto/nitrox/nitrox_sym_reqmgr.c     |  6 +--
 drivers/crypto/virtio/virtio_rxtx.c           |  6 +--
 drivers/net/axgbe/axgbe_rxtx.c                |  4 +-
 drivers/net/octeontx2/otx2_ethdev_sec_tx.h    |  2 +-
 examples/fips_validation/main.c               |  4 +-
 lib/librte_mbuf/rte_mbuf.h                    | 21 ----------
 13 files changed, 72 insertions(+), 88 deletions(-)

diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst
index 71f970f1ac..a290b44ae5 100644
--- a/doc/guides/rel_notes/release_20_11.rst
+++ b/doc/guides/rel_notes/release_20_11.rst
@@ -94,6 +94,11 @@ API Changes
   The flag name ``MEMPOOL_F_NO_PHYS_CONTIG`` is removed,
   while the aliased flag ``MEMPOOL_F_NO_IOVA_CONTIG`` is kept.
 
+* mbuf: Removed the functions ``rte_mbuf_data_dma_addr*``
+  and the macros ``rte_pktmbuf_mtophys*``.
+  The same functionality is still available with the functions and macros
+  having ``iova`` in their names instead of ``dma_addr`` or ``mtophys``.
+
 * mbuf: Removed the unioned field ``refcnt_atomic`` from
   the structures ``rte_mbuf`` and ``rte_mbuf_ext_shared_info``.
   The field ``refcnt`` is remaining from the old unions.
diff --git a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
index 930718cd47..61f9c04ba2 100644
--- a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
+++ b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
@@ -950,14 +950,14 @@ fpga_dma_desc_te_fill(struct rte_bbdev_enc_op *op,
 	desc->num_null = op->ldpc_enc.n_filler;
 	/* Set inbound data buffer address */
 	desc->in_addr_hi = (uint32_t)(
-			rte_pktmbuf_mtophys_offset(input, in_offset) >> 32);
+			rte_pktmbuf_iova_offset(input, in_offset) >> 32);
 	desc->in_addr_lw = (uint32_t)(
-			rte_pktmbuf_mtophys_offset(input, in_offset));
+			rte_pktmbuf_iova_offset(input, in_offset));
 
 	desc->out_addr_hi = (uint32_t)(
-			rte_pktmbuf_mtophys_offset(output, out_offset) >> 32);
+			rte_pktmbuf_iova_offset(output, out_offset) >> 32);
 	desc->out_addr_lw = (uint32_t)(
-			rte_pktmbuf_mtophys_offset(output, out_offset));
+			rte_pktmbuf_iova_offset(output, out_offset));
 	/* Save software context needed for dequeue */
 	desc->op_addr = op;
 	/* Set total number of CBs in an op */
@@ -998,9 +998,9 @@ fpga_dma_desc_ld_fill(struct rte_bbdev_dec_op *op,
 	desc->error = 0;
 	/* Set inbound data buffer address */
 	desc->in_addr_hi = (uint32_t)(
-			rte_pktmbuf_mtophys_offset(input, in_offset) >> 32);
+			rte_pktmbuf_iova_offset(input, in_offset) >> 32);
 	desc->in_addr_lw = (uint32_t)(
-			rte_pktmbuf_mtophys_offset(input, in_offset));
+			rte_pktmbuf_iova_offset(input, in_offset));
 	desc->rm_e = op->ldpc_dec.cb_params.e;
 	desc->harq_input_length = harq_in_length;
 	desc->et_dis = !check_bit(op->ldpc_dec.op_flags,
@@ -1021,9 +1021,9 @@ fpga_dma_desc_ld_fill(struct rte_bbdev_dec_op *op,
 	desc->max_iter = op->ldpc_dec.iter_max;
 	desc->qm_idx = op->ldpc_dec.q_m / 2;
 	desc->out_addr_hi = (uint32_t)(
-			rte_pktmbuf_mtophys_offset(output, out_offset) >> 32);
+			rte_pktmbuf_iova_offset(output, out_offset) >> 32);
 	desc->out_addr_lw = (uint32_t)(
-			rte_pktmbuf_mtophys_offset(output, out_offset));
+			rte_pktmbuf_iova_offset(output, out_offset));
 	/* Save software context needed for dequeue */
 	desc->op_addr = op;
 	/* Set total number of CBs in an op */
diff --git a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
index 6be9131e72..37018b9c7f 100644
--- a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
+++ b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
@@ -1251,14 +1251,14 @@ fpga_dma_desc_te_fill(struct rte_bbdev_enc_op *op,
 	desc->offset = desc_offset;
 	/* Set inbound data buffer address */
 	desc->in_addr_hi = (uint32_t)(
-			rte_pktmbuf_mtophys_offset(input, in_offset) >> 32);
+			rte_pktmbuf_iova_offset(input, in_offset) >> 32);
 	desc->in_addr_lw = (uint32_t)(
-			rte_pktmbuf_mtophys_offset(input, in_offset));
+			rte_pktmbuf_iova_offset(input, in_offset));
 
 	desc->out_addr_hi = (uint32_t)(
-			rte_pktmbuf_mtophys_offset(output, out_offset) >> 32);
+			rte_pktmbuf_iova_offset(output, out_offset) >> 32);
 	desc->out_addr_lw = (uint32_t)(
-			rte_pktmbuf_mtophys_offset(output, out_offset));
+			rte_pktmbuf_iova_offset(output, out_offset));
 
 	/* Save software context needed for dequeue */
 	desc->op_addr = op;
@@ -1302,9 +1302,9 @@ fpga_dma_desc_td_fill(struct rte_bbdev_dec_op *op,
 	desc->done = 0;
 	/* Set inbound data buffer address */
 	desc->in_addr_hi = (uint32_t)(
-			rte_pktmbuf_mtophys_offset(input, in_offset) >> 32);
+			rte_pktmbuf_iova_offset(input, in_offset) >> 32);
 	desc->in_addr_lw = (uint32_t)(
-			rte_pktmbuf_mtophys_offset(input, in_offset));
+			rte_pktmbuf_iova_offset(input, in_offset));
 	desc->in_len = in_length;
 	desc->k = k;
 	desc->crc_type = !check_bit(op->turbo_dec.op_flags,
@@ -1316,9 +1316,9 @@ fpga_dma_desc_td_fill(struct rte_bbdev_dec_op *op,
 	desc->max_iter = op->turbo_dec.iter_max * 2;
 	desc->offset = desc_offset;
 	desc->out_addr_hi = (uint32_t)(
-			rte_pktmbuf_mtophys_offset(output, out_offset) >> 32);
+			rte_pktmbuf_iova_offset(output, out_offset) >> 32);
 	desc->out_addr_lw = (uint32_t)(
-			rte_pktmbuf_mtophys_offset(output, out_offset));
+			rte_pktmbuf_iova_offset(output, out_offset));
 
 	/* Save software context needed for dequeue */
 	desc->op_addr = op;
diff --git a/drivers/common/cpt/cpt_ucode.h b/drivers/common/cpt/cpt_ucode.h
index 44067cf1b1..4e79fbf7a5 100644
--- a/drivers/common/cpt/cpt_ucode.h
+++ b/drivers/common/cpt/cpt_ucode.h
@@ -2918,7 +2918,7 @@ prepare_iov_from_pkt(struct rte_mbuf *pkt,
 
 	if (!start_offset) {
 		seg_data = rte_pktmbuf_mtod(pkt, void *);
-		seg_phys = rte_pktmbuf_mtophys(pkt);
+		seg_phys = rte_pktmbuf_iova(pkt);
 		seg_size = pkt->data_len;
 	} else {
 		while (start_offset >= pkt->data_len) {
@@ -2927,7 +2927,7 @@ prepare_iov_from_pkt(struct rte_mbuf *pkt,
 		}
 
 		seg_data = rte_pktmbuf_mtod_offset(pkt, void *, start_offset);
-		seg_phys = rte_pktmbuf_mtophys_offset(pkt, start_offset);
+		seg_phys = rte_pktmbuf_iova_offset(pkt, start_offset);
 		seg_size = pkt->data_len - start_offset;
 		if (!seg_size)
 			return 1;
@@ -2942,7 +2942,7 @@ prepare_iov_from_pkt(struct rte_mbuf *pkt,
 
 	while (unlikely(pkt != NULL)) {
 		seg_data = rte_pktmbuf_mtod(pkt, void *);
-		seg_phys = rte_pktmbuf_mtophys(pkt);
+		seg_phys = rte_pktmbuf_iova(pkt);
 		seg_size = pkt->data_len;
 		if (!seg_size)
 			break;
@@ -2972,7 +2972,7 @@ prepare_iov_from_pkt_inplace(struct rte_mbuf *pkt,
 	iov_ptr_t *iovec;
 
 	seg_data = rte_pktmbuf_mtod(pkt, void *);
-	seg_phys = rte_pktmbuf_mtophys(pkt);
+	seg_phys = rte_pktmbuf_iova(pkt);
 	seg_size = pkt->data_len;
 
 	/* first seg */
@@ -3001,7 +3001,7 @@ prepare_iov_from_pkt_inplace(struct rte_mbuf *pkt,
 
 	while (unlikely(pkt != NULL)) {
 		seg_data = rte_pktmbuf_mtod(pkt, void *);
-		seg_phys = rte_pktmbuf_mtophys(pkt);
+		seg_phys = rte_pktmbuf_iova(pkt);
 		seg_size = pkt->data_len;
 
 		if (!seg_size)
@@ -3463,7 +3463,7 @@ fill_digest_params(struct rte_crypto_op *cop,
 			params.mac_buf.vaddr =
 				rte_pktmbuf_mtod_offset(m_dst, void *, off);
 			params.mac_buf.dma_addr =
-				rte_pktmbuf_mtophys_offset(m_dst, off);
+				rte_pktmbuf_iova_offset(m_dst, off);
 			params.mac_buf.size = mac_len;
 		}
 	} else {
diff --git a/drivers/compress/qat/qat_comp.c b/drivers/compress/qat/qat_comp.c
index 335fd63b98..3a064ec3b2 100644
--- a/drivers/compress/qat/qat_comp.c
+++ b/drivers/compress/qat/qat_comp.c
@@ -305,9 +305,9 @@ qat_comp_build_request(void *in_op, uint8_t *out_msg,
 				comp_req->comp_pars.out_buffer_sz;
 
 		comp_req->comn_mid.src_data_addr =
-		    rte_pktmbuf_mtophys_offset(op->m_src, op->src.offset);
+		    rte_pktmbuf_iova_offset(op->m_src, op->src.offset);
 		comp_req->comn_mid.dest_data_addr =
-		    rte_pktmbuf_mtophys_offset(op->m_dst, op->dst.offset);
+		    rte_pktmbuf_iova_offset(op->m_dst, op->dst.offset);
 	}
 
 	if (unlikely(rte_pktmbuf_pkt_len(op->m_dst) < QAT_MIN_OUT_BUF_SIZE)) {
diff --git a/drivers/crypto/ccp/ccp_crypto.c b/drivers/crypto/ccp/ccp_crypto.c
index 4256734d16..db3fb6eff8 100644
--- a/drivers/crypto/ccp/ccp_crypto.c
+++ b/drivers/crypto/ccp/ccp_crypto.c
@@ -1571,7 +1571,7 @@ ccp_perform_hmac(struct rte_crypto_op *op,
 					 ccp_cryptodev_driver_id);
 	addr = session->auth.pre_compute;
 
-	src_addr = rte_pktmbuf_mtophys_offset(op->sym->m_src,
+	src_addr = rte_pktmbuf_iova_offset(op->sym->m_src,
 					      op->sym->auth.data.offset);
 	append_ptr = (void *)rte_pktmbuf_append(op->sym->m_src,
 						session->auth.ctx_len);
@@ -1743,7 +1743,7 @@ ccp_perform_sha(struct rte_crypto_op *op,
 					 op->sym->session,
 					ccp_cryptodev_driver_id);
 
-	src_addr = rte_pktmbuf_mtophys_offset(op->sym->m_src,
+	src_addr = rte_pktmbuf_iova_offset(op->sym->m_src,
 					      op->sym->auth.data.offset);
 
 	append_ptr = (void *)rte_pktmbuf_append(op->sym->m_src,
@@ -1832,7 +1832,7 @@ ccp_perform_sha3_hmac(struct rte_crypto_op *op,
 					 op->sym->session,
 					ccp_cryptodev_driver_id);
 
-	src_addr = rte_pktmbuf_mtophys_offset(op->sym->m_src,
+	src_addr = rte_pktmbuf_iova_offset(op->sym->m_src,
 					      op->sym->auth.data.offset);
 	append_ptr = (uint8_t *)rte_pktmbuf_append(op->sym->m_src,
 						session->auth.ctx_len);
@@ -1972,7 +1972,7 @@ ccp_perform_sha3(struct rte_crypto_op *op,
 					 op->sym->session,
 					ccp_cryptodev_driver_id);
 
-	src_addr = rte_pktmbuf_mtophys_offset(op->sym->m_src,
+	src_addr = rte_pktmbuf_iova_offset(op->sym->m_src,
 					      op->sym->auth.data.offset);
 	append_ptr = (uint8_t *)rte_pktmbuf_append(op->sym->m_src,
 						session->auth.ctx_len);
@@ -2041,7 +2041,7 @@ ccp_perform_aes_cmac(struct rte_crypto_op *op,
 					ccp_cryptodev_driver_id);
 	key_addr = rte_mem_virt2phy(session->auth.key_ccp);
 
-	src_addr = rte_pktmbuf_mtophys_offset(op->sym->m_src,
+	src_addr = rte_pktmbuf_iova_offset(op->sym->m_src,
 					      op->sym->auth.data.offset);
 	append_ptr = (uint8_t *)rte_pktmbuf_append(op->sym->m_src,
 						session->auth.ctx_len);
@@ -2221,10 +2221,10 @@ ccp_perform_aes(struct rte_crypto_op *op,
 
 	desc = &cmd_q->qbase_desc[cmd_q->qidx];
 
-	src_addr = rte_pktmbuf_mtophys_offset(op->sym->m_src,
+	src_addr = rte_pktmbuf_iova_offset(op->sym->m_src,
 					      op->sym->cipher.data.offset);
 	if (likely(op->sym->m_dst != NULL))
-		dest_addr = rte_pktmbuf_mtophys_offset(op->sym->m_dst,
+		dest_addr = rte_pktmbuf_iova_offset(op->sym->m_dst,
 						op->sym->cipher.data.offset);
 	else
 		dest_addr = src_addr;
@@ -2303,11 +2303,11 @@ ccp_perform_3des(struct rte_crypto_op *op,
 		return -ENOTSUP;
 	}
 
-	src_addr = rte_pktmbuf_mtophys_offset(op->sym->m_src,
+	src_addr = rte_pktmbuf_iova_offset(op->sym->m_src,
 					      op->sym->cipher.data.offset);
 	if (unlikely(op->sym->m_dst != NULL))
 		dest_addr =
-			rte_pktmbuf_mtophys_offset(op->sym->m_dst,
+			rte_pktmbuf_iova_offset(op->sym->m_dst,
 						   op->sym->cipher.data.offset);
 	else
 		dest_addr = src_addr;
@@ -2385,10 +2385,10 @@ ccp_perform_aes_gcm(struct rte_crypto_op *op, struct ccp_queue *cmd_q)
 	iv = rte_crypto_op_ctod_offset(op, uint8_t *, session->iv.offset);
 	key_addr = session->cipher.key_phys;
 
-	src_addr = rte_pktmbuf_mtophys_offset(op->sym->m_src,
+	src_addr = rte_pktmbuf_iova_offset(op->sym->m_src,
 					      op->sym->aead.data.offset);
 	if (unlikely(op->sym->m_dst != NULL))
-		dest_addr = rte_pktmbuf_mtophys_offset(op->sym->m_dst,
+		dest_addr = rte_pktmbuf_iova_offset(op->sym->m_dst,
 						op->sym->aead.data.offset);
 	else
 		dest_addr = src_addr;
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index c4339336de..97002170b0 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -748,7 +748,7 @@ build_auth_only_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
 		sg++;
 	}
 
-	qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
+	qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
 	sg->offset = data_offset;
 
 	if (data_len <= (mbuf->data_len - data_offset)) {
@@ -761,7 +761,7 @@ build_auth_only_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
 		       (mbuf = mbuf->next)) {
 			cpu_to_hw_sg(sg);
 			sg++;
-			qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
+			qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
 			if (data_len > mbuf->data_len)
 				sg->length = mbuf->data_len;
 			else
@@ -866,7 +866,7 @@ build_auth_only(struct rte_crypto_op *op, dpaa_sec_session *ses)
 		sg++;
 	}
 
-	qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
+	qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
 	sg->offset = data_offset;
 	sg->length = data_len;
 
@@ -946,7 +946,7 @@ build_cipher_only_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
 
 	/* 1st seg */
 	sg = &cf->sg[2];
-	qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
+	qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
 	sg->length = mbuf->data_len - data_offset;
 	sg->offset = data_offset;
 
@@ -955,7 +955,7 @@ build_cipher_only_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
 	while (mbuf) {
 		cpu_to_hw_sg(sg);
 		sg++;
-		qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
+		qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
 		sg->length = mbuf->data_len;
 		mbuf = mbuf->next;
 	}
@@ -980,7 +980,7 @@ build_cipher_only_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
 
 	/* 1st seg */
 	sg++;
-	qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
+	qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
 	sg->length = mbuf->data_len - data_offset;
 	sg->offset = data_offset;
 
@@ -989,7 +989,7 @@ build_cipher_only_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
 	while (mbuf) {
 		cpu_to_hw_sg(sg);
 		sg++;
-		qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
+		qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
 		sg->length = mbuf->data_len;
 		mbuf = mbuf->next;
 	}
@@ -1121,7 +1121,7 @@ build_cipher_auth_gcm_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
 	cpu_to_hw_sg(out_sg);
 
 	/* 1st seg */
-	qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
+	qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
 	sg->length = mbuf->data_len - sym->aead.data.offset;
 	sg->offset = sym->aead.data.offset;
 
@@ -1130,7 +1130,7 @@ build_cipher_auth_gcm_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
 	while (mbuf) {
 		cpu_to_hw_sg(sg);
 		sg++;
-		qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
+		qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
 		sg->length = mbuf->data_len;
 		mbuf = mbuf->next;
 	}
@@ -1178,7 +1178,7 @@ build_cipher_auth_gcm_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
 
 	/* 3rd seg */
 	sg++;
-	qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
+	qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
 	sg->length = mbuf->data_len - sym->aead.data.offset;
 	sg->offset = sym->aead.data.offset;
 
@@ -1187,7 +1187,7 @@ build_cipher_auth_gcm_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
 	while (mbuf) {
 		cpu_to_hw_sg(sg);
 		sg++;
-		qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
+		qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
 		sg->length = mbuf->data_len;
 		mbuf = mbuf->next;
 	}
@@ -1367,7 +1367,7 @@ build_cipher_auth_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
 	cpu_to_hw_sg(out_sg);
 
 	/* 1st seg */
-	qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
+	qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
 	sg->length = mbuf->data_len - sym->auth.data.offset;
 	sg->offset = sym->auth.data.offset;
 
@@ -1376,7 +1376,7 @@ build_cipher_auth_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
 	while (mbuf) {
 		cpu_to_hw_sg(sg);
 		sg++;
-		qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
+		qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
 		sg->length = mbuf->data_len;
 		mbuf = mbuf->next;
 	}
@@ -1415,7 +1415,7 @@ build_cipher_auth_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
 
 	/* 2nd seg */
 	sg++;
-	qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
+	qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
 	sg->length = mbuf->data_len - sym->auth.data.offset;
 	sg->offset = sym->auth.data.offset;
 
@@ -1424,7 +1424,7 @@ build_cipher_auth_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
 	while (mbuf) {
 		cpu_to_hw_sg(sg);
 		sg++;
-		qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
+		qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
 		sg->length = mbuf->data_len;
 		mbuf = mbuf->next;
 	}
@@ -1555,10 +1555,10 @@ build_proto(struct rte_crypto_op *op, dpaa_sec_session *ses)
 	cf = &ctx->job;
 	ctx->op = op;
 
-	src_start_addr = rte_pktmbuf_mtophys(sym->m_src);
+	src_start_addr = rte_pktmbuf_iova(sym->m_src);
 
 	if (sym->m_dst)
-		dst_start_addr = rte_pktmbuf_mtophys(sym->m_dst);
+		dst_start_addr = rte_pktmbuf_iova(sym->m_dst);
 	else
 		dst_start_addr = src_start_addr;
 
@@ -1614,7 +1614,7 @@ build_proto_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
 
 	/* 1st seg */
 	sg = &cf->sg[2];
-	qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
+	qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
 	sg->offset = 0;
 
 	/* Successive segs */
@@ -1624,7 +1624,7 @@ build_proto_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
 		mbuf = mbuf->next;
 		cpu_to_hw_sg(sg);
 		sg++;
-		qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
+		qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
 		sg->offset = 0;
 	}
 	sg->length = mbuf->buf_len - mbuf->data_off;
@@ -1646,7 +1646,7 @@ build_proto_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
 	qm_sg_entry_set64(in_sg, rte_dpaa_mem_vtop(sg));
 
 	/* 1st seg */
-	qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
+	qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
 	sg->length = mbuf->data_len;
 	sg->offset = 0;
 
@@ -1655,7 +1655,7 @@ build_proto_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
 	while (mbuf) {
 		cpu_to_hw_sg(sg);
 		sg++;
-		qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
+		qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
 		sg->length = mbuf->data_len;
 		sg->offset = 0;
 		in_len += sg->length;
diff --git a/drivers/crypto/nitrox/nitrox_sym_reqmgr.c b/drivers/crypto/nitrox/nitrox_sym_reqmgr.c
index d9b4267764..4492247801 100644
--- a/drivers/crypto/nitrox/nitrox_sym_reqmgr.c
+++ b/drivers/crypto/nitrox/nitrox_sym_reqmgr.c
@@ -269,7 +269,7 @@ extract_cipher_auth_digest(struct nitrox_softreq *sr,
 	       op->sym->auth.data.length + digest->len))
 		return -EINVAL;
 
-	digest->iova = rte_pktmbuf_mtophys_offset(mdst,
+	digest->iova = rte_pktmbuf_iova_offset(mdst,
 					op->sym->auth.data.offset +
 					op->sym->auth.data.length);
 	digest->virt = rte_pktmbuf_mtod_offset(mdst, uint8_t *,
@@ -318,7 +318,7 @@ create_sglist_from_mbuf(struct nitrox_sgtable *sgtbl, struct rte_mbuf *mbuf,
 	if (datalen <= mlen)
 		mlen = datalen;
 	sglist[cnt].len = mlen;
-	sglist[cnt].iova = rte_pktmbuf_mtophys_offset(m, off);
+	sglist[cnt].iova = rte_pktmbuf_iova_offset(m, off);
 	sglist[cnt].virt = rte_pktmbuf_mtod_offset(m, uint8_t *, off);
 	sgtbl->total_bytes += mlen;
 	cnt++;
@@ -327,7 +327,7 @@ create_sglist_from_mbuf(struct nitrox_sgtable *sgtbl, struct rte_mbuf *mbuf,
 		mlen = rte_pktmbuf_data_len(m) < datalen ?
 			rte_pktmbuf_data_len(m) : datalen;
 		sglist[cnt].len = mlen;
-		sglist[cnt].iova = rte_pktmbuf_mtophys(m);
+		sglist[cnt].iova = rte_pktmbuf_iova(m);
 		sglist[cnt].virt = rte_pktmbuf_mtod(m, uint8_t *);
 		sgtbl->total_bytes += mlen;
 		cnt++;
diff --git a/drivers/crypto/virtio/virtio_rxtx.c b/drivers/crypto/virtio/virtio_rxtx.c
index e9a63cb5a0..e1cb4ad104 100644
--- a/drivers/crypto/virtio/virtio_rxtx.c
+++ b/drivers/crypto/virtio/virtio_rxtx.c
@@ -284,18 +284,18 @@ virtqueue_crypto_sym_enqueue_xmit(
 	}
 
 	/* indirect vring: src data */
-	desc[idx].addr = rte_pktmbuf_mtophys_offset(sym_op->m_src, 0);
+	desc[idx].addr = rte_pktmbuf_iova_offset(sym_op->m_src, 0);
 	desc[idx].len = (sym_op->cipher.data.offset
 		+ sym_op->cipher.data.length);
 	desc[idx++].flags = VRING_DESC_F_NEXT;
 
 	/* indirect vring: dst data */
 	if (sym_op->m_dst) {
-		desc[idx].addr = rte_pktmbuf_mtophys_offset(sym_op->m_dst, 0);
+		desc[idx].addr = rte_pktmbuf_iova_offset(sym_op->m_dst, 0);
 		desc[idx].len = (sym_op->cipher.data.offset
 			+ sym_op->cipher.data.length);
 	} else {
-		desc[idx].addr = rte_pktmbuf_mtophys_offset(sym_op->m_src, 0);
+		desc[idx].addr = rte_pktmbuf_iova_offset(sym_op->m_src, 0);
 		desc[idx].len = (sym_op->cipher.data.offset
 			+ sym_op->cipher.data.length);
 	}
diff --git a/drivers/net/axgbe/axgbe_rxtx.c b/drivers/net/axgbe/axgbe_rxtx.c
index 30c467db71..da3a9822b8 100644
--- a/drivers/net/axgbe/axgbe_rxtx.c
+++ b/drivers/net/axgbe/axgbe_rxtx.c
@@ -95,7 +95,7 @@ int axgbe_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 		axgbe_rx_queue_release(rxq);
 		return -ENOMEM;
 	}
-	rxq->ring_phys_addr = (uint64_t)dma->phys_addr;
+	rxq->ring_phys_addr = (uint64_t)dma->iova;
 	rxq->desc = (volatile union axgbe_rx_desc *)dma->addr;
 	memset((void *)rxq->desc, 0, size);
 	/* Allocate software ring */
@@ -530,7 +530,7 @@ int axgbe_dev_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 		return -ENOMEM;
 	}
 	memset(tz->addr, 0, tsize);
-	txq->ring_phys_addr = (uint64_t)tz->phys_addr;
+	txq->ring_phys_addr = (uint64_t)tz->iova;
 	txq->desc = tz->addr;
 	txq->queue_id = queue_idx;
 	txq->port_id = dev->data->port_id;
diff --git a/drivers/net/octeontx2/otx2_ethdev_sec_tx.h b/drivers/net/octeontx2/otx2_ethdev_sec_tx.h
index f8130ca624..15122b4154 100644
--- a/drivers/net/octeontx2/otx2_ethdev_sec_tx.h
+++ b/drivers/net/octeontx2/otx2_ethdev_sec_tx.h
@@ -87,7 +87,7 @@ otx2_sec_event_tx(struct otx2_ssogws *ws, struct rte_event *ev,
 	 */
 	rte_pktmbuf_append(m, extend_tail);
 	data = rte_pktmbuf_prepend(m, extend_head);
-	data_addr = rte_pktmbuf_mtophys(m);
+	data_addr = rte_pktmbuf_iova(m);
 
 	/*
 	 * Move the Ethernet header, to insert otx2_ipsec_fp_out_hdr prior
diff --git a/examples/fips_validation/main.c b/examples/fips_validation/main.c
index efd32a86a5..0a1c8b568c 100644
--- a/examples/fips_validation/main.c
+++ b/examples/fips_validation/main.c
@@ -531,7 +531,7 @@ prepare_auth_op(void)
 
 	sym->auth.data.length = vec.pt.len;
 	sym->auth.digest.data = pt + vec.pt.len;
-	sym->auth.digest.phys_addr = rte_pktmbuf_mtophys_offset(
+	sym->auth.digest.phys_addr = rte_pktmbuf_iova_offset(
 			env.mbuf, vec.pt.len);
 
 	memcpy(pt, vec.pt.val, vec.pt.len);
@@ -584,7 +584,7 @@ prepare_aead_op(void)
 		memcpy(pt, vec.pt.val, vec.pt.len);
 		sym->aead.data.length = vec.pt.len;
 		sym->aead.digest.data = pt + vec.pt.len;
-		sym->aead.digest.phys_addr = rte_pktmbuf_mtophys_offset(
+		sym->aead.digest.phys_addr = rte_pktmbuf_iova_offset(
 				env.mbuf, vec.pt.len);
 	} else {
 		uint8_t *ct;
diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index 7259575a77..a1414ed7cd 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -151,13 +151,6 @@ rte_mbuf_data_iova(const struct rte_mbuf *mb)
 	return mb->buf_iova + mb->data_off;
 }
 
-__rte_deprecated
-static inline phys_addr_t
-rte_mbuf_data_dma_addr(const struct rte_mbuf *mb)
-{
-	return rte_mbuf_data_iova(mb);
-}
-
 /**
  * Return the default IO address of the beginning of the mbuf data
  *
@@ -176,13 +169,6 @@ rte_mbuf_data_iova_default(const struct rte_mbuf *mb)
 	return mb->buf_iova + RTE_PKTMBUF_HEADROOM;
 }
 
-__rte_deprecated
-static inline phys_addr_t
-rte_mbuf_data_dma_addr_default(const struct rte_mbuf *mb)
-{
-	return rte_mbuf_data_iova_default(mb);
-}
-
 /**
  * Return the mbuf owning the data buffer address of an indirect mbuf.
  *
@@ -1537,13 +1523,6 @@ static inline struct rte_mbuf *rte_pktmbuf_lastseg(struct rte_mbuf *m)
 	return m;
 }
 
-/* deprecated */
-#define rte_pktmbuf_mtophys_offset(m, o) \
-	rte_pktmbuf_iova_offset(m, o)
-
-/* deprecated */
-#define rte_pktmbuf_mtophys(m) rte_pktmbuf_iova(m)
-
 /**
  * A macro that returns the length of the packet.
  *
-- 
2.28.0


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [dpdk-dev] [PATCH v2 4/4] mbuf: remove physical address alias
  2020-09-17 10:41 ` [dpdk-dev] [PATCH v2 0/4] remove aliases replaced with IOVA Thomas Monjalon
                     ` (2 preceding siblings ...)
  2020-09-17 10:41   ` [dpdk-dev] [PATCH v2 3/4] mbuf: remove deprecated function and macro aliases Thomas Monjalon
@ 2020-09-17 10:41   ` Thomas Monjalon
  2020-09-18 14:43     ` Kinsella, Ray
  3 siblings, 1 reply; 23+ messages in thread
From: Thomas Monjalon @ 2020-09-17 10:41 UTC (permalink / raw)
  To: dev
  Cc: david.marchand, mdr, Andrew Rybchenko, Neil Horman,
	John McNamara, Marko Kovacevic, Anoob Joseph, Beilei Xing,
	Jeff Guo, Jingjing Wu, Qiming Yang, Qi Zhang, Ferruh Yigit,
	Olivier Matz

Remove the deprecated buf_physaddr union field from rte_mbuf.
It is replaced with buf_iova which is at the same offset.

The single field buf_physaddr in rte_kni_mbuf is also renamed.

This concludes a 3-year process of semantic change.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 doc/guides/rel_notes/deprecation.rst          |  2 --
 doc/guides/rel_notes/release_20_11.rst        |  3 +++
 drivers/common/cpt/cpt_ucode.h                |  2 +-
 drivers/net/i40e/i40e_rxtx_vec_avx2.c         | 18 +++++++++---------
 drivers/net/iavf/iavf_rxtx_vec_avx2.c         | 18 +++++++++---------
 drivers/net/ice/ice_rxtx_vec_avx2.c           | 18 +++++++++---------
 kernel/linux/kni/kni_net.c                    |  6 +++---
 lib/librte_eal/linux/include/rte_kni_common.h |  2 +-
 lib/librte_mbuf/rte_mbuf_core.h               |  6 +-----
 9 files changed, 36 insertions(+), 39 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 52168f7751..143b7694a5 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -148,8 +148,6 @@ Deprecation Notices
   avoiding impact on vectorized implementation of the driver datapaths,
   while evaluating performance gains of a better use of the first cache line.
 
-  The deprecated unioned field ``buf_physaddr`` will be removed in DPDK 20.11.
-
 * ethdev: Split the ``struct eth_dev_ops`` struct to hide it as much as possible
   will be done in 20.11.
   Currently the ``struct eth_dev_ops`` struct is accessible by the application
diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst
index a290b44ae5..4a7f6f4b6c 100644
--- a/doc/guides/rel_notes/release_20_11.rst
+++ b/doc/guides/rel_notes/release_20_11.rst
@@ -99,6 +99,9 @@ API Changes
   The same functionality is still available with the functions and macros
   having ``iova`` in their names instead of ``dma_addr`` or ``mtophys``.
 
+* mbuf: Removed the unioned field ``buf_physaddr`` from ``rte_mbuf``.
+  The field ``buf_iova`` is remaining from the old union.
+
 * mbuf: Removed the unioned field ``refcnt_atomic`` from
   the structures ``rte_mbuf`` and ``rte_mbuf_ext_shared_info``.
   The field ``refcnt`` is remaining from the old unions.
diff --git a/drivers/common/cpt/cpt_ucode.h b/drivers/common/cpt/cpt_ucode.h
index 4e79fbf7a5..763355fb1f 100644
--- a/drivers/common/cpt/cpt_ucode.h
+++ b/drivers/common/cpt/cpt_ucode.h
@@ -2862,7 +2862,7 @@ alloc_op_meta(struct rte_mbuf *m_src,
 		tailroom = rte_pktmbuf_tailroom(m_src);
 		if (likely(tailroom > len + 8)) {
 			mdata = (uint8_t *)m_src->buf_addr + m_src->buf_len;
-			mphys = m_src->buf_physaddr + m_src->buf_len;
+			mphys = m_src->buf_iova + m_src->buf_len;
 			mdata -= len;
 			mphys -= len;
 			buf->vaddr = mdata;
diff --git a/drivers/net/i40e/i40e_rxtx_vec_avx2.c b/drivers/net/i40e/i40e_rxtx_vec_avx2.c
index 3bcef13638..37e7db5d7e 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_avx2.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_avx2.c
@@ -59,8 +59,8 @@ i40e_rxq_rearm(struct i40e_rx_queue *rxq)
 		mb0 = rxep[0].mbuf;
 		mb1 = rxep[1].mbuf;
 
-		/* load buf_addr(lo 64bit) and buf_physaddr(hi 64bit) */
-		RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_physaddr) !=
+		/* load buf_addr(lo 64bit) and buf_iova(hi 64bit) */
+		RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_iova) !=
 				offsetof(struct rte_mbuf, buf_addr) + 8);
 		vaddr0 = _mm_loadu_si128((__m128i *)&mb0->buf_addr);
 		vaddr1 = _mm_loadu_si128((__m128i *)&mb1->buf_addr);
@@ -92,8 +92,8 @@ i40e_rxq_rearm(struct i40e_rx_queue *rxq)
 		mb2 = rxep[2].mbuf;
 		mb3 = rxep[3].mbuf;
 
-		/* load buf_addr(lo 64bit) and buf_physaddr(hi 64bit) */
-		RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_physaddr) !=
+		/* load buf_addr(lo 64bit) and buf_iova(hi 64bit) */
+		RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_iova) !=
 				offsetof(struct rte_mbuf, buf_addr) + 8);
 		vaddr0 = _mm_loadu_si128((__m128i *)&mb0->buf_addr);
 		vaddr1 = _mm_loadu_si128((__m128i *)&mb1->buf_addr);
@@ -814,7 +814,7 @@ vtx1(volatile struct i40e_tx_desc *txdp,
 			((uint64_t)pkt->data_len << I40E_TXD_QW1_TX_BUF_SZ_SHIFT));
 
 	__m128i descriptor = _mm_set_epi64x(high_qw,
-				pkt->buf_physaddr + pkt->data_off);
+				pkt->buf_iova + pkt->data_off);
 	_mm_store_si128((__m128i *)txdp, descriptor);
 }
 
@@ -843,11 +843,11 @@ vtx(volatile struct i40e_tx_desc *txdp,
 				((uint64_t)pkt[0]->data_len << I40E_TXD_QW1_TX_BUF_SZ_SHIFT);
 
 		__m256i desc2_3 = _mm256_set_epi64x(
-				hi_qw3, pkt[3]->buf_physaddr + pkt[3]->data_off,
-				hi_qw2, pkt[2]->buf_physaddr + pkt[2]->data_off);
+				hi_qw3, pkt[3]->buf_iova + pkt[3]->data_off,
+				hi_qw2, pkt[2]->buf_iova + pkt[2]->data_off);
 		__m256i desc0_1 = _mm256_set_epi64x(
-				hi_qw1, pkt[1]->buf_physaddr + pkt[1]->data_off,
-				hi_qw0, pkt[0]->buf_physaddr + pkt[0]->data_off);
+				hi_qw1, pkt[1]->buf_iova + pkt[1]->data_off,
+				hi_qw0, pkt[0]->buf_iova + pkt[0]->data_off);
 		_mm256_store_si256((void *)(txdp + 2), desc2_3);
 		_mm256_store_si256((void *)txdp, desc0_1);
 	}
diff --git a/drivers/net/iavf/iavf_rxtx_vec_avx2.c b/drivers/net/iavf/iavf_rxtx_vec_avx2.c
index e5e0fd3095..8f28afc8c5 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_avx2.c
+++ b/drivers/net/iavf/iavf_rxtx_vec_avx2.c
@@ -52,8 +52,8 @@ iavf_rxq_rearm(struct iavf_rx_queue *rxq)
 		mb0 = rxp[0];
 		mb1 = rxp[1];
 
-		/* load buf_addr(lo 64bit) and buf_physaddr(hi 64bit) */
-		RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_physaddr) !=
+		/* load buf_addr(lo 64bit) and buf_iova(hi 64bit) */
+		RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_iova) !=
 				offsetof(struct rte_mbuf, buf_addr) + 8);
 		vaddr0 = _mm_loadu_si128((__m128i *)&mb0->buf_addr);
 		vaddr1 = _mm_loadu_si128((__m128i *)&mb1->buf_addr);
@@ -85,8 +85,8 @@ iavf_rxq_rearm(struct iavf_rx_queue *rxq)
 		mb2 = rxp[2];
 		mb3 = rxp[3];
 
-		/* load buf_addr(lo 64bit) and buf_physaddr(hi 64bit) */
-		RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_physaddr) !=
+		/* load buf_addr(lo 64bit) and buf_iova(hi 64bit) */
+		RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_iova) !=
 				offsetof(struct rte_mbuf, buf_addr) + 8);
 		vaddr0 = _mm_loadu_si128((__m128i *)&mb0->buf_addr);
 		vaddr1 = _mm_loadu_si128((__m128i *)&mb1->buf_addr);
@@ -1391,7 +1391,7 @@ iavf_vtx1(volatile struct iavf_tx_desc *txdp,
 		 ((uint64_t)pkt->data_len << IAVF_TXD_QW1_TX_BUF_SZ_SHIFT));
 
 	__m128i descriptor = _mm_set_epi64x(high_qw,
-				pkt->buf_physaddr + pkt->data_off);
+				pkt->buf_iova + pkt->data_off);
 	_mm_store_si128((__m128i *)txdp, descriptor);
 }
 
@@ -1430,15 +1430,15 @@ iavf_vtx(volatile struct iavf_tx_desc *txdp,
 		__m256i desc2_3 =
 			_mm256_set_epi64x
 				(hi_qw3,
-				 pkt[3]->buf_physaddr + pkt[3]->data_off,
+				 pkt[3]->buf_iova + pkt[3]->data_off,
 				 hi_qw2,
-				 pkt[2]->buf_physaddr + pkt[2]->data_off);
+				 pkt[2]->buf_iova + pkt[2]->data_off);
 		__m256i desc0_1 =
 			_mm256_set_epi64x
 				(hi_qw1,
-				 pkt[1]->buf_physaddr + pkt[1]->data_off,
+				 pkt[1]->buf_iova + pkt[1]->data_off,
 				 hi_qw0,
-				 pkt[0]->buf_physaddr + pkt[0]->data_off);
+				 pkt[0]->buf_iova + pkt[0]->data_off);
 		_mm256_store_si256((void *)(txdp + 2), desc2_3);
 		_mm256_store_si256((void *)txdp, desc0_1);
 	}
diff --git a/drivers/net/ice/ice_rxtx_vec_avx2.c b/drivers/net/ice/ice_rxtx_vec_avx2.c
index be50677c2f..b653805160 100644
--- a/drivers/net/ice/ice_rxtx_vec_avx2.c
+++ b/drivers/net/ice/ice_rxtx_vec_avx2.c
@@ -52,8 +52,8 @@ ice_rxq_rearm(struct ice_rx_queue *rxq)
 		mb0 = rxep[0].mbuf;
 		mb1 = rxep[1].mbuf;
 
-		/* load buf_addr(lo 64bit) and buf_physaddr(hi 64bit) */
-		RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_physaddr) !=
+		/* load buf_addr(lo 64bit) and buf_iova(hi 64bit) */
+		RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_iova) !=
 				offsetof(struct rte_mbuf, buf_addr) + 8);
 		vaddr0 = _mm_loadu_si128((__m128i *)&mb0->buf_addr);
 		vaddr1 = _mm_loadu_si128((__m128i *)&mb1->buf_addr);
@@ -85,8 +85,8 @@ ice_rxq_rearm(struct ice_rx_queue *rxq)
 		mb2 = rxep[2].mbuf;
 		mb3 = rxep[3].mbuf;
 
-		/* load buf_addr(lo 64bit) and buf_physaddr(hi 64bit) */
-		RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_physaddr) !=
+		/* load buf_addr(lo 64bit) and buf_iova(hi 64bit) */
+		RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_iova) !=
 				offsetof(struct rte_mbuf, buf_addr) + 8);
 		vaddr0 = _mm_loadu_si128((__m128i *)&mb0->buf_addr);
 		vaddr1 = _mm_loadu_si128((__m128i *)&mb1->buf_addr);
@@ -689,7 +689,7 @@ ice_vtx1(volatile struct ice_tx_desc *txdp,
 		 ((uint64_t)pkt->data_len << ICE_TXD_QW1_TX_BUF_SZ_S));
 
 	__m128i descriptor = _mm_set_epi64x(high_qw,
-				pkt->buf_physaddr + pkt->data_off);
+				pkt->buf_iova + pkt->data_off);
 	_mm_store_si128((__m128i *)txdp, descriptor);
 }
 
@@ -728,15 +728,15 @@ ice_vtx(volatile struct ice_tx_desc *txdp,
 		__m256i desc2_3 =
 			_mm256_set_epi64x
 				(hi_qw3,
-				 pkt[3]->buf_physaddr + pkt[3]->data_off,
+				 pkt[3]->buf_iova + pkt[3]->data_off,
 				 hi_qw2,
-				 pkt[2]->buf_physaddr + pkt[2]->data_off);
+				 pkt[2]->buf_iova + pkt[2]->data_off);
 		__m256i desc0_1 =
 			_mm256_set_epi64x
 				(hi_qw1,
-				 pkt[1]->buf_physaddr + pkt[1]->data_off,
+				 pkt[1]->buf_iova + pkt[1]->data_off,
 				 hi_qw0,
-				 pkt[0]->buf_physaddr + pkt[0]->data_off);
+				 pkt[0]->buf_iova + pkt[0]->data_off);
 		_mm256_store_si256((void *)(txdp + 2), desc2_3);
 		_mm256_store_si256((void *)txdp, desc0_1);
 	}
diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c
index c82c881a2c..4b752083da 100644
--- a/kernel/linux/kni/kni_net.c
+++ b/kernel/linux/kni/kni_net.c
@@ -47,7 +47,7 @@ iova2kva(struct kni_dev *kni, void *iova)
 static inline void *
 iova2data_kva(struct kni_dev *kni, struct rte_kni_mbuf *m)
 {
-	return phys_to_virt(iova_to_phys(kni->usr_tsk, m->buf_physaddr) +
+	return phys_to_virt(iova_to_phys(kni->usr_tsk, m->buf_iova) +
 			    m->data_off);
 }
 #endif
@@ -67,7 +67,7 @@ pa2va(void *pa, struct rte_kni_mbuf *m)
 
 	va = (void *)((unsigned long)pa +
 			(unsigned long)m->buf_addr -
-			(unsigned long)m->buf_physaddr);
+			(unsigned long)m->buf_iova);
 	return va;
 }
 
@@ -75,7 +75,7 @@ pa2va(void *pa, struct rte_kni_mbuf *m)
 static void *
 kva2data_kva(struct rte_kni_mbuf *m)
 {
-	return phys_to_virt(m->buf_physaddr + m->data_off);
+	return phys_to_virt(m->buf_iova + m->data_off);
 }
 
 static inline void *
diff --git a/lib/librte_eal/linux/include/rte_kni_common.h b/lib/librte_eal/linux/include/rte_kni_common.h
index 7313ef504e..21b477f0aa 100644
--- a/lib/librte_eal/linux/include/rte_kni_common.h
+++ b/lib/librte_eal/linux/include/rte_kni_common.h
@@ -75,7 +75,7 @@ struct rte_kni_fifo {
  */
 struct rte_kni_mbuf {
 	void *buf_addr __attribute__((__aligned__(RTE_CACHE_LINE_SIZE)));
-	uint64_t buf_physaddr;
+	uint64_t buf_iova;
 	uint16_t data_off;      /**< Start address of data in segment buffer. */
 	char pad1[2];
 	uint16_t nb_segs;       /**< Number of segments. */
diff --git a/lib/librte_mbuf/rte_mbuf_core.h b/lib/librte_mbuf/rte_mbuf_core.h
index cee3d5aff5..8c2c20644d 100644
--- a/lib/librte_mbuf/rte_mbuf_core.h
+++ b/lib/librte_mbuf/rte_mbuf_core.h
@@ -476,11 +476,7 @@ struct rte_mbuf {
 	 * same mbuf cacheline0 layout for 32-bit and 64-bit. This makes
 	 * working on vector drivers easier.
 	 */
-	RTE_STD_C11
-	union {
-		rte_iova_t buf_iova;
-		rte_iova_t buf_physaddr; /**< deprecated */
-	} __rte_aligned(sizeof(rte_iova_t));
+	rte_iova_t buf_iova __rte_aligned(sizeof(rte_iova_t));
 
 	/* next 8 bytes are initialised on RX descriptor rearm */
 	RTE_MARKER64 rearm_data;
-- 
2.28.0


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [dpdk-dev] [PATCH v2 1/4] mem: remove physical address aliases
  2020-09-17 10:41   ` [dpdk-dev] [PATCH v2 1/4] mem: remove physical address aliases Thomas Monjalon
@ 2020-09-17 10:53     ` Hemant Agrawal
  2020-09-18 14:38     ` Kinsella, Ray
  1 sibling, 0 replies; 23+ messages in thread
From: Hemant Agrawal @ 2020-09-17 10:53 UTC (permalink / raw)
  To: dev


On 9/17/2020 4:11 PM, Thomas Monjalon wrote:
> Remove the deprecated unioned fields phys_addr
> from the structures rte_memseg and rte_memzone.
> They are replaced with the fields iova which are at the same offsets.
>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
> ---
>   doc/guides/rel_notes/release_20_11.rst            |  4 ++++
>   drivers/bus/fslmc/portal/dpaa2_hw_pvt.h           |  2 +-
>   drivers/common/dpaax/dpaax_iova_table.c           |  2 +-
>   drivers/compress/qat/qat_comp.c                   |  2 +-
>   drivers/compress/qat/qat_comp_pmd.c               |  2 +-
>   drivers/crypto/ccp/ccp_dev.c                      |  2 +-
>   drivers/crypto/octeontx/otx_cryptodev_hw_access.c |  2 +-
>   drivers/crypto/virtio/virtio_cryptodev.c          |  6 +++---
>   drivers/net/ice/base/ice_osdep.h                  |  2 +-
>   drivers/net/pfe/base/pfe.h                        |  2 +-
>   lib/librte_eal/include/rte_memory.h               |  6 +-----
>   lib/librte_eal/include/rte_memzone.h              |  6 +-----
>   lib/librte_kni/rte_kni.c                          | 14 +++++++-------
>   13 files changed, 24 insertions(+), 28 deletions(-)
>
> diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst
> index b729bdf200..c49e612c43 100644
> --- a/doc/guides/rel_notes/release_20_11.rst
> +++ b/doc/guides/rel_notes/release_20_11.rst
> @@ -84,6 +84,10 @@ API Changes
>      Also, make sure to start the actual text at the margin.
>      =======================================================
>   
> +* mem: Removed the unioned field ``phys_addr`` from
> +  the structures ``rte_memseg`` and ``rte_memzone``.
> +  The field ``iova`` is remaining from the old unions.
> +
>   * mbuf: Removed the unioned field ``refcnt_atomic`` from
>     the structures ``rte_mbuf`` and ``rte_mbuf_ext_shared_info``.
>     The field ``refcnt`` is remaining from the old unions.
> diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
> index 35423df12b..2dd53c63ba 100644
> --- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
> +++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
> @@ -368,7 +368,7 @@ static phys_addr_t dpaa2_mem_vtop(uint64_t vaddr)
>   
>   	memseg = rte_mem_virt2memseg((void *)(uintptr_t)vaddr, NULL);
>   	if (memseg)
> -		return memseg->phys_addr + RTE_PTR_DIFF(vaddr, memseg->addr);
> +		return memseg->iova + RTE_PTR_DIFF(vaddr, memseg->addr);
>   	return (size_t)NULL;
>   }
>   
> diff --git a/drivers/common/dpaax/dpaax_iova_table.c b/drivers/common/dpaax/dpaax_iova_table.c
> index 5ba8ed1933..91bee65e7b 100644
> --- a/drivers/common/dpaax/dpaax_iova_table.c
> +++ b/drivers/common/dpaax/dpaax_iova_table.c
> @@ -440,7 +440,7 @@ dpaax_memevent_walk_memsegs(const struct rte_memseg_list *msl __rte_unused,
>   			    void *arg __rte_unused)
>   {
>   	DPAAX_DEBUG("Walking for %p (pa=%"PRIu64") and len %zu",
> -		    ms->addr, ms->phys_addr, len);
> +		    ms->addr, ms->iova, len);
>   	dpaax_iova_table_update(rte_mem_virt2phy(ms->addr), ms->addr, len);
>   	return 0;
>   }


Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>



^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [dpdk-dev] [PATCH v2 3/4] mbuf: remove deprecated function and macro aliases
  2020-09-17 10:41   ` [dpdk-dev] [PATCH v2 3/4] mbuf: remove deprecated function and macro aliases Thomas Monjalon
@ 2020-09-17 10:55     ` Hemant Agrawal
  2020-09-18 14:42     ` Kinsella, Ray
  1 sibling, 0 replies; 23+ messages in thread
From: Hemant Agrawal @ 2020-09-17 10:55 UTC (permalink / raw)
  To: Thomas Monjalon, dev
  Cc: david.marchand, mdr, Andrew Rybchenko, John McNamara,
	Marko Kovacevic, Nicolas Chautru, Anoob Joseph, Fiona Trahe,
	Ashish Gupta, Somalapuram Amaranath, Akhil Goyal, Hemant Agrawal,
	Nagadheeraj Rottela, Srikanth Jampala, Jay Zhou, Jerin Jacob,
	Nithin Dabilpuram, Kiran Kumar K, Ori Kam, Bruce Richardson,
	Radu Nicolau, Tomasz Kantecki, Sunil Kumar Kori, Pavan Nikhilesh,
	Olivier Matz

Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>

*

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [dpdk-dev] [PATCH v2 1/4] mem: remove physical address aliases
  2020-09-17 10:41   ` [dpdk-dev] [PATCH v2 1/4] mem: remove physical address aliases Thomas Monjalon
  2020-09-17 10:53     ` Hemant Agrawal
@ 2020-09-18 14:38     ` Kinsella, Ray
  1 sibling, 0 replies; 23+ messages in thread
From: Kinsella, Ray @ 2020-09-18 14:38 UTC (permalink / raw)
  To: Thomas Monjalon, dev
  Cc: david.marchand, Andrew Rybchenko, Anatoly Burakov, John McNamara,
	Marko Kovacevic, Hemant Agrawal, Sachin Saxena, Fiona Trahe,
	Ashish Gupta, Somalapuram Amaranath, Anoob Joseph, Jay Zhou,
	Qiming Yang, Qi Zhang, Gagandeep Singh, Akhil Goyal,
	Ferruh Yigit



On 17/09/2020 11:41, Thomas Monjalon wrote:
> Remove the deprecated unioned fields phys_addr
> from the structures rte_memseg and rte_memzone.
> They are replaced with the fields iova which are at the same offsets.
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
> ---
>  doc/guides/rel_notes/release_20_11.rst            |  4 ++++
>  drivers/bus/fslmc/portal/dpaa2_hw_pvt.h           |  2 +-
>  drivers/common/dpaax/dpaax_iova_table.c           |  2 +-
>  drivers/compress/qat/qat_comp.c                   |  2 +-
>  drivers/compress/qat/qat_comp_pmd.c               |  2 +-
>  drivers/crypto/ccp/ccp_dev.c                      |  2 +-
>  drivers/crypto/octeontx/otx_cryptodev_hw_access.c |  2 +-
>  drivers/crypto/virtio/virtio_cryptodev.c          |  6 +++---
>  drivers/net/ice/base/ice_osdep.h                  |  2 +-
>  drivers/net/pfe/base/pfe.h                        |  2 +-
>  lib/librte_eal/include/rte_memory.h               |  6 +-----
>  lib/librte_eal/include/rte_memzone.h              |  6 +-----
>  lib/librte_kni/rte_kni.c                          | 14 +++++++-------
>  13 files changed, 24 insertions(+), 28 deletions(-)
> 
> diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst
> index b729bdf200..c49e612c43 100644
> --- a/doc/guides/rel_notes/release_20_11.rst
> +++ b/doc/guides/rel_notes/release_20_11.rst
> @@ -84,6 +84,10 @@ API Changes
>     Also, make sure to start the actual text at the margin.
>     =======================================================
>  
> +* mem: Removed the unioned field ``phys_addr`` from
> +  the structures ``rte_memseg`` and ``rte_memzone``.
> +  The field ``iova`` is remaining from the old unions.
> +
>  * mbuf: Removed the unioned field ``refcnt_atomic`` from
>    the structures ``rte_mbuf`` and ``rte_mbuf_ext_shared_info``.
>    The field ``refcnt`` is remaining from the old unions.
> diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
> index 35423df12b..2dd53c63ba 100644
> --- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
> +++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
> @@ -368,7 +368,7 @@ static phys_addr_t dpaa2_mem_vtop(uint64_t vaddr)
>  
>  	memseg = rte_mem_virt2memseg((void *)(uintptr_t)vaddr, NULL);
>  	if (memseg)
> -		return memseg->phys_addr + RTE_PTR_DIFF(vaddr, memseg->addr);
> +		return memseg->iova + RTE_PTR_DIFF(vaddr, memseg->addr);
>  	return (size_t)NULL;
>  }
>  
> diff --git a/drivers/common/dpaax/dpaax_iova_table.c b/drivers/common/dpaax/dpaax_iova_table.c
> index 5ba8ed1933..91bee65e7b 100644
> --- a/drivers/common/dpaax/dpaax_iova_table.c
> +++ b/drivers/common/dpaax/dpaax_iova_table.c
> @@ -440,7 +440,7 @@ dpaax_memevent_walk_memsegs(const struct rte_memseg_list *msl __rte_unused,
>  			    void *arg __rte_unused)
>  {
>  	DPAAX_DEBUG("Walking for %p (pa=%"PRIu64") and len %zu",
> -		    ms->addr, ms->phys_addr, len);
> +		    ms->addr, ms->iova, len);
>  	dpaax_iova_table_update(rte_mem_virt2phy(ms->addr), ms->addr, len);
>  	return 0;
>  }
> diff --git a/drivers/compress/qat/qat_comp.c b/drivers/compress/qat/qat_comp.c
> index 9e1fd2fe91..335fd63b98 100644
> --- a/drivers/compress/qat/qat_comp.c
> +++ b/drivers/compress/qat/qat_comp.c
> @@ -957,7 +957,7 @@ static int qat_comp_create_templates(struct qat_comp_xform *qat_xform,
>  				ICP_QAT_FW_SLICE_XLAT);
>  
>  		comp_req->u1.xlt_pars.inter_buff_ptr =
> -				interm_buff_mz->phys_addr;
> +				interm_buff_mz->iova;
>  	}
>  
>  #if RTE_LOG_DP_LEVEL >= RTE_LOG_DEBUG
> diff --git a/drivers/compress/qat/qat_comp_pmd.c b/drivers/compress/qat/qat_comp_pmd.c
> index 311e561685..18ecb34ba7 100644
> --- a/drivers/compress/qat/qat_comp_pmd.c
> +++ b/drivers/compress/qat/qat_comp_pmd.c
> @@ -242,7 +242,7 @@ qat_comp_setup_inter_buffers(struct qat_comp_dev_private *comp_dev,
>  	}
>  
>  	mz_start = (uint8_t *)memzone->addr;
> -	mz_start_phys = memzone->phys_addr;
> +	mz_start_phys = memzone->iova;
>  	QAT_LOG(DEBUG, "Memzone %s: addr = %p, phys = 0x%"PRIx64
>  			", size required %d, size created %zu",
>  			inter_buff_mz_name, mz_start, mz_start_phys,
> diff --git a/drivers/crypto/ccp/ccp_dev.c b/drivers/crypto/ccp/ccp_dev.c
> index 7d98b2eb25..664ddc1747 100644
> --- a/drivers/crypto/ccp/ccp_dev.c
> +++ b/drivers/crypto/ccp/ccp_dev.c
> @@ -546,7 +546,7 @@ ccp_add_device(struct ccp_device *dev, int type)
>  						  cmd_q->qsize, SOCKET_ID_ANY);
>  		cmd_q->qbase_addr = (void *)q_mz->addr;
>  		cmd_q->qbase_desc = (void *)q_mz->addr;
> -		cmd_q->qbase_phys_addr =  q_mz->phys_addr;
> +		cmd_q->qbase_phys_addr =  q_mz->iova;
>  
>  		cmd_q->qcontrol = 0;
>  		/* init control reg to zero */
> diff --git a/drivers/crypto/octeontx/otx_cryptodev_hw_access.c b/drivers/crypto/octeontx/otx_cryptodev_hw_access.c
> index ce546c2ffe..ee36b0183e 100644
> --- a/drivers/crypto/octeontx/otx_cryptodev_hw_access.c
> +++ b/drivers/crypto/octeontx/otx_cryptodev_hw_access.c
> @@ -556,7 +556,7 @@ otx_cpt_get_resource(const struct rte_cryptodev *dev, uint8_t group,
>  	}
>  
>  	mem = rz->addr;
> -	dma_addr = rz->phys_addr;
> +	dma_addr = rz->iova;
>  	alloc_len = len;
>  
>  	memset(mem, 0, len);
> diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
> index 31a5f1072a..1822f21744 100644
> --- a/drivers/crypto/virtio/virtio_cryptodev.c
> +++ b/drivers/crypto/virtio/virtio_cryptodev.c
> @@ -411,7 +411,7 @@ virtio_crypto_queue_setup(struct rte_cryptodev *dev,
>  	 * and only accepts 32 bit page frame number.
>  	 * Check if the allocated physical memory exceeds 16TB.
>  	 */
> -	if ((mz->phys_addr + vq->vq_ring_size - 1)
> +	if ((mz->iova + vq->vq_ring_size - 1)
>  				>> (VIRTIO_PCI_QUEUE_ADDR_SHIFT + 32)) {
>  		VIRTIO_CRYPTO_INIT_LOG_ERR("vring address shouldn't be "
>  					"above 16TB!");
> @@ -420,10 +420,10 @@ virtio_crypto_queue_setup(struct rte_cryptodev *dev,
>  
>  	memset(mz->addr, 0, sizeof(mz->len));
>  	vq->mz = mz;
> -	vq->vq_ring_mem = mz->phys_addr;
> +	vq->vq_ring_mem = mz->iova;
>  	vq->vq_ring_virt_mem = mz->addr;
>  	VIRTIO_CRYPTO_INIT_LOG_DBG("vq->vq_ring_mem(physical): 0x%"PRIx64,
> -					(uint64_t)mz->phys_addr);
> +					(uint64_t)mz->iova);
>  	VIRTIO_CRYPTO_INIT_LOG_DBG("vq->vq_ring_virt_mem: 0x%"PRIx64,
>  					(uint64_t)(uintptr_t)mz->addr);
>  
> diff --git a/drivers/net/ice/base/ice_osdep.h b/drivers/net/ice/base/ice_osdep.h
> index 360e435b8d..9a170b5143 100644
> --- a/drivers/net/ice/base/ice_osdep.h
> +++ b/drivers/net/ice/base/ice_osdep.h
> @@ -258,7 +258,7 @@ ice_alloc_dma_mem(__rte_unused struct ice_hw *hw,
>  
>  	mem->size = size;
>  	mem->va = mz->addr;
> -	mem->pa = mz->phys_addr;
> +	mem->pa = mz->iova;
>  	mem->zone = (const void *)mz;
>  	PMD_DRV_LOG(DEBUG, "memzone %s allocated with physical address: "
>  		    "%"PRIu64, mz->name, mem->pa);
> diff --git a/drivers/net/pfe/base/pfe.h b/drivers/net/pfe/base/pfe.h
> index 72741ba4a8..0a88e98c1b 100644
> --- a/drivers/net/pfe/base/pfe.h
> +++ b/drivers/net/pfe/base/pfe.h
> @@ -414,7 +414,7 @@ static inline phys_addr_t pfe_mem_vtop(uint64_t vaddr)
>  
>  	memseg = rte_mem_virt2memseg((void *)(uintptr_t)vaddr, NULL);
>  	if (memseg)
> -		return memseg->phys_addr + RTE_PTR_DIFF(vaddr, memseg->addr);
> +		return memseg->iova + RTE_PTR_DIFF(vaddr, memseg->addr);
>  
>  	return (size_t)NULL;
>  }
> diff --git a/lib/librte_eal/include/rte_memory.h b/lib/librte_eal/include/rte_memory.h
> index 65374d53a3..bba9b5300a 100644
> --- a/lib/librte_eal/include/rte_memory.h
> +++ b/lib/librte_eal/include/rte_memory.h
> @@ -43,11 +43,7 @@ extern "C" {
>  #define RTE_MEMSEG_FLAG_DO_NOT_FREE (1 << 0)
>  /**< Prevent this segment from being freed back to the OS. */
>  struct rte_memseg {
> -	RTE_STD_C11
> -	union {
> -		phys_addr_t phys_addr;  /**< deprecated - Start physical address. */
> -		rte_iova_t iova;        /**< Start IO address. */
> -	};
> +	rte_iova_t iova;            /**< Start IO address. */
>  	RTE_STD_C11
>  	union {
>  		void *addr;         /**< Start virtual address. */
> diff --git a/lib/librte_eal/include/rte_memzone.h b/lib/librte_eal/include/rte_memzone.h
> index 091c9522f7..5db1210831 100644
> --- a/lib/librte_eal/include/rte_memzone.h
> +++ b/lib/librte_eal/include/rte_memzone.h
> @@ -51,11 +51,7 @@ struct rte_memzone {
>  #define RTE_MEMZONE_NAMESIZE 32       /**< Maximum length of memory zone name.*/
>  	char name[RTE_MEMZONE_NAMESIZE];  /**< Name of the memory zone. */
>  
> -	RTE_STD_C11
> -	union {
> -		phys_addr_t phys_addr;        /**< deprecated - Start physical address. */
> -		rte_iova_t iova;              /**< Start IO address. */
> -	};
> +	rte_iova_t iova;                  /**< Start IO address. */
>  	RTE_STD_C11
>  	union {
>  		void *addr;                   /**< Start virtual address. */
> diff --git a/lib/librte_kni/rte_kni.c b/lib/librte_kni/rte_kni.c
> index bcf82cc2d5..837d0217d2 100644
> --- a/lib/librte_kni/rte_kni.c
> +++ b/lib/librte_kni/rte_kni.c
> @@ -276,37 +276,37 @@ rte_kni_alloc(struct rte_mempool *pktmbuf_pool,
>  	/* TX RING */
>  	kni->tx_q = kni->m_tx_q->addr;
>  	kni_fifo_init(kni->tx_q, KNI_FIFO_COUNT_MAX);
> -	dev_info.tx_phys = kni->m_tx_q->phys_addr;
> +	dev_info.tx_phys = kni->m_tx_q->iova;
>  
>  	/* RX RING */
>  	kni->rx_q = kni->m_rx_q->addr;
>  	kni_fifo_init(kni->rx_q, KNI_FIFO_COUNT_MAX);
> -	dev_info.rx_phys = kni->m_rx_q->phys_addr;
> +	dev_info.rx_phys = kni->m_rx_q->iova;
>  
>  	/* ALLOC RING */
>  	kni->alloc_q = kni->m_alloc_q->addr;
>  	kni_fifo_init(kni->alloc_q, KNI_FIFO_COUNT_MAX);
> -	dev_info.alloc_phys = kni->m_alloc_q->phys_addr;
> +	dev_info.alloc_phys = kni->m_alloc_q->iova;
>  
>  	/* FREE RING */
>  	kni->free_q = kni->m_free_q->addr;
>  	kni_fifo_init(kni->free_q, KNI_FIFO_COUNT_MAX);
> -	dev_info.free_phys = kni->m_free_q->phys_addr;
> +	dev_info.free_phys = kni->m_free_q->iova;
>  
>  	/* Request RING */
>  	kni->req_q = kni->m_req_q->addr;
>  	kni_fifo_init(kni->req_q, KNI_FIFO_COUNT_MAX);
> -	dev_info.req_phys = kni->m_req_q->phys_addr;
> +	dev_info.req_phys = kni->m_req_q->iova;
>  
>  	/* Response RING */
>  	kni->resp_q = kni->m_resp_q->addr;
>  	kni_fifo_init(kni->resp_q, KNI_FIFO_COUNT_MAX);
> -	dev_info.resp_phys = kni->m_resp_q->phys_addr;
> +	dev_info.resp_phys = kni->m_resp_q->iova;
>  
>  	/* Req/Resp sync mem area */
>  	kni->sync_addr = kni->m_sync_addr->addr;
>  	dev_info.sync_va = kni->m_sync_addr->addr;
> -	dev_info.sync_phys = kni->m_sync_addr->phys_addr;
> +	dev_info.sync_phys = kni->m_sync_addr->iova;
>  
>  	kni->pktmbuf_pool = pktmbuf_pool;
>  	kni->group_id = conf->group_id;
> 

Acked-by: Ray Kinsella <mdr@ashroe.eu>

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [dpdk-dev] [PATCH v2 2/4] mempool: remove physical address aliases
  2020-09-17 10:41   ` [dpdk-dev] [PATCH v2 2/4] mempool: " Thomas Monjalon
@ 2020-09-18 14:39     ` Kinsella, Ray
  0 siblings, 0 replies; 23+ messages in thread
From: Kinsella, Ray @ 2020-09-18 14:39 UTC (permalink / raw)
  To: Thomas Monjalon, dev
  Cc: david.marchand, Andrew Rybchenko, John McNamara, Marko Kovacevic,
	Olivier Matz



On 17/09/2020 11:41, Thomas Monjalon wrote:
> Remove the deprecated unioned fields physaddr and phys_addr
> from the structures rte_mempool_objhdr and rte_mempool_memhdr.
> They are replaced with the fields iova which are at the same offsets.
> 
> Remove the deprecated macro MEMPOOL_F_NO_PHYS_CONTIG
> which is an alias of the more recent MEMPOOL_F_NO_IOVA_CONTIG.
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
> ---
>  doc/guides/rel_notes/release_20_11.rst |  6 ++++++
>  lib/librte_mempool/rte_mempool.h       | 13 ++-----------
>  2 files changed, 8 insertions(+), 11 deletions(-)
> 
> diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst
> index c49e612c43..71f970f1ac 100644
> --- a/doc/guides/rel_notes/release_20_11.rst
> +++ b/doc/guides/rel_notes/release_20_11.rst
> @@ -88,6 +88,12 @@ API Changes
>    the structures ``rte_memseg`` and ``rte_memzone``.
>    The field ``iova`` is remaining from the old unions.
>  
> +* mempool: Removed the unioned fields ``phys_addr`` and ``physaddr`` from
> +  the structures ``rte_mempool_memhdr`` and ``rte_mempool_objhdr``.
> +  The field ``iova`` is remaining from the old unions.
> +  The flag name ``MEMPOOL_F_NO_PHYS_CONTIG`` is removed,
> +  while the aliased flag ``MEMPOOL_F_NO_IOVA_CONTIG`` is kept.
> +
>  * mbuf: Removed the unioned field ``refcnt_atomic`` from
>    the structures ``rte_mbuf`` and ``rte_mbuf_ext_shared_info``.
>    The field ``refcnt`` is remaining from the old unions.
> diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h
> index 6ad7e31170..9ea7ff934c 100644
> --- a/lib/librte_mempool/rte_mempool.h
> +++ b/lib/librte_mempool/rte_mempool.h
> @@ -138,11 +138,7 @@ struct rte_mempool_objsz {
>  struct rte_mempool_objhdr {
>  	STAILQ_ENTRY(rte_mempool_objhdr) next; /**< Next in list. */
>  	struct rte_mempool *mp;          /**< The mempool owning the object. */
> -	RTE_STD_C11
> -	union {
> -		rte_iova_t iova;         /**< IO address of the object. */
> -		phys_addr_t physaddr;    /**< deprecated - Physical address of the object. */
> -	};
> +	rte_iova_t iova;                 /**< IO address of the object. */
>  #ifdef RTE_LIBRTE_MEMPOOL_DEBUG
>  	uint64_t cookie;                 /**< Debug cookie. */
>  #endif
> @@ -188,11 +184,7 @@ struct rte_mempool_memhdr {
>  	STAILQ_ENTRY(rte_mempool_memhdr) next; /**< Next in list. */
>  	struct rte_mempool *mp;  /**< The mempool owning the chunk */
>  	void *addr;              /**< Virtual address of the chunk */
> -	RTE_STD_C11
> -	union {
> -		rte_iova_t iova;       /**< IO address of the chunk */
> -		phys_addr_t phys_addr; /**< Physical address of the chunk */
> -	};
> +	rte_iova_t iova;         /**< IO address of the chunk */
>  	size_t len;              /**< length of the chunk */
>  	rte_mempool_memchunk_free_cb_t *free_cb; /**< Free callback */
>  	void *opaque;            /**< Argument passed to the free callback */
> @@ -269,7 +261,6 @@ struct rte_mempool {
>  #define MEMPOOL_F_SC_GET         0x0008 /**< Default get is "single-consumer".*/
>  #define MEMPOOL_F_POOL_CREATED   0x0010 /**< Internal: pool is created. */
>  #define MEMPOOL_F_NO_IOVA_CONTIG 0x0020 /**< Don't need IOVA contiguous objs. */
> -#define MEMPOOL_F_NO_PHYS_CONTIG MEMPOOL_F_NO_IOVA_CONTIG /* deprecated */
>  
>  /**
>   * @internal When debug is enabled, store some statistics.
> 
Acked-by: Ray Kinsella <mdr@ashroe.eu>

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [dpdk-dev] [PATCH v2 3/4] mbuf: remove deprecated function and macro aliases
  2020-09-17 10:41   ` [dpdk-dev] [PATCH v2 3/4] mbuf: remove deprecated function and macro aliases Thomas Monjalon
  2020-09-17 10:55     ` Hemant Agrawal
@ 2020-09-18 14:42     ` Kinsella, Ray
  1 sibling, 0 replies; 23+ messages in thread
From: Kinsella, Ray @ 2020-09-18 14:42 UTC (permalink / raw)
  To: Thomas Monjalon, dev
  Cc: david.marchand, Andrew Rybchenko, John McNamara, Marko Kovacevic,
	Nicolas Chautru, Anoob Joseph, Fiona Trahe, Ashish Gupta,
	Somalapuram Amaranath, Akhil Goyal, Hemant Agrawal,
	Nagadheeraj Rottela, Srikanth Jampala, Jay Zhou, Jerin Jacob,
	Nithin Dabilpuram, Kiran Kumar K, Ori Kam, Bruce Richardson,
	Radu Nicolau, Tomasz Kantecki, Sunil Kumar Kori, Pavan Nikhilesh,
	Olivier Matz



On 17/09/2020 11:41, Thomas Monjalon wrote:
> Remove the deprecated functions
> 	- rte_mbuf_data_dma_addr
> 	- rte_mbuf_data_dma_addr_default
> which aliased the more recent functions
> 	- rte_mbuf_data_iova
> 	- rte_mbuf_data_iova_default
> 
> Remove the deprecated macros
> 	- rte_pktmbuf_mtophys
> 	- rte_pktmbuf_mtophys_offset
> which aliased the more recent macros
> 	- rte_pktmbuf_iova
> 	- rte_pktmbuf_iova_offset
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
> ---
>  doc/guides/rel_notes/release_20_11.rst        |  5 +++
>  .../fpga_5gnr_fec/rte_fpga_5gnr_fec.c         | 16 +++----
>  drivers/baseband/fpga_lte_fec/fpga_lte_fec.c  | 16 +++----
>  drivers/common/cpt/cpt_ucode.h                | 12 +++---
>  drivers/compress/qat/qat_comp.c               |  4 +-
>  drivers/crypto/ccp/ccp_crypto.c               | 22 +++++-----
>  drivers/crypto/dpaa_sec/dpaa_sec.c            | 42 +++++++++----------
>  drivers/crypto/nitrox/nitrox_sym_reqmgr.c     |  6 +--
>  drivers/crypto/virtio/virtio_rxtx.c           |  6 +--
>  drivers/net/axgbe/axgbe_rxtx.c                |  4 +-
>  drivers/net/octeontx2/otx2_ethdev_sec_tx.h    |  2 +-
>  examples/fips_validation/main.c               |  4 +-
>  lib/librte_mbuf/rte_mbuf.h                    | 21 ----------
>  13 files changed, 72 insertions(+), 88 deletions(-)
> 
> diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst
> index 71f970f1ac..a290b44ae5 100644
> --- a/doc/guides/rel_notes/release_20_11.rst
> +++ b/doc/guides/rel_notes/release_20_11.rst
> @@ -94,6 +94,11 @@ API Changes
>    The flag name ``MEMPOOL_F_NO_PHYS_CONTIG`` is removed,
>    while the aliased flag ``MEMPOOL_F_NO_IOVA_CONTIG`` is kept.
>  
> +* mbuf: Removed the functions ``rte_mbuf_data_dma_addr*``
> +  and the macros ``rte_pktmbuf_mtophys*``.
> +  The same functionality is still available with the functions and macros
> +  having ``iova`` in their names instead of ``dma_addr`` or ``mtophys``.
> +
>  * mbuf: Removed the unioned field ``refcnt_atomic`` from
>    the structures ``rte_mbuf`` and ``rte_mbuf_ext_shared_info``.
>    The field ``refcnt`` is remaining from the old unions.
> diff --git a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
> index 930718cd47..61f9c04ba2 100644
> --- a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
> +++ b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c
> @@ -950,14 +950,14 @@ fpga_dma_desc_te_fill(struct rte_bbdev_enc_op *op,
>  	desc->num_null = op->ldpc_enc.n_filler;
>  	/* Set inbound data buffer address */
>  	desc->in_addr_hi = (uint32_t)(
> -			rte_pktmbuf_mtophys_offset(input, in_offset) >> 32);
> +			rte_pktmbuf_iova_offset(input, in_offset) >> 32);
>  	desc->in_addr_lw = (uint32_t)(
> -			rte_pktmbuf_mtophys_offset(input, in_offset));
> +			rte_pktmbuf_iova_offset(input, in_offset));
>  
>  	desc->out_addr_hi = (uint32_t)(
> -			rte_pktmbuf_mtophys_offset(output, out_offset) >> 32);
> +			rte_pktmbuf_iova_offset(output, out_offset) >> 32);
>  	desc->out_addr_lw = (uint32_t)(
> -			rte_pktmbuf_mtophys_offset(output, out_offset));
> +			rte_pktmbuf_iova_offset(output, out_offset));
>  	/* Save software context needed for dequeue */
>  	desc->op_addr = op;
>  	/* Set total number of CBs in an op */
> @@ -998,9 +998,9 @@ fpga_dma_desc_ld_fill(struct rte_bbdev_dec_op *op,
>  	desc->error = 0;
>  	/* Set inbound data buffer address */
>  	desc->in_addr_hi = (uint32_t)(
> -			rte_pktmbuf_mtophys_offset(input, in_offset) >> 32);
> +			rte_pktmbuf_iova_offset(input, in_offset) >> 32);
>  	desc->in_addr_lw = (uint32_t)(
> -			rte_pktmbuf_mtophys_offset(input, in_offset));
> +			rte_pktmbuf_iova_offset(input, in_offset));
>  	desc->rm_e = op->ldpc_dec.cb_params.e;
>  	desc->harq_input_length = harq_in_length;
>  	desc->et_dis = !check_bit(op->ldpc_dec.op_flags,
> @@ -1021,9 +1021,9 @@ fpga_dma_desc_ld_fill(struct rte_bbdev_dec_op *op,
>  	desc->max_iter = op->ldpc_dec.iter_max;
>  	desc->qm_idx = op->ldpc_dec.q_m / 2;
>  	desc->out_addr_hi = (uint32_t)(
> -			rte_pktmbuf_mtophys_offset(output, out_offset) >> 32);
> +			rte_pktmbuf_iova_offset(output, out_offset) >> 32);
>  	desc->out_addr_lw = (uint32_t)(
> -			rte_pktmbuf_mtophys_offset(output, out_offset));
> +			rte_pktmbuf_iova_offset(output, out_offset));
>  	/* Save software context needed for dequeue */
>  	desc->op_addr = op;
>  	/* Set total number of CBs in an op */
> diff --git a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
> index 6be9131e72..37018b9c7f 100644
> --- a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
> +++ b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
> @@ -1251,14 +1251,14 @@ fpga_dma_desc_te_fill(struct rte_bbdev_enc_op *op,
>  	desc->offset = desc_offset;
>  	/* Set inbound data buffer address */
>  	desc->in_addr_hi = (uint32_t)(
> -			rte_pktmbuf_mtophys_offset(input, in_offset) >> 32);
> +			rte_pktmbuf_iova_offset(input, in_offset) >> 32);
>  	desc->in_addr_lw = (uint32_t)(
> -			rte_pktmbuf_mtophys_offset(input, in_offset));
> +			rte_pktmbuf_iova_offset(input, in_offset));
>  
>  	desc->out_addr_hi = (uint32_t)(
> -			rte_pktmbuf_mtophys_offset(output, out_offset) >> 32);
> +			rte_pktmbuf_iova_offset(output, out_offset) >> 32);
>  	desc->out_addr_lw = (uint32_t)(
> -			rte_pktmbuf_mtophys_offset(output, out_offset));
> +			rte_pktmbuf_iova_offset(output, out_offset));
>  
>  	/* Save software context needed for dequeue */
>  	desc->op_addr = op;
> @@ -1302,9 +1302,9 @@ fpga_dma_desc_td_fill(struct rte_bbdev_dec_op *op,
>  	desc->done = 0;
>  	/* Set inbound data buffer address */
>  	desc->in_addr_hi = (uint32_t)(
> -			rte_pktmbuf_mtophys_offset(input, in_offset) >> 32);
> +			rte_pktmbuf_iova_offset(input, in_offset) >> 32);
>  	desc->in_addr_lw = (uint32_t)(
> -			rte_pktmbuf_mtophys_offset(input, in_offset));
> +			rte_pktmbuf_iova_offset(input, in_offset));
>  	desc->in_len = in_length;
>  	desc->k = k;
>  	desc->crc_type = !check_bit(op->turbo_dec.op_flags,
> @@ -1316,9 +1316,9 @@ fpga_dma_desc_td_fill(struct rte_bbdev_dec_op *op,
>  	desc->max_iter = op->turbo_dec.iter_max * 2;
>  	desc->offset = desc_offset;
>  	desc->out_addr_hi = (uint32_t)(
> -			rte_pktmbuf_mtophys_offset(output, out_offset) >> 32);
> +			rte_pktmbuf_iova_offset(output, out_offset) >> 32);
>  	desc->out_addr_lw = (uint32_t)(
> -			rte_pktmbuf_mtophys_offset(output, out_offset));
> +			rte_pktmbuf_iova_offset(output, out_offset));
>  
>  	/* Save software context needed for dequeue */
>  	desc->op_addr = op;
> diff --git a/drivers/common/cpt/cpt_ucode.h b/drivers/common/cpt/cpt_ucode.h
> index 44067cf1b1..4e79fbf7a5 100644
> --- a/drivers/common/cpt/cpt_ucode.h
> +++ b/drivers/common/cpt/cpt_ucode.h
> @@ -2918,7 +2918,7 @@ prepare_iov_from_pkt(struct rte_mbuf *pkt,
>  
>  	if (!start_offset) {
>  		seg_data = rte_pktmbuf_mtod(pkt, void *);
> -		seg_phys = rte_pktmbuf_mtophys(pkt);
> +		seg_phys = rte_pktmbuf_iova(pkt);
>  		seg_size = pkt->data_len;
>  	} else {
>  		while (start_offset >= pkt->data_len) {
> @@ -2927,7 +2927,7 @@ prepare_iov_from_pkt(struct rte_mbuf *pkt,
>  		}
>  
>  		seg_data = rte_pktmbuf_mtod_offset(pkt, void *, start_offset);
> -		seg_phys = rte_pktmbuf_mtophys_offset(pkt, start_offset);
> +		seg_phys = rte_pktmbuf_iova_offset(pkt, start_offset);
>  		seg_size = pkt->data_len - start_offset;
>  		if (!seg_size)
>  			return 1;
> @@ -2942,7 +2942,7 @@ prepare_iov_from_pkt(struct rte_mbuf *pkt,
>  
>  	while (unlikely(pkt != NULL)) {
>  		seg_data = rte_pktmbuf_mtod(pkt, void *);
> -		seg_phys = rte_pktmbuf_mtophys(pkt);
> +		seg_phys = rte_pktmbuf_iova(pkt);
>  		seg_size = pkt->data_len;
>  		if (!seg_size)
>  			break;
> @@ -2972,7 +2972,7 @@ prepare_iov_from_pkt_inplace(struct rte_mbuf *pkt,
>  	iov_ptr_t *iovec;
>  
>  	seg_data = rte_pktmbuf_mtod(pkt, void *);
> -	seg_phys = rte_pktmbuf_mtophys(pkt);
> +	seg_phys = rte_pktmbuf_iova(pkt);
>  	seg_size = pkt->data_len;
>  
>  	/* first seg */
> @@ -3001,7 +3001,7 @@ prepare_iov_from_pkt_inplace(struct rte_mbuf *pkt,
>  
>  	while (unlikely(pkt != NULL)) {
>  		seg_data = rte_pktmbuf_mtod(pkt, void *);
> -		seg_phys = rte_pktmbuf_mtophys(pkt);
> +		seg_phys = rte_pktmbuf_iova(pkt);
>  		seg_size = pkt->data_len;
>  
>  		if (!seg_size)
> @@ -3463,7 +3463,7 @@ fill_digest_params(struct rte_crypto_op *cop,
>  			params.mac_buf.vaddr =
>  				rte_pktmbuf_mtod_offset(m_dst, void *, off);
>  			params.mac_buf.dma_addr =
> -				rte_pktmbuf_mtophys_offset(m_dst, off);
> +				rte_pktmbuf_iova_offset(m_dst, off);
>  			params.mac_buf.size = mac_len;
>  		}
>  	} else {
> diff --git a/drivers/compress/qat/qat_comp.c b/drivers/compress/qat/qat_comp.c
> index 335fd63b98..3a064ec3b2 100644
> --- a/drivers/compress/qat/qat_comp.c
> +++ b/drivers/compress/qat/qat_comp.c
> @@ -305,9 +305,9 @@ qat_comp_build_request(void *in_op, uint8_t *out_msg,
>  				comp_req->comp_pars.out_buffer_sz;
>  
>  		comp_req->comn_mid.src_data_addr =
> -		    rte_pktmbuf_mtophys_offset(op->m_src, op->src.offset);
> +		    rte_pktmbuf_iova_offset(op->m_src, op->src.offset);
>  		comp_req->comn_mid.dest_data_addr =
> -		    rte_pktmbuf_mtophys_offset(op->m_dst, op->dst.offset);
> +		    rte_pktmbuf_iova_offset(op->m_dst, op->dst.offset);
>  	}
>  
>  	if (unlikely(rte_pktmbuf_pkt_len(op->m_dst) < QAT_MIN_OUT_BUF_SIZE)) {
> diff --git a/drivers/crypto/ccp/ccp_crypto.c b/drivers/crypto/ccp/ccp_crypto.c
> index 4256734d16..db3fb6eff8 100644
> --- a/drivers/crypto/ccp/ccp_crypto.c
> +++ b/drivers/crypto/ccp/ccp_crypto.c
> @@ -1571,7 +1571,7 @@ ccp_perform_hmac(struct rte_crypto_op *op,
>  					 ccp_cryptodev_driver_id);
>  	addr = session->auth.pre_compute;
>  
> -	src_addr = rte_pktmbuf_mtophys_offset(op->sym->m_src,
> +	src_addr = rte_pktmbuf_iova_offset(op->sym->m_src,
>  					      op->sym->auth.data.offset);
>  	append_ptr = (void *)rte_pktmbuf_append(op->sym->m_src,
>  						session->auth.ctx_len);
> @@ -1743,7 +1743,7 @@ ccp_perform_sha(struct rte_crypto_op *op,
>  					 op->sym->session,
>  					ccp_cryptodev_driver_id);
>  
> -	src_addr = rte_pktmbuf_mtophys_offset(op->sym->m_src,
> +	src_addr = rte_pktmbuf_iova_offset(op->sym->m_src,
>  					      op->sym->auth.data.offset);
>  
>  	append_ptr = (void *)rte_pktmbuf_append(op->sym->m_src,
> @@ -1832,7 +1832,7 @@ ccp_perform_sha3_hmac(struct rte_crypto_op *op,
>  					 op->sym->session,
>  					ccp_cryptodev_driver_id);
>  
> -	src_addr = rte_pktmbuf_mtophys_offset(op->sym->m_src,
> +	src_addr = rte_pktmbuf_iova_offset(op->sym->m_src,
>  					      op->sym->auth.data.offset);
>  	append_ptr = (uint8_t *)rte_pktmbuf_append(op->sym->m_src,
>  						session->auth.ctx_len);
> @@ -1972,7 +1972,7 @@ ccp_perform_sha3(struct rte_crypto_op *op,
>  					 op->sym->session,
>  					ccp_cryptodev_driver_id);
>  
> -	src_addr = rte_pktmbuf_mtophys_offset(op->sym->m_src,
> +	src_addr = rte_pktmbuf_iova_offset(op->sym->m_src,
>  					      op->sym->auth.data.offset);
>  	append_ptr = (uint8_t *)rte_pktmbuf_append(op->sym->m_src,
>  						session->auth.ctx_len);
> @@ -2041,7 +2041,7 @@ ccp_perform_aes_cmac(struct rte_crypto_op *op,
>  					ccp_cryptodev_driver_id);
>  	key_addr = rte_mem_virt2phy(session->auth.key_ccp);
>  
> -	src_addr = rte_pktmbuf_mtophys_offset(op->sym->m_src,
> +	src_addr = rte_pktmbuf_iova_offset(op->sym->m_src,
>  					      op->sym->auth.data.offset);
>  	append_ptr = (uint8_t *)rte_pktmbuf_append(op->sym->m_src,
>  						session->auth.ctx_len);
> @@ -2221,10 +2221,10 @@ ccp_perform_aes(struct rte_crypto_op *op,
>  
>  	desc = &cmd_q->qbase_desc[cmd_q->qidx];
>  
> -	src_addr = rte_pktmbuf_mtophys_offset(op->sym->m_src,
> +	src_addr = rte_pktmbuf_iova_offset(op->sym->m_src,
>  					      op->sym->cipher.data.offset);
>  	if (likely(op->sym->m_dst != NULL))
> -		dest_addr = rte_pktmbuf_mtophys_offset(op->sym->m_dst,
> +		dest_addr = rte_pktmbuf_iova_offset(op->sym->m_dst,
>  						op->sym->cipher.data.offset);
>  	else
>  		dest_addr = src_addr;
> @@ -2303,11 +2303,11 @@ ccp_perform_3des(struct rte_crypto_op *op,
>  		return -ENOTSUP;
>  	}
>  
> -	src_addr = rte_pktmbuf_mtophys_offset(op->sym->m_src,
> +	src_addr = rte_pktmbuf_iova_offset(op->sym->m_src,
>  					      op->sym->cipher.data.offset);
>  	if (unlikely(op->sym->m_dst != NULL))
>  		dest_addr =
> -			rte_pktmbuf_mtophys_offset(op->sym->m_dst,
> +			rte_pktmbuf_iova_offset(op->sym->m_dst,
>  						   op->sym->cipher.data.offset);
>  	else
>  		dest_addr = src_addr;
> @@ -2385,10 +2385,10 @@ ccp_perform_aes_gcm(struct rte_crypto_op *op, struct ccp_queue *cmd_q)
>  	iv = rte_crypto_op_ctod_offset(op, uint8_t *, session->iv.offset);
>  	key_addr = session->cipher.key_phys;
>  
> -	src_addr = rte_pktmbuf_mtophys_offset(op->sym->m_src,
> +	src_addr = rte_pktmbuf_iova_offset(op->sym->m_src,
>  					      op->sym->aead.data.offset);
>  	if (unlikely(op->sym->m_dst != NULL))
> -		dest_addr = rte_pktmbuf_mtophys_offset(op->sym->m_dst,
> +		dest_addr = rte_pktmbuf_iova_offset(op->sym->m_dst,
>  						op->sym->aead.data.offset);
>  	else
>  		dest_addr = src_addr;
> diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
> index c4339336de..97002170b0 100644
> --- a/drivers/crypto/dpaa_sec/dpaa_sec.c
> +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
> @@ -748,7 +748,7 @@ build_auth_only_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
>  		sg++;
>  	}
>  
> -	qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
> +	qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
>  	sg->offset = data_offset;
>  
>  	if (data_len <= (mbuf->data_len - data_offset)) {
> @@ -761,7 +761,7 @@ build_auth_only_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
>  		       (mbuf = mbuf->next)) {
>  			cpu_to_hw_sg(sg);
>  			sg++;
> -			qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
> +			qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
>  			if (data_len > mbuf->data_len)
>  				sg->length = mbuf->data_len;
>  			else
> @@ -866,7 +866,7 @@ build_auth_only(struct rte_crypto_op *op, dpaa_sec_session *ses)
>  		sg++;
>  	}
>  
> -	qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
> +	qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
>  	sg->offset = data_offset;
>  	sg->length = data_len;
>  
> @@ -946,7 +946,7 @@ build_cipher_only_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
>  
>  	/* 1st seg */
>  	sg = &cf->sg[2];
> -	qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
> +	qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
>  	sg->length = mbuf->data_len - data_offset;
>  	sg->offset = data_offset;
>  
> @@ -955,7 +955,7 @@ build_cipher_only_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
>  	while (mbuf) {
>  		cpu_to_hw_sg(sg);
>  		sg++;
> -		qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
> +		qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
>  		sg->length = mbuf->data_len;
>  		mbuf = mbuf->next;
>  	}
> @@ -980,7 +980,7 @@ build_cipher_only_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
>  
>  	/* 1st seg */
>  	sg++;
> -	qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
> +	qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
>  	sg->length = mbuf->data_len - data_offset;
>  	sg->offset = data_offset;
>  
> @@ -989,7 +989,7 @@ build_cipher_only_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
>  	while (mbuf) {
>  		cpu_to_hw_sg(sg);
>  		sg++;
> -		qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
> +		qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
>  		sg->length = mbuf->data_len;
>  		mbuf = mbuf->next;
>  	}
> @@ -1121,7 +1121,7 @@ build_cipher_auth_gcm_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
>  	cpu_to_hw_sg(out_sg);
>  
>  	/* 1st seg */
> -	qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
> +	qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
>  	sg->length = mbuf->data_len - sym->aead.data.offset;
>  	sg->offset = sym->aead.data.offset;
>  
> @@ -1130,7 +1130,7 @@ build_cipher_auth_gcm_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
>  	while (mbuf) {
>  		cpu_to_hw_sg(sg);
>  		sg++;
> -		qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
> +		qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
>  		sg->length = mbuf->data_len;
>  		mbuf = mbuf->next;
>  	}
> @@ -1178,7 +1178,7 @@ build_cipher_auth_gcm_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
>  
>  	/* 3rd seg */
>  	sg++;
> -	qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
> +	qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
>  	sg->length = mbuf->data_len - sym->aead.data.offset;
>  	sg->offset = sym->aead.data.offset;
>  
> @@ -1187,7 +1187,7 @@ build_cipher_auth_gcm_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
>  	while (mbuf) {
>  		cpu_to_hw_sg(sg);
>  		sg++;
> -		qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
> +		qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
>  		sg->length = mbuf->data_len;
>  		mbuf = mbuf->next;
>  	}
> @@ -1367,7 +1367,7 @@ build_cipher_auth_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
>  	cpu_to_hw_sg(out_sg);
>  
>  	/* 1st seg */
> -	qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
> +	qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
>  	sg->length = mbuf->data_len - sym->auth.data.offset;
>  	sg->offset = sym->auth.data.offset;
>  
> @@ -1376,7 +1376,7 @@ build_cipher_auth_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
>  	while (mbuf) {
>  		cpu_to_hw_sg(sg);
>  		sg++;
> -		qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
> +		qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
>  		sg->length = mbuf->data_len;
>  		mbuf = mbuf->next;
>  	}
> @@ -1415,7 +1415,7 @@ build_cipher_auth_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
>  
>  	/* 2nd seg */
>  	sg++;
> -	qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
> +	qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
>  	sg->length = mbuf->data_len - sym->auth.data.offset;
>  	sg->offset = sym->auth.data.offset;
>  
> @@ -1424,7 +1424,7 @@ build_cipher_auth_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
>  	while (mbuf) {
>  		cpu_to_hw_sg(sg);
>  		sg++;
> -		qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
> +		qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
>  		sg->length = mbuf->data_len;
>  		mbuf = mbuf->next;
>  	}
> @@ -1555,10 +1555,10 @@ build_proto(struct rte_crypto_op *op, dpaa_sec_session *ses)
>  	cf = &ctx->job;
>  	ctx->op = op;
>  
> -	src_start_addr = rte_pktmbuf_mtophys(sym->m_src);
> +	src_start_addr = rte_pktmbuf_iova(sym->m_src);
>  
>  	if (sym->m_dst)
> -		dst_start_addr = rte_pktmbuf_mtophys(sym->m_dst);
> +		dst_start_addr = rte_pktmbuf_iova(sym->m_dst);
>  	else
>  		dst_start_addr = src_start_addr;
>  
> @@ -1614,7 +1614,7 @@ build_proto_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
>  
>  	/* 1st seg */
>  	sg = &cf->sg[2];
> -	qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
> +	qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
>  	sg->offset = 0;
>  
>  	/* Successive segs */
> @@ -1624,7 +1624,7 @@ build_proto_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
>  		mbuf = mbuf->next;
>  		cpu_to_hw_sg(sg);
>  		sg++;
> -		qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
> +		qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
>  		sg->offset = 0;
>  	}
>  	sg->length = mbuf->buf_len - mbuf->data_off;
> @@ -1646,7 +1646,7 @@ build_proto_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
>  	qm_sg_entry_set64(in_sg, rte_dpaa_mem_vtop(sg));
>  
>  	/* 1st seg */
> -	qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
> +	qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
>  	sg->length = mbuf->data_len;
>  	sg->offset = 0;
>  
> @@ -1655,7 +1655,7 @@ build_proto_sg(struct rte_crypto_op *op, dpaa_sec_session *ses)
>  	while (mbuf) {
>  		cpu_to_hw_sg(sg);
>  		sg++;
> -		qm_sg_entry_set64(sg, rte_pktmbuf_mtophys(mbuf));
> +		qm_sg_entry_set64(sg, rte_pktmbuf_iova(mbuf));
>  		sg->length = mbuf->data_len;
>  		sg->offset = 0;
>  		in_len += sg->length;
> diff --git a/drivers/crypto/nitrox/nitrox_sym_reqmgr.c b/drivers/crypto/nitrox/nitrox_sym_reqmgr.c
> index d9b4267764..4492247801 100644
> --- a/drivers/crypto/nitrox/nitrox_sym_reqmgr.c
> +++ b/drivers/crypto/nitrox/nitrox_sym_reqmgr.c
> @@ -269,7 +269,7 @@ extract_cipher_auth_digest(struct nitrox_softreq *sr,
>  	       op->sym->auth.data.length + digest->len))
>  		return -EINVAL;
>  
> -	digest->iova = rte_pktmbuf_mtophys_offset(mdst,
> +	digest->iova = rte_pktmbuf_iova_offset(mdst,
>  					op->sym->auth.data.offset +
>  					op->sym->auth.data.length);
>  	digest->virt = rte_pktmbuf_mtod_offset(mdst, uint8_t *,
> @@ -318,7 +318,7 @@ create_sglist_from_mbuf(struct nitrox_sgtable *sgtbl, struct rte_mbuf *mbuf,
>  	if (datalen <= mlen)
>  		mlen = datalen;
>  	sglist[cnt].len = mlen;
> -	sglist[cnt].iova = rte_pktmbuf_mtophys_offset(m, off);
> +	sglist[cnt].iova = rte_pktmbuf_iova_offset(m, off);
>  	sglist[cnt].virt = rte_pktmbuf_mtod_offset(m, uint8_t *, off);
>  	sgtbl->total_bytes += mlen;
>  	cnt++;
> @@ -327,7 +327,7 @@ create_sglist_from_mbuf(struct nitrox_sgtable *sgtbl, struct rte_mbuf *mbuf,
>  		mlen = rte_pktmbuf_data_len(m) < datalen ?
>  			rte_pktmbuf_data_len(m) : datalen;
>  		sglist[cnt].len = mlen;
> -		sglist[cnt].iova = rte_pktmbuf_mtophys(m);
> +		sglist[cnt].iova = rte_pktmbuf_iova(m);
>  		sglist[cnt].virt = rte_pktmbuf_mtod(m, uint8_t *);
>  		sgtbl->total_bytes += mlen;
>  		cnt++;
> diff --git a/drivers/crypto/virtio/virtio_rxtx.c b/drivers/crypto/virtio/virtio_rxtx.c
> index e9a63cb5a0..e1cb4ad104 100644
> --- a/drivers/crypto/virtio/virtio_rxtx.c
> +++ b/drivers/crypto/virtio/virtio_rxtx.c
> @@ -284,18 +284,18 @@ virtqueue_crypto_sym_enqueue_xmit(
>  	}
>  
>  	/* indirect vring: src data */
> -	desc[idx].addr = rte_pktmbuf_mtophys_offset(sym_op->m_src, 0);
> +	desc[idx].addr = rte_pktmbuf_iova_offset(sym_op->m_src, 0);
>  	desc[idx].len = (sym_op->cipher.data.offset
>  		+ sym_op->cipher.data.length);
>  	desc[idx++].flags = VRING_DESC_F_NEXT;
>  
>  	/* indirect vring: dst data */
>  	if (sym_op->m_dst) {
> -		desc[idx].addr = rte_pktmbuf_mtophys_offset(sym_op->m_dst, 0);
> +		desc[idx].addr = rte_pktmbuf_iova_offset(sym_op->m_dst, 0);
>  		desc[idx].len = (sym_op->cipher.data.offset
>  			+ sym_op->cipher.data.length);
>  	} else {
> -		desc[idx].addr = rte_pktmbuf_mtophys_offset(sym_op->m_src, 0);
> +		desc[idx].addr = rte_pktmbuf_iova_offset(sym_op->m_src, 0);
>  		desc[idx].len = (sym_op->cipher.data.offset
>  			+ sym_op->cipher.data.length);
>  	}
> diff --git a/drivers/net/axgbe/axgbe_rxtx.c b/drivers/net/axgbe/axgbe_rxtx.c
> index 30c467db71..da3a9822b8 100644
> --- a/drivers/net/axgbe/axgbe_rxtx.c
> +++ b/drivers/net/axgbe/axgbe_rxtx.c
> @@ -95,7 +95,7 @@ int axgbe_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
>  		axgbe_rx_queue_release(rxq);
>  		return -ENOMEM;
>  	}
> -	rxq->ring_phys_addr = (uint64_t)dma->phys_addr;
> +	rxq->ring_phys_addr = (uint64_t)dma->iova;
>  	rxq->desc = (volatile union axgbe_rx_desc *)dma->addr;
>  	memset((void *)rxq->desc, 0, size);
>  	/* Allocate software ring */
> @@ -530,7 +530,7 @@ int axgbe_dev_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
>  		return -ENOMEM;
>  	}
>  	memset(tz->addr, 0, tsize);
> -	txq->ring_phys_addr = (uint64_t)tz->phys_addr;
> +	txq->ring_phys_addr = (uint64_t)tz->iova;
>  	txq->desc = tz->addr;
>  	txq->queue_id = queue_idx;
>  	txq->port_id = dev->data->port_id;
> diff --git a/drivers/net/octeontx2/otx2_ethdev_sec_tx.h b/drivers/net/octeontx2/otx2_ethdev_sec_tx.h
> index f8130ca624..15122b4154 100644
> --- a/drivers/net/octeontx2/otx2_ethdev_sec_tx.h
> +++ b/drivers/net/octeontx2/otx2_ethdev_sec_tx.h
> @@ -87,7 +87,7 @@ otx2_sec_event_tx(struct otx2_ssogws *ws, struct rte_event *ev,
>  	 */
>  	rte_pktmbuf_append(m, extend_tail);
>  	data = rte_pktmbuf_prepend(m, extend_head);
> -	data_addr = rte_pktmbuf_mtophys(m);
> +	data_addr = rte_pktmbuf_iova(m);
>  
>  	/*
>  	 * Move the Ethernet header, to insert otx2_ipsec_fp_out_hdr prior
> diff --git a/examples/fips_validation/main.c b/examples/fips_validation/main.c
> index efd32a86a5..0a1c8b568c 100644
> --- a/examples/fips_validation/main.c
> +++ b/examples/fips_validation/main.c
> @@ -531,7 +531,7 @@ prepare_auth_op(void)
>  
>  	sym->auth.data.length = vec.pt.len;
>  	sym->auth.digest.data = pt + vec.pt.len;
> -	sym->auth.digest.phys_addr = rte_pktmbuf_mtophys_offset(
> +	sym->auth.digest.phys_addr = rte_pktmbuf_iova_offset(
>  			env.mbuf, vec.pt.len);
>  
>  	memcpy(pt, vec.pt.val, vec.pt.len);
> @@ -584,7 +584,7 @@ prepare_aead_op(void)
>  		memcpy(pt, vec.pt.val, vec.pt.len);
>  		sym->aead.data.length = vec.pt.len;
>  		sym->aead.digest.data = pt + vec.pt.len;
> -		sym->aead.digest.phys_addr = rte_pktmbuf_mtophys_offset(
> +		sym->aead.digest.phys_addr = rte_pktmbuf_iova_offset(
>  				env.mbuf, vec.pt.len);
>  	} else {
>  		uint8_t *ct;
> diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
> index 7259575a77..a1414ed7cd 100644
> --- a/lib/librte_mbuf/rte_mbuf.h
> +++ b/lib/librte_mbuf/rte_mbuf.h
> @@ -151,13 +151,6 @@ rte_mbuf_data_iova(const struct rte_mbuf *mb)
>  	return mb->buf_iova + mb->data_off;
>  }
>  
> -__rte_deprecated
> -static inline phys_addr_t
> -rte_mbuf_data_dma_addr(const struct rte_mbuf *mb)
> -{
> -	return rte_mbuf_data_iova(mb);
> -}
> -
>  /**
>   * Return the default IO address of the beginning of the mbuf data
>   *
> @@ -176,13 +169,6 @@ rte_mbuf_data_iova_default(const struct rte_mbuf *mb)
>  	return mb->buf_iova + RTE_PKTMBUF_HEADROOM;
>  }
>  
> -__rte_deprecated
> -static inline phys_addr_t
> -rte_mbuf_data_dma_addr_default(const struct rte_mbuf *mb)
> -{
> -	return rte_mbuf_data_iova_default(mb);
> -}
> -
>  /**
>   * Return the mbuf owning the data buffer address of an indirect mbuf.
>   *
> @@ -1537,13 +1523,6 @@ static inline struct rte_mbuf *rte_pktmbuf_lastseg(struct rte_mbuf *m)
>  	return m;
>  }
>  
> -/* deprecated */
> -#define rte_pktmbuf_mtophys_offset(m, o) \
> -	rte_pktmbuf_iova_offset(m, o)
> -
> -/* deprecated */
> -#define rte_pktmbuf_mtophys(m) rte_pktmbuf_iova(m)
> -
>  /**
>   * A macro that returns the length of the packet.
>   *
> 
Acked-by: Ray Kinsella <mdr@ashroe.eu>

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [dpdk-dev] [PATCH v2 4/4] mbuf: remove physical address alias
  2020-09-17 10:41   ` [dpdk-dev] [PATCH v2 4/4] mbuf: remove physical address alias Thomas Monjalon
@ 2020-09-18 14:43     ` Kinsella, Ray
  2020-09-18 22:32       ` Thomas Monjalon
  0 siblings, 1 reply; 23+ messages in thread
From: Kinsella, Ray @ 2020-09-18 14:43 UTC (permalink / raw)
  To: Thomas Monjalon, dev
  Cc: david.marchand, Andrew Rybchenko, Neil Horman, John McNamara,
	Marko Kovacevic, Anoob Joseph, Beilei Xing, Jeff Guo,
	Jingjing Wu, Qiming Yang, Qi Zhang, Ferruh Yigit, Olivier Matz



On 17/09/2020 11:41, Thomas Monjalon wrote:
> Remove the deprecated buf_physaddr union field from rte_mbuf.
> It is replaced with buf_iova which is at the same offset.
> 
> The single field buf_physaddr in rte_kni_mbuf is also renamed.
> 
> This concludes a 3-year process of semantic change.
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
> ---
>  doc/guides/rel_notes/deprecation.rst          |  2 --
>  doc/guides/rel_notes/release_20_11.rst        |  3 +++
>  drivers/common/cpt/cpt_ucode.h                |  2 +-
>  drivers/net/i40e/i40e_rxtx_vec_avx2.c         | 18 +++++++++---------
>  drivers/net/iavf/iavf_rxtx_vec_avx2.c         | 18 +++++++++---------
>  drivers/net/ice/ice_rxtx_vec_avx2.c           | 18 +++++++++---------
>  kernel/linux/kni/kni_net.c                    |  6 +++---
>  lib/librte_eal/linux/include/rte_kni_common.h |  2 +-
>  lib/librte_mbuf/rte_mbuf_core.h               |  6 +-----
>  9 files changed, 36 insertions(+), 39 deletions(-)
> 
> diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
> index 52168f7751..143b7694a5 100644
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -148,8 +148,6 @@ Deprecation Notices
>    avoiding impact on vectorized implementation of the driver datapaths,
>    while evaluating performance gains of a better use of the first cache line.
>  
> -  The deprecated unioned field ``buf_physaddr`` will be removed in DPDK 20.11.
> -
>  * ethdev: Split the ``struct eth_dev_ops`` struct to hide it as much as possible
>    will be done in 20.11.
>    Currently the ``struct eth_dev_ops`` struct is accessible by the application
> diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst
> index a290b44ae5..4a7f6f4b6c 100644
> --- a/doc/guides/rel_notes/release_20_11.rst
> +++ b/doc/guides/rel_notes/release_20_11.rst
> @@ -99,6 +99,9 @@ API Changes
>    The same functionality is still available with the functions and macros
>    having ``iova`` in their names instead of ``dma_addr`` or ``mtophys``.
>  
> +* mbuf: Removed the unioned field ``buf_physaddr`` from ``rte_mbuf``.
> +  The field ``buf_iova`` is remaining from the old union.
> +
>  * mbuf: Removed the unioned field ``refcnt_atomic`` from
>    the structures ``rte_mbuf`` and ``rte_mbuf_ext_shared_info``.
>    The field ``refcnt`` is remaining from the old unions.
> diff --git a/drivers/common/cpt/cpt_ucode.h b/drivers/common/cpt/cpt_ucode.h
> index 4e79fbf7a5..763355fb1f 100644
> --- a/drivers/common/cpt/cpt_ucode.h
> +++ b/drivers/common/cpt/cpt_ucode.h
> @@ -2862,7 +2862,7 @@ alloc_op_meta(struct rte_mbuf *m_src,
>  		tailroom = rte_pktmbuf_tailroom(m_src);
>  		if (likely(tailroom > len + 8)) {
>  			mdata = (uint8_t *)m_src->buf_addr + m_src->buf_len;
> -			mphys = m_src->buf_physaddr + m_src->buf_len;
> +			mphys = m_src->buf_iova + m_src->buf_len;
>  			mdata -= len;
>  			mphys -= len;
>  			buf->vaddr = mdata;
> diff --git a/drivers/net/i40e/i40e_rxtx_vec_avx2.c b/drivers/net/i40e/i40e_rxtx_vec_avx2.c
> index 3bcef13638..37e7db5d7e 100644
> --- a/drivers/net/i40e/i40e_rxtx_vec_avx2.c
> +++ b/drivers/net/i40e/i40e_rxtx_vec_avx2.c
> @@ -59,8 +59,8 @@ i40e_rxq_rearm(struct i40e_rx_queue *rxq)
>  		mb0 = rxep[0].mbuf;
>  		mb1 = rxep[1].mbuf;
>  
> -		/* load buf_addr(lo 64bit) and buf_physaddr(hi 64bit) */
> -		RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_physaddr) !=
> +		/* load buf_addr(lo 64bit) and buf_iova(hi 64bit) */
> +		RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_iova) !=
>  				offsetof(struct rte_mbuf, buf_addr) + 8);
>  		vaddr0 = _mm_loadu_si128((__m128i *)&mb0->buf_addr);
>  		vaddr1 = _mm_loadu_si128((__m128i *)&mb1->buf_addr);
> @@ -92,8 +92,8 @@ i40e_rxq_rearm(struct i40e_rx_queue *rxq)
>  		mb2 = rxep[2].mbuf;
>  		mb3 = rxep[3].mbuf;
>  
> -		/* load buf_addr(lo 64bit) and buf_physaddr(hi 64bit) */
> -		RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_physaddr) !=
> +		/* load buf_addr(lo 64bit) and buf_iova(hi 64bit) */
> +		RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_iova) !=
>  				offsetof(struct rte_mbuf, buf_addr) + 8);
>  		vaddr0 = _mm_loadu_si128((__m128i *)&mb0->buf_addr);
>  		vaddr1 = _mm_loadu_si128((__m128i *)&mb1->buf_addr);
> @@ -814,7 +814,7 @@ vtx1(volatile struct i40e_tx_desc *txdp,
>  			((uint64_t)pkt->data_len << I40E_TXD_QW1_TX_BUF_SZ_SHIFT));
>  
>  	__m128i descriptor = _mm_set_epi64x(high_qw,
> -				pkt->buf_physaddr + pkt->data_off);
> +				pkt->buf_iova + pkt->data_off);
>  	_mm_store_si128((__m128i *)txdp, descriptor);
>  }
>  
> @@ -843,11 +843,11 @@ vtx(volatile struct i40e_tx_desc *txdp,
>  				((uint64_t)pkt[0]->data_len << I40E_TXD_QW1_TX_BUF_SZ_SHIFT);
>  
>  		__m256i desc2_3 = _mm256_set_epi64x(
> -				hi_qw3, pkt[3]->buf_physaddr + pkt[3]->data_off,
> -				hi_qw2, pkt[2]->buf_physaddr + pkt[2]->data_off);
> +				hi_qw3, pkt[3]->buf_iova + pkt[3]->data_off,
> +				hi_qw2, pkt[2]->buf_iova + pkt[2]->data_off);
>  		__m256i desc0_1 = _mm256_set_epi64x(
> -				hi_qw1, pkt[1]->buf_physaddr + pkt[1]->data_off,
> -				hi_qw0, pkt[0]->buf_physaddr + pkt[0]->data_off);
> +				hi_qw1, pkt[1]->buf_iova + pkt[1]->data_off,
> +				hi_qw0, pkt[0]->buf_iova + pkt[0]->data_off);
>  		_mm256_store_si256((void *)(txdp + 2), desc2_3);
>  		_mm256_store_si256((void *)txdp, desc0_1);
>  	}
> diff --git a/drivers/net/iavf/iavf_rxtx_vec_avx2.c b/drivers/net/iavf/iavf_rxtx_vec_avx2.c
> index e5e0fd3095..8f28afc8c5 100644
> --- a/drivers/net/iavf/iavf_rxtx_vec_avx2.c
> +++ b/drivers/net/iavf/iavf_rxtx_vec_avx2.c
> @@ -52,8 +52,8 @@ iavf_rxq_rearm(struct iavf_rx_queue *rxq)
>  		mb0 = rxp[0];
>  		mb1 = rxp[1];
>  
> -		/* load buf_addr(lo 64bit) and buf_physaddr(hi 64bit) */
> -		RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_physaddr) !=
> +		/* load buf_addr(lo 64bit) and buf_iova(hi 64bit) */
> +		RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_iova) !=
>  				offsetof(struct rte_mbuf, buf_addr) + 8);
>  		vaddr0 = _mm_loadu_si128((__m128i *)&mb0->buf_addr);
>  		vaddr1 = _mm_loadu_si128((__m128i *)&mb1->buf_addr);
> @@ -85,8 +85,8 @@ iavf_rxq_rearm(struct iavf_rx_queue *rxq)
>  		mb2 = rxp[2];
>  		mb3 = rxp[3];
>  
> -		/* load buf_addr(lo 64bit) and buf_physaddr(hi 64bit) */
> -		RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_physaddr) !=
> +		/* load buf_addr(lo 64bit) and buf_iova(hi 64bit) */
> +		RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_iova) !=
>  				offsetof(struct rte_mbuf, buf_addr) + 8);
>  		vaddr0 = _mm_loadu_si128((__m128i *)&mb0->buf_addr);
>  		vaddr1 = _mm_loadu_si128((__m128i *)&mb1->buf_addr);
> @@ -1391,7 +1391,7 @@ iavf_vtx1(volatile struct iavf_tx_desc *txdp,
>  		 ((uint64_t)pkt->data_len << IAVF_TXD_QW1_TX_BUF_SZ_SHIFT));
>  
>  	__m128i descriptor = _mm_set_epi64x(high_qw,
> -				pkt->buf_physaddr + pkt->data_off);
> +				pkt->buf_iova + pkt->data_off);
>  	_mm_store_si128((__m128i *)txdp, descriptor);
>  }
>  
> @@ -1430,15 +1430,15 @@ iavf_vtx(volatile struct iavf_tx_desc *txdp,
>  		__m256i desc2_3 =
>  			_mm256_set_epi64x
>  				(hi_qw3,
> -				 pkt[3]->buf_physaddr + pkt[3]->data_off,
> +				 pkt[3]->buf_iova + pkt[3]->data_off,
>  				 hi_qw2,
> -				 pkt[2]->buf_physaddr + pkt[2]->data_off);
> +				 pkt[2]->buf_iova + pkt[2]->data_off);
>  		__m256i desc0_1 =
>  			_mm256_set_epi64x
>  				(hi_qw1,
> -				 pkt[1]->buf_physaddr + pkt[1]->data_off,
> +				 pkt[1]->buf_iova + pkt[1]->data_off,
>  				 hi_qw0,
> -				 pkt[0]->buf_physaddr + pkt[0]->data_off);
> +				 pkt[0]->buf_iova + pkt[0]->data_off);
>  		_mm256_store_si256((void *)(txdp + 2), desc2_3);
>  		_mm256_store_si256((void *)txdp, desc0_1);
>  	}
> diff --git a/drivers/net/ice/ice_rxtx_vec_avx2.c b/drivers/net/ice/ice_rxtx_vec_avx2.c
> index be50677c2f..b653805160 100644
> --- a/drivers/net/ice/ice_rxtx_vec_avx2.c
> +++ b/drivers/net/ice/ice_rxtx_vec_avx2.c
> @@ -52,8 +52,8 @@ ice_rxq_rearm(struct ice_rx_queue *rxq)
>  		mb0 = rxep[0].mbuf;
>  		mb1 = rxep[1].mbuf;
>  
> -		/* load buf_addr(lo 64bit) and buf_physaddr(hi 64bit) */
> -		RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_physaddr) !=
> +		/* load buf_addr(lo 64bit) and buf_iova(hi 64bit) */
> +		RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_iova) !=
>  				offsetof(struct rte_mbuf, buf_addr) + 8);
>  		vaddr0 = _mm_loadu_si128((__m128i *)&mb0->buf_addr);
>  		vaddr1 = _mm_loadu_si128((__m128i *)&mb1->buf_addr);
> @@ -85,8 +85,8 @@ ice_rxq_rearm(struct ice_rx_queue *rxq)
>  		mb2 = rxep[2].mbuf;
>  		mb3 = rxep[3].mbuf;
>  
> -		/* load buf_addr(lo 64bit) and buf_physaddr(hi 64bit) */
> -		RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_physaddr) !=
> +		/* load buf_addr(lo 64bit) and buf_iova(hi 64bit) */
> +		RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_iova) !=
>  				offsetof(struct rte_mbuf, buf_addr) + 8);
>  		vaddr0 = _mm_loadu_si128((__m128i *)&mb0->buf_addr);
>  		vaddr1 = _mm_loadu_si128((__m128i *)&mb1->buf_addr);
> @@ -689,7 +689,7 @@ ice_vtx1(volatile struct ice_tx_desc *txdp,
>  		 ((uint64_t)pkt->data_len << ICE_TXD_QW1_TX_BUF_SZ_S));
>  
>  	__m128i descriptor = _mm_set_epi64x(high_qw,
> -				pkt->buf_physaddr + pkt->data_off);
> +				pkt->buf_iova + pkt->data_off);
>  	_mm_store_si128((__m128i *)txdp, descriptor);
>  }
>  
> @@ -728,15 +728,15 @@ ice_vtx(volatile struct ice_tx_desc *txdp,
>  		__m256i desc2_3 =
>  			_mm256_set_epi64x
>  				(hi_qw3,
> -				 pkt[3]->buf_physaddr + pkt[3]->data_off,
> +				 pkt[3]->buf_iova + pkt[3]->data_off,
>  				 hi_qw2,
> -				 pkt[2]->buf_physaddr + pkt[2]->data_off);
> +				 pkt[2]->buf_iova + pkt[2]->data_off);
>  		__m256i desc0_1 =
>  			_mm256_set_epi64x
>  				(hi_qw1,
> -				 pkt[1]->buf_physaddr + pkt[1]->data_off,
> +				 pkt[1]->buf_iova + pkt[1]->data_off,
>  				 hi_qw0,
> -				 pkt[0]->buf_physaddr + pkt[0]->data_off);
> +				 pkt[0]->buf_iova + pkt[0]->data_off);
>  		_mm256_store_si256((void *)(txdp + 2), desc2_3);
>  		_mm256_store_si256((void *)txdp, desc0_1);
>  	}
> diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c
> index c82c881a2c..4b752083da 100644
> --- a/kernel/linux/kni/kni_net.c
> +++ b/kernel/linux/kni/kni_net.c
> @@ -47,7 +47,7 @@ iova2kva(struct kni_dev *kni, void *iova)
>  static inline void *
>  iova2data_kva(struct kni_dev *kni, struct rte_kni_mbuf *m)
>  {
> -	return phys_to_virt(iova_to_phys(kni->usr_tsk, m->buf_physaddr) +
> +	return phys_to_virt(iova_to_phys(kni->usr_tsk, m->buf_iova) +
>  			    m->data_off);
>  }
>  #endif
> @@ -67,7 +67,7 @@ pa2va(void *pa, struct rte_kni_mbuf *m)
>  
>  	va = (void *)((unsigned long)pa +
>  			(unsigned long)m->buf_addr -
> -			(unsigned long)m->buf_physaddr);
> +			(unsigned long)m->buf_iova);
>  	return va;
>  }
>  
> @@ -75,7 +75,7 @@ pa2va(void *pa, struct rte_kni_mbuf *m)
>  static void *
>  kva2data_kva(struct rte_kni_mbuf *m)
>  {
> -	return phys_to_virt(m->buf_physaddr + m->data_off);
> +	return phys_to_virt(m->buf_iova + m->data_off);
>  }
>  
>  static inline void *
> diff --git a/lib/librte_eal/linux/include/rte_kni_common.h b/lib/librte_eal/linux/include/rte_kni_common.h
> index 7313ef504e..21b477f0aa 100644
> --- a/lib/librte_eal/linux/include/rte_kni_common.h
> +++ b/lib/librte_eal/linux/include/rte_kni_common.h
> @@ -75,7 +75,7 @@ struct rte_kni_fifo {
>   */
>  struct rte_kni_mbuf {
>  	void *buf_addr __attribute__((__aligned__(RTE_CACHE_LINE_SIZE)));
> -	uint64_t buf_physaddr;
> +	uint64_t buf_iova;
>  	uint16_t data_off;      /**< Start address of data in segment buffer. */
>  	char pad1[2];
>  	uint16_t nb_segs;       /**< Number of segments. */
> diff --git a/lib/librte_mbuf/rte_mbuf_core.h b/lib/librte_mbuf/rte_mbuf_core.h
> index cee3d5aff5..8c2c20644d 100644
> --- a/lib/librte_mbuf/rte_mbuf_core.h
> +++ b/lib/librte_mbuf/rte_mbuf_core.h
> @@ -476,11 +476,7 @@ struct rte_mbuf {
>  	 * same mbuf cacheline0 layout for 32-bit and 64-bit. This makes
>  	 * working on vector drivers easier.
>  	 */
> -	RTE_STD_C11
> -	union {
> -		rte_iova_t buf_iova;
> -		rte_iova_t buf_physaddr; /**< deprecated */
> -	} __rte_aligned(sizeof(rte_iova_t));
> +	rte_iova_t buf_iova __rte_aligned(sizeof(rte_iova_t));
>  
>  	/* next 8 bytes are initialised on RX descriptor rearm */
>  	RTE_MARKER64 rearm_data;
> 
Acked-by: Ray Kinsella <mdr@ashroe.eu>

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [dpdk-dev] [PATCH v2 4/4] mbuf: remove physical address alias
  2020-09-18 14:43     ` Kinsella, Ray
@ 2020-09-18 22:32       ` Thomas Monjalon
  0 siblings, 0 replies; 23+ messages in thread
From: Thomas Monjalon @ 2020-09-18 22:32 UTC (permalink / raw)
  To: Olivier Matz, Kinsella, Ray
  Cc: dev, david.marchand, Andrew Rybchenko, Neil Horman,
	John McNamara, Marko Kovacevic, Anoob Joseph, Beilei Xing,
	Jeff Guo, Jingjing Wu, Qiming Yang, Qi Zhang, Ferruh Yigit

18/09/2020 16:43, Kinsella, Ray:
> On 17/09/2020 11:41, Thomas Monjalon wrote:
> > Remove the deprecated buf_physaddr union field from rte_mbuf.
> > It is replaced with buf_iova which is at the same offset.
> > 
> > The single field buf_physaddr in rte_kni_mbuf is also renamed.
> > 
> > This concludes a 3-year process of semantic change.
> > 
> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> > Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
> Acked-by: Ray Kinsella <mdr@ashroe.eu>

Applied



^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, back to index

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-14 16:17 [dpdk-dev] [PATCH 0/4] remove aliases replaced with IOVA Thomas Monjalon
2020-09-14 16:17 ` [dpdk-dev] [PATCH 1/4] mem: remove physical address aliases Thomas Monjalon
2020-09-15  7:07   ` Andrew Rybchenko
2020-09-15 11:46   ` Burakov, Anatoly
2020-09-14 16:17 ` [dpdk-dev] [PATCH 2/4] mempool: " Thomas Monjalon
2020-09-15  7:08   ` Andrew Rybchenko
2020-09-14 16:17 ` [dpdk-dev] [PATCH 3/4] mbuf: remove deprecated function and macro aliases Thomas Monjalon
2020-09-15  7:09   ` Andrew Rybchenko
2020-09-15  8:38     ` Thomas Monjalon
2020-09-14 16:18 ` [dpdk-dev] [PATCH 4/4] mbuf: remove physical address alias Thomas Monjalon
2020-09-15  7:10   ` Andrew Rybchenko
2020-09-17 10:41 ` [dpdk-dev] [PATCH v2 0/4] remove aliases replaced with IOVA Thomas Monjalon
2020-09-17 10:41   ` [dpdk-dev] [PATCH v2 1/4] mem: remove physical address aliases Thomas Monjalon
2020-09-17 10:53     ` Hemant Agrawal
2020-09-18 14:38     ` Kinsella, Ray
2020-09-17 10:41   ` [dpdk-dev] [PATCH v2 2/4] mempool: " Thomas Monjalon
2020-09-18 14:39     ` Kinsella, Ray
2020-09-17 10:41   ` [dpdk-dev] [PATCH v2 3/4] mbuf: remove deprecated function and macro aliases Thomas Monjalon
2020-09-17 10:55     ` Hemant Agrawal
2020-09-18 14:42     ` Kinsella, Ray
2020-09-17 10:41   ` [dpdk-dev] [PATCH v2 4/4] mbuf: remove physical address alias Thomas Monjalon
2020-09-18 14:43     ` Kinsella, Ray
2020-09-18 22:32       ` Thomas Monjalon

DPDK patches and discussions

Archives are clonable:
	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/ public-inbox