git.droids-corp.org
/
dpdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
02e7f35
)
mem: error if requesting more segments than MAX_MEMSEG
author
Intel
<intel.com>
Tue, 12 Mar 2013 11:03:00 +0000
(12:03 +0100)
committer
Thomas Monjalon
<thomas.monjalon@6wind.com>
Thu, 25 Jul 2013 14:07:51 +0000
(16:07 +0200)
Signed-off-by: Intel
lib/librte_eal/linuxapp/eal/eal_memory.c
patch
|
blob
|
history
diff --git
a/lib/librte_eal/linuxapp/eal/eal_memory.c
b/lib/librte_eal/linuxapp/eal/eal_memory.c
index
6a91f35
..
ec43cdc
100644
(file)
--- a/
lib/librte_eal/linuxapp/eal/eal_memory.c
+++ b/
lib/librte_eal/linuxapp/eal/eal_memory.c
@@
-970,6
+970,18
@@
rte_eal_hugepage_init(void)
hugepage[i].memseg_id = j;
}
+ if (i < nrpages) {
+ RTE_LOG(ERR, EAL, "Can only reserve %d pages "
+ "from %d requested\n"
+ "Current %s=%d is not enough\n"
+ "Please either increase it or request less amount "
+ "of memory.\n",
+ i, nrpages, RTE_STR(CONFIG_RTE_MAX_MEMSEG),
+ RTE_MAX_MEMSEG);
+ return (-ENOMEM);
+ }
+
+
return 0;