From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-we0-f169.google.com (mail-we0-f169.google.com [74.125.82.169]) by dpdk.org (Postfix) with ESMTP id 8679EAFD4 for ; Fri, 25 Apr 2014 14:00:18 +0200 (CEST) Received: by mail-we0-f169.google.com with SMTP id u56so2324325wes.28 for ; Fri, 25 Apr 2014 05:00:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=GxDa3dMMj+jCn6gIheVfUBlCcGBU3yu1Slk3jGNABfc=; b=XLRGIGP0PnI+NMZ+hOh/q5K/Yps/ZZhLXQS8qOJ7q+/tZij8Uj/KpwjgE8Grn/ct9T 1gd3sji7xlApaPfFYxBARf6XR5g59Bnekb3TYzXEgn3/RPaS+/jqcPgren9ma7eDs1zq Ln9jHrTSJGlYisOyO3Etg6+umCVx8eHTV9GQOVjJSYME4Js0qXTZJMVx5Px6S5sEGetx XOgUADegEu/nnm8EVlFRIMjFhiyuEjb4ITIt9tqgkgOIf7w+LTbiiTfGdetOKTsVZFCn ensc0y7ww3pqC8QJmkFcgzcgcS6FeNn6mu8EtheQ/UyJMBshaFU9aZf22R0uGnOtm+WU eSDg== X-Gm-Message-State: ALoCoQnbFepgKd9KD6/Sz3lAHRgIw9zJHDPNto93GTx91IYEwkVrZCp1apXNQAROhk5dKbX8BLlW X-Received: by 10.194.82.35 with SMTP id f3mr6557815wjy.36.1398427221380; Fri, 25 Apr 2014 05:00:21 -0700 (PDT) Received: from glumotte.dev.6wind.com (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id q2sm5487386wix.5.2014.04.25.05.00.20 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 25 Apr 2014 05:00:20 -0700 (PDT) From: Olivier Matz To: dev@dpdk.org Date: Fri, 25 Apr 2014 13:59:47 +0200 Message-Id: <1398427188-14914-10-git-send-email-olivier.matz@6wind.com> X-Mailer: git-send-email 1.9.2 In-Reply-To: <1398427188-14914-1-git-send-email-olivier.matz@6wind.com> References: <1398427188-14914-1-git-send-email-olivier.matz@6wind.com> Subject: [dpdk-dev] [PATCH 09/10] bsd/mem: get hugepages config X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Apr 2014 12:00:18 -0000 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 --- 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 633069e..3b2b47f 100644 --- a/lib/librte_eal/bsdapp/eal/eal.c +++ b/lib/librte_eal/bsdapp/eal/eal.c @@ -777,6 +777,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) -- 1.9.2