[dpdk-dev,v3,19/68] net/i40e: use contiguous allocation for DMA memory
Checks
Commit Message
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
Notes:
v3:
- Moved patch earlier in the patchset
- Allowed experimental API in the build system
drivers/net/i40e/Makefile | 3 +++
drivers/net/i40e/i40e_ethdev.c | 2 +-
drivers/net/i40e/i40e_rxtx.c | 2 +-
drivers/net/i40e/meson.build | 3 +++
4 files changed, 8 insertions(+), 2 deletions(-)
@@ -19,6 +19,9 @@ EXPORT_MAP := rte_pmd_i40e_version.map
LIBABIVER := 2
+# contiguous memzone reserve API are not yet stable
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
#
# Add extra flags for base driver files (also known as shared code)
# to disable warnings
@@ -4053,7 +4053,7 @@ i40e_allocate_dma_mem_d(__attribute__((unused)) struct i40e_hw *hw,
return I40E_ERR_PARAM;
snprintf(z_name, sizeof(z_name), "i40e_dma_%"PRIu64, rte_rand());
- mz = rte_memzone_reserve_bounded(z_name, size, SOCKET_ID_ANY, 0,
+ mz = rte_memzone_reserve_bounded_contig(z_name, size, SOCKET_ID_ANY, 0,
alignment, RTE_PGSIZE_2M);
if (!mz)
return I40E_ERR_NO_MEMORY;
@@ -2189,7 +2189,7 @@ i40e_memzone_reserve(const char *name, uint32_t len, int socket_id)
if (mz)
return mz;
- mz = rte_memzone_reserve_aligned(name, len,
+ mz = rte_memzone_reserve_aligned_contig(name, len,
socket_id, 0, I40E_RING_BASE_ALIGN);
return mz;
}
@@ -46,3 +46,6 @@ endif
includes += include_directories('base')
install_headers('rte_pmd_i40e.h')
+
+# contig memzone allocation is not yet part of stable API
+allow_experimental_apis = true