summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGagandeep Singh <g.singh@nxp.com>2019-08-08 17:43:20 +0530
committerKevin Traynor <ktraynor@redhat.com>2019-09-13 10:37:20 +0100
commit4656108a0c0ca4fd1ac7a6d40b98c7b8d74b792b (patch)
tree6fee8706631786aa54c9641513652055ff9ff123
parent221f066b8bb098925e0f939159666e1c6477c15a (diff)
downloaddpdk-stable-4656108a0c0ca4fd1ac7a6d40b98c7b8d74b792b.zip
dpdk-stable-4656108a0c0ca4fd1ac7a6d40b98c7b8d74b792b.tar.gz
dpdk-stable-4656108a0c0ca4fd1ac7a6d40b98c7b8d74b792b.tar.xz
eal: increase maximum different hugepage sizes on Arm
[ upstream commit 47caefc163b884ed1911c6eec74d329d63ee46c5 ] ARM is supporting maximum 4 hugepage sizes (64K, 2M, 32M and 1G) when granule is 4KB since very long and DPDK support maximum 3 hugepage sizes. With all 4 hugepage sizes enabled, applications and some stacks like VPP which are working over DPDK and using "in-memory" eal option, or using separate mount points on ARM based platform, fails at huge page initialization, reporting error messages from eal: EAL: FATAL: Cannot get hugepage information. EAL: Cannot get hugepage information. EAL: Error - exiting with code: 1 This issue is originated from Linux 5.0 (a21b0b78eaf7 "arm64: hugetlb: Register hugepages during arch init") where kernel is by default creating directories for each supported hugepage size in /sys/kernel/mm/hugepages/ On earlier Stable Kernel LTR's, the directories visible in /sys/kernel/mm/hugepages/ were dependent upon what hugepage sizes are configured at boot time. This change increases the maximum supported hugepage sizes to 4 for ARM based platforms. Signed-off-by: Gagandeep Singh <g.singh@nxp.com> Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
-rw-r--r--lib/librte_eal/common/eal_internal_cfg.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/librte_eal/common/eal_internal_cfg.h b/lib/librte_eal/common/eal_internal_cfg.h
index 189d4f5..ae92ec2 100644
--- a/lib/librte_eal/common/eal_internal_cfg.h
+++ b/lib/librte_eal/common/eal_internal_cfg.h
@@ -15,7 +15,11 @@
#include "eal_thread.h"
+#if defined(RTE_ARCH_ARM) || defined(RTE_ARCH_ARM64)
+#define MAX_HUGEPAGE_SIZES 4 /**< support up to 4 page sizes */
+#else
#define MAX_HUGEPAGE_SIZES 3 /**< support up to 3 page sizes */
+#endif
/*
* internal configuration structure for the number, size and