ethdev: use contiguous allocation for DMA memory
authorAnatoly Burakov <anatoly.burakov@intel.com>
Wed, 11 Apr 2018 12:29:47 +0000 (13:29 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 11 Apr 2018 17:44:53 +0000 (19:44 +0200)
All hardware drivers should allocate IOVA-contiguous
memzones for their hardware resources.

This fixes the following drivers in one go:

grep -Rl rte_eth_dma_zone_reserve drivers/

drivers/net/avf/avf_rxtx.c
drivers/net/thunderx/nicvf_ethdev.c
drivers/net/e1000/igb_rxtx.c
drivers/net/e1000/em_rxtx.c
drivers/net/fm10k/fm10k_ethdev.c
drivers/net/vmxnet3/vmxnet3_rxtx.c
drivers/net/liquidio/lio_rxtx.c
drivers/net/i40e/i40e_rxtx.c
drivers/net/sfc/sfc.c
drivers/net/ixgbe/ixgbe_rxtx.c
drivers/net/nfp/nfp_net.c

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Tested-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Tested-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Tested-by: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
lib/librte_ether/rte_ethdev.c

index 2c74f7e..d0cf0e7 100644 (file)
@@ -3403,7 +3403,8 @@ rte_eth_dma_zone_reserve(const struct rte_eth_dev *dev, const char *ring_name,
        if (mz)
                return mz;
 
-       return rte_memzone_reserve_aligned(z_name, size, socket_id, 0, align);
+       return rte_memzone_reserve_aligned(z_name, size, socket_id,
+                       RTE_MEMZONE_IOVA_CONTIG, align);
 }
 
 int