diff mbox series

[2/4] mempool: remove physical address aliases

Message ID 20200914161801.572174-3-thomas@monjalon.net (mailing list archive)
State Superseded, archived
Headers show
Series remove aliases replaced with IOVA | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Thomas Monjalon Sept. 14, 2020, 4:17 p.m. UTC
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(-)

Comments

Andrew Rybchenko Sept. 15, 2020, 7:08 a.m. UTC | #1
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>
diff mbox series

Patch

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.