From 8e1fdcaa3d76bd531d03897c9dfef0f6dc76c7c8 Mon Sep 17 00:00:00 2001 From: Pawel Wodkowski Date: Fri, 21 Sep 2018 13:56:38 +0200 Subject: [PATCH] mem: fix --huge-unlink option The final_va field is set during remap_segment() but this information is not propagated to temporal copy of huge page memory configuration so the unlink_hugepage_files() function wrongly assume that there is nothing to unlink. Fix this issue by checking orig_va instead of final_va. Fixes: 66cc45e293ed ("mem: replace memseg with memseg lists") Cc: stable@dpdk.org Signed-off-by: Pawel Wodkowski Acked-by: Anatoly Burakov --- lib/librte_eal/linuxapp/eal/eal_memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_eal/linuxapp/eal/eal_memory.c b/lib/librte_eal/linuxapp/eal/eal_memory.c index 4913fb05e3..31f44e524f 100644 --- a/lib/librte_eal/linuxapp/eal/eal_memory.c +++ b/lib/librte_eal/linuxapp/eal/eal_memory.c @@ -587,7 +587,7 @@ unlink_hugepage_files(struct hugepage_file *hugepg_tbl, for (page = 0; page < nrpages; page++) { struct hugepage_file *hp = &hugepg_tbl[page]; - if (hp->final_va != NULL && unlink(hp->filepath)) { + if (hp->orig_va != NULL && unlink(hp->filepath)) { RTE_LOG(WARNING, EAL, "%s(): Removing %s failed: %s\n", __func__, hp->filepath, strerror(errno)); } -- 2.20.1