summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatoly Burakov <anatoly.burakov@intel.com>2018-04-20 16:25:25 +0100
committerThomas Monjalon <thomas@monjalon.net>2018-04-27 23:52:51 +0200
commita99e8df63f8ab4b782dc5249682ab1152ff2965f (patch)
tree009c57ae018c781aa7a2386f81f562fa18f7a037
parent64b6fcb1610814c68b3f6fe57f59732b98502aa3 (diff)
downloaddpdk-a99e8df63f8ab4b782dc5249682ab1152ff2965f.zip
dpdk-a99e8df63f8ab4b782dc5249682ab1152ff2965f.tar.gz
dpdk-a99e8df63f8ab4b782dc5249682ab1152ff2965f.tar.xz
mem: fix 32-bit memory upper limit for non-legacy mode
32-bit mode has an upper limit on amount of VA space it can preallocate, but the original implementation used the wrong constant, resulting in failure to initialize due to integer overflow. Fix it by using the correct constant. Fixes: 66cc45e293ed ("mem: replace memseg with memseg lists") Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> Tested-by: Jananee Parthasarathy <jananeex.m.parthasarathy@intel.com>
-rw-r--r--lib/librte_eal/common/eal_common_memory.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/librte_eal/common/eal_common_memory.c b/lib/librte_eal/common/eal_common_memory.c
index 3e30c58..54329dc 100644
--- a/lib/librte_eal/common/eal_common_memory.c
+++ b/lib/librte_eal/common/eal_common_memory.c
@@ -249,7 +249,7 @@ memseg_primary_init_32(void)
else
total_requested_mem = internal_config.memory;
- max_mem = (uint64_t) RTE_MAX_MEM_MB_PER_TYPE << 20;
+ max_mem = (uint64_t)RTE_MAX_MEM_MB << 20;
if (total_requested_mem > max_mem) {
RTE_LOG(ERR, EAL, "Invalid parameters: 32-bit process can at most use %uM of memory\n",
(unsigned int)(max_mem >> 20));