[dpdk-stable] patch 'net/ena: change memory type' has been queued to stable release 18.05.1
Christian Ehrhardt
christian.ehrhardt at canonical.com
Mon Jul 30 18:10:56 CEST 2018
Hi,
FYI, your patch has been queued to stable release 18.05.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/01/18. So please
shout if anyone has objections.
Thanks.
Christian Ehrhardt <christian.ehrhardt at canonical.com>
---
>From 5b1a15bf781ed82a96aa37f40604768290090c5f Mon Sep 17 00:00:00 2001
From: Rafal Kozik <rk at semihalf.com>
Date: Thu, 7 Jun 2018 11:43:19 +0200
Subject: [PATCH] net/ena: change memory type
[ upstream commit 9f32c7e7e6ce58ab772913f54f8328c1c0186a17 ]
ENA_MEM_ALLOC_NODE not need to use contiguous physical memory.
Also using memset without checking if allocation succeed can cause
segmentation fault.
To avoid both issue use rte_zmalloc_socket.
Fixes: 3d3edc265fc8 ("net/ena: make coherent memory allocation NUMA-aware")
Signed-off-by: Rafal Kozik <rk at semihalf.com>
Acked-by: Michal Krawczyk <mk at semihalf.com>
---
drivers/net/ena/base/ena_plat_dpdk.h | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/net/ena/base/ena_plat_dpdk.h b/drivers/net/ena/base/ena_plat_dpdk.h
index 0ee440c21..e7917c506 100644
--- a/drivers/net/ena/base/ena_plat_dpdk.h
+++ b/drivers/net/ena/base/ena_plat_dpdk.h
@@ -226,15 +226,8 @@ typedef uint64_t dma_addr_t;
#define ENA_MEM_ALLOC_NODE(dmadev, size, virt, node, dev_node) \
do { \
- const struct rte_memzone *mz; \
- char z_name[RTE_MEMZONE_NAMESIZE]; \
ENA_TOUCH(dmadev); ENA_TOUCH(dev_node); \
- snprintf(z_name, sizeof(z_name), \
- "ena_alloc_%d", ena_alloc_cnt++); \
- mz = rte_memzone_reserve(z_name, size, node, \
- RTE_MEMZONE_IOVA_CONTIG); \
- memset(mz->addr, 0, size); \
- virt = mz->addr; \
+ virt = rte_zmalloc_socket(NULL, size, 0, node); \
} while (0)
#define ENA_MEM_ALLOC(dmadev, size) rte_zmalloc(NULL, size, 1)
--
2.17.1
More information about the stable
mailing list