From: Michal Krawczyk Date: Thu, 7 Jun 2018 09:43:21 +0000 (+0200) Subject: net/ena: store handle after memory allocation X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=cacd18760652cc92d978d52edf07b327c144cc6f;p=dpdk.git net/ena: store handle after memory allocation The pointer received from rte_memzone_reserve from macro ENA_MEM_ALLOC_COHERENT_NODE was not stored anywhere, and as a result memory allocated by this macro could not been released. Signed-off-by: Michal Krawczyk --- diff --git a/drivers/net/ena/base/ena_plat_dpdk.h b/drivers/net/ena/base/ena_plat_dpdk.h index 8a04e84b9d..900ba1a6b0 100644 --- a/drivers/net/ena/base/ena_plat_dpdk.h +++ b/drivers/net/ena/base/ena_plat_dpdk.h @@ -237,6 +237,7 @@ extern uint32_t ena_alloc_cnt; "ena_alloc_%d", ena_alloc_cnt++); \ mz = rte_memzone_reserve(z_name, size, node, \ RTE_MEMZONE_IOVA_CONTIG); \ + mem_handle = mz; \ if (mz == NULL) { \ virt = NULL; \ phys = 0; \ @@ -245,7 +246,6 @@ extern uint32_t ena_alloc_cnt; virt = mz->addr; \ phys = mz->iova; \ } \ - (void)mem_handle; \ } while (0) #define ENA_MEM_ALLOC_NODE(dmadev, size, virt, node, dev_node) \