From: Olivier Matz Date: Fri, 25 Apr 2014 11:59:47 +0000 (+0200) Subject: mem: get hugepages config for bsd X-Git-Tag: spdx-start~10877 X-Git-Url: http://git.droids-corp.org/?p=dpdk.git;a=commitdiff_plain;h=eca9a994bcf56bbb5ef6c582c5ef915051371901 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 --- 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)