[dpdk-dev,RFC] eal_memory: Search only DPDK hugetlbfs maps

Message ID 1419355397-4954-1-git-send-email-vladz@cloudius-systems.com (mailing list archive)
State Accepted, archived
Headers

Commit Message

Vladislav Zolotarov Dec. 23, 2014, 5:23 p.m. UTC
  When scanning the hugetlbfs maps search only for the DPDK maps.
This will allow the application create its own hugetlbfs mappings
and use the DPDK facilities on the same hugetlbfs mount point.

Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
---
 lib/librte_eal/linuxapp/eal/eal_memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Thomas Monjalon Jan. 15, 2015, 1:18 p.m. UTC | #1
> When scanning the hugetlbfs maps search only for the DPDK maps.
> This will allow the application create its own hugetlbfs mappings
> and use the DPDK facilities on the same hugetlbfs mount point.
> 
> Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>

Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>

It is a RFC patch but there is no comment, so
Applied

Thanks
  

Patch

diff --git a/lib/librte_eal/linuxapp/eal/eal_memory.c b/lib/librte_eal/linuxapp/eal/eal_memory.c
index bae2507..a67a1b0 100644
--- a/lib/librte_eal/linuxapp/eal/eal_memory.c
+++ b/lib/librte_eal/linuxapp/eal/eal_memory.c
@@ -611,7 +611,7 @@  find_numasocket(struct hugepage_file *hugepg_tbl, struct hugepage_info *hpi)
 	}
 
 	snprintf(hugedir_str, sizeof(hugedir_str),
-			"%s/", hpi->hugedir);
+			"%s/%s", hpi->hugedir, internal_config.hugefile_prefix);
 
 	/* parse numa map */
 	while (fgets(buf, sizeof(buf), f) != NULL) {