memzone: rename address from physical to IOVA
[dpdk.git] / lib / librte_eal / common / include / rte_memzone.h
index 6a92222..6f0ba18 100644 (file)
@@ -53,6 +53,7 @@
 
 #include <stdio.h>
 #include <rte_memory.h>
+#include <rte_common.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -77,14 +78,16 @@ struct rte_memzone {
 #define RTE_MEMZONE_NAMESIZE 32       /**< Maximum length of memory zone name.*/
        char name[RTE_MEMZONE_NAMESIZE];  /**< Name of the memory zone. */
 
-       phys_addr_t phys_addr;            /**< Start physical address. */
+       RTE_STD_C11
+       union {
+               phys_addr_t phys_addr;        /**< deprecated - Start physical address. */
+               rte_iova_t iova;              /**< Start IO address. */
+       };
+       RTE_STD_C11
        union {
                void *addr;                   /**< Start virtual address. */
                uint64_t addr_64;             /**< Makes sure addr is always 64-bits */
        };
-#ifdef RTE_LIBRTE_IVSHMEM
-       phys_addr_t ioremap_addr;         /**< Real physical address inside the VM */
-#endif
        size_t len;                       /**< Length of the memzone. */
 
        uint64_t hugepage_sz;             /**< The page size of underlying memory */
@@ -92,7 +95,7 @@ struct rte_memzone {
        int32_t socket_id;                /**< NUMA socket ID. */
 
        uint32_t flags;                   /**< Characteristics of this memzone. */
-       uint32_t memseg_id;             /** <store the memzone is from which memseg. */
+       uint32_t memseg_id;               /**< Memseg it belongs. */
 } __attribute__((__packed__));
 
 /**
@@ -100,7 +103,7 @@ struct rte_memzone {
  *
  * This function reserves some memory and returns a pointer to a
  * correctly filled memzone descriptor. If the allocation cannot be
- * done, return NULL. Note: A reserved zone cannot be freed.
+ * done, return NULL.
  *
  * @param name
  *   The name of the memzone. If it already exists, the function will
@@ -151,7 +154,6 @@ const struct rte_memzone *rte_memzone_reserve(const char *name,
  * boundary, and returns a pointer to a correctly filled memzone
  * descriptor. If the allocation cannot be done or if the alignment
  * is not a power of 2, returns NULL.
- * Note: A reserved zone cannot be freed.
  *
  * @param name
  *   The name of the memzone. If it already exists, the function will
@@ -207,7 +209,6 @@ const struct rte_memzone *rte_memzone_reserve_aligned(const char *name,
  * Memory buffer is reserved in a way, that it wouldn't cross specified
  * boundary. That implies that requested length should be less or equal
  * then boundary.
- * Note: A reserved zone cannot be freed.
  *
  * @param name
  *   The name of the memzone. If it already exists, the function will
@@ -258,12 +259,10 @@ const struct rte_memzone *rte_memzone_reserve_bounded(const char *name,
 /**
  * Free a memzone.
  *
- * Note: an IVSHMEM zone cannot be freed.
- *
  * @param mz
  *   A pointer to the memzone
  * @return
- *  -EINVAL - invalid parameter, IVSHMEM memzone.
+ *  -EINVAL - invalid parameter.
  *  0 - success
  */
 int rte_memzone_free(const struct rte_memzone *mz);
@@ -282,7 +281,7 @@ int rte_memzone_free(const struct rte_memzone *mz);
 const struct rte_memzone *rte_memzone_lookup(const char *name);
 
 /**
- * Dump all reserved memzones to the console.
+ * Dump all reserved memzones to a file.
  *
  * @param f
  *   A pointer to a file for output