All hardware drivers should allocate IOVA-contiguous
memzones for their hardware resources.

Signed-off-by: Anatoly Burakov <anatoly.bura...@intel.com>
Acked-by: John Daley <johnd...@cisco.com>
---

Notes:
    v4:
    - Use new memzone flag instead of new API
    - Remove experimental API from build files
    
    v3:
    - Add experimental API to build files
    
    v3:
    - Moved patch earlier in the patchset
    - Allowed experimental API in Makefile
    
    v3:
    - Moved patch earlier in the patchset
    - Allowed experimental API in the build system

 drivers/net/enic/enic_main.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index 69ad425..94e8e68 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -343,8 +343,8 @@ enic_alloc_consistent(void *priv, size_t size,
        struct enic *enic = (struct enic *)priv;
        struct enic_memzone_entry *mze;
 
-       rz = rte_memzone_reserve_aligned((const char *)name,
-                                        size, SOCKET_ID_ANY, 0, ENIC_ALIGN);
+       rz = rte_memzone_reserve_aligned((const char *)name, size,
+                       SOCKET_ID_ANY, RTE_MEMZONE_IOVA_CONTIG, ENIC_ALIGN);
        if (!rz) {
                pr_err("%s : Failed to allocate memory requested for %s\n",
                        __func__, name);
@@ -888,9 +888,8 @@ int enic_alloc_wq(struct enic *enic, uint16_t queue_idx,
                instance++);
 
        wq->cqmsg_rz = rte_memzone_reserve_aligned((const char *)name,
-                                                  sizeof(uint32_t),
-                                                  SOCKET_ID_ANY, 0,
-                                                  ENIC_ALIGN);
+                       sizeof(uint32_t), SOCKET_ID_ANY,
+                       RTE_MEMZONE_IOVA_CONTIG, ENIC_ALIGN);
        if (!wq->cqmsg_rz)
                return -ENOMEM;
 
-- 
2.7.4

Reply via email to