[dpdk-dev,v3,15/68] net/bnx2x: 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's in the makefile
drivers/net/bnx2x/Makefile | 3 +++
drivers/net/bnx2x/bnx2x.c | 2 +-
drivers/net/bnx2x/bnx2x_rxtx.c | 3 ++-
3 files changed, 6 insertions(+), 2 deletions(-)
@@ -17,6 +17,9 @@ EXPORT_MAP := rte_pmd_bnx2x_version.map
LIBABIVER := 1
+# contiguous memzone reserve API are not yet stable
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
CFLAGS += -wd188 #188: enumerated type mixed with another type
endif
@@ -177,7 +177,7 @@ bnx2x_dma_alloc(struct bnx2x_softc *sc, size_t size, struct bnx2x_dma *dma,
rte_get_timer_cycles());
/* Caller must take care that strlen(mz_name) < RTE_MEMZONE_NAMESIZE */
- z = rte_memzone_reserve_aligned(mz_name, (uint64_t) (size),
+ z = rte_memzone_reserve_aligned_contig(mz_name, (uint64_t)size,
SOCKET_ID_ANY,
0, align);
if (z == NULL) {
@@ -26,7 +26,8 @@ ring_dma_zone_reserve(struct rte_eth_dev *dev, const char *ring_name,
if (mz)
return mz;
- return rte_memzone_reserve_aligned(z_name, ring_size, socket_id, 0, BNX2X_PAGE_SIZE);
+ return rte_memzone_reserve_aligned_contig(z_name, ring_size, socket_id,
+ 0, BNX2X_PAGE_SIZE);
}
static void