[dpdk-dev,v3,18/68] net/enic: use contiguous allocation for DMA memory
Checks
Commit Message
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: John Daley <johndale@cisco.com>
---
Notes:
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/Makefile | 3 +++
drivers/net/enic/enic_main.c | 4 ++--
2 files changed, 5 insertions(+), 2 deletions(-)
@@ -13,6 +13,9 @@ EXPORT_MAP := rte_pmd_enic_version.map
LIBABIVER := 1
+# contiguous memzone reserve API are not yet stable
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
CFLAGS += -I$(SRCDIR)/base/
CFLAGS += -I$(SRCDIR)
CFLAGS += -O3
@@ -343,7 +343,7 @@ 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,
+ rz = rte_memzone_reserve_aligned_contig((const char *)name,
size, SOCKET_ID_ANY, 0, ENIC_ALIGN);
if (!rz) {
pr_err("%s : Failed to allocate memory requested for %s\n",
@@ -887,7 +887,7 @@ int enic_alloc_wq(struct enic *enic, uint16_t queue_idx,
"vnic_cqmsg-%s-%d-%d", enic->bdf_name, queue_idx,
instance++);
- wq->cqmsg_rz = rte_memzone_reserve_aligned((const char *)name,
+ wq->cqmsg_rz = rte_memzone_reserve_aligned_contig((const char *)name,
sizeof(uint32_t),
SOCKET_ID_ANY, 0,
ENIC_ALIGN);