Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
acl-plugin: autosize the ACL plugin heap and fix the heap size types and parsing
[vpp.git]
/
src
/
plugins
/
acl
/
hash_lookup.c
diff --git
a/src/plugins/acl/hash_lookup.c
b/src/plugins/acl/hash_lookup.c
index
ad55054
..
f706bad
100644
(file)
--- a/
src/plugins/acl/hash_lookup.c
+++ b/
src/plugins/acl/hash_lookup.c
@@
-154,6
+154,9
@@
hash_acl_set_heap(acl_main_t *am)
{
if (0 == am->hash_lookup_mheap) {
am->hash_lookup_mheap = mheap_alloc (0 /* use VM */ , am->hash_lookup_mheap_size);
{
if (0 == am->hash_lookup_mheap) {
am->hash_lookup_mheap = mheap_alloc (0 /* use VM */ , am->hash_lookup_mheap_size);
+ if (0 == am->hash_lookup_mheap) {
+ clib_error("ACL plugin failed to allocate hash lookup heap of %U bytes, abort", format_memory_size, am->hash_lookup_mheap_size);
+ }
mheap_t *h = mheap_header (am->hash_lookup_mheap);
h->flags |= MHEAP_FLAG_THREAD_SAFE;
}
mheap_t *h = mheap_header (am->hash_lookup_mheap);
h->flags |= MHEAP_FLAG_THREAD_SAFE;
}