From eca9a994bcf56bbb5ef6c582c5ef915051371901 Mon Sep 17 00:00:00 2001 From: Olivier Matz Date: Fri, 25 Apr 2014 13:59:47 +0200 Subject: [PATCH] mem: get hugepages config for bsd The bsdapp part was missing in c5e9eeca5a67a8272f0fdedcd0afc9b2d22be376. This commit allows external libraries and applications to know if hugepages are enabled. Signed-off-by: Olivier Matz Acked-by: Neil Horman --- lib/librte_eal/bsdapp/eal/eal.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c index e944abae04..7bac3521ae 100644 --- a/lib/librte_eal/bsdapp/eal/eal.c +++ b/lib/librte_eal/bsdapp/eal/eal.c @@ -759,6 +759,12 @@ rte_eal_mcfg_complete(void) rte_config.mem_config->magic = RTE_MAGIC; } +/* return non-zero if hugepages are enabled. */ +int rte_eal_has_hugepages(void) +{ + return !internal_config.no_hugetlbfs; +} + /* Abstraction for port I/0 privilage */ static int rte_eal_iopl_init(void) -- 2.20.1