Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
ipsec: Support MPLS over IPSec[46] interface
[vpp.git]
/
src
/
vnet
/
ip
/
ip4_mtrie.c
diff --git
a/src/vnet/ip/ip4_mtrie.c
b/src/vnet/ip/ip4_mtrie.c
index
258a0f7
..
7bfcf98
100644
(file)
--- a/
src/vnet/ip/ip4_mtrie.c
+++ b/
src/vnet/ip/ip4_mtrie.c
@@
-176,12
+176,9
@@
ply_create (ip4_fib_mtrie_t * m,
u32 leaf_prefix_len, u32 ply_base_len)
{
ip4_fib_mtrie_8_ply_t *p;
u32 leaf_prefix_len, u32 ply_base_len)
{
ip4_fib_mtrie_8_ply_t *p;
- void *old_heap;
/* Get cache aligned ply. */
/* Get cache aligned ply. */
- old_heap = clib_mem_set_heap (ip4_main.mtrie_mheap);
pool_get_aligned (ip4_ply_pool, p, CLIB_CACHE_LINE_BYTES);
pool_get_aligned (ip4_ply_pool, p, CLIB_CACHE_LINE_BYTES);
- clib_mem_set_heap (old_heap);
ply_8_init (p, init_leaf, leaf_prefix_len, ply_base_len);
return ip4_fib_mtrie_leaf_set_next_ply_index (p - ip4_ply_pool);
ply_8_init (p, init_leaf, leaf_prefix_len, ply_base_len);
return ip4_fib_mtrie_leaf_set_next_ply_index (p - ip4_ply_pool);
@@
-790,23
+787,18
@@
format_ip4_fib_mtrie (u8 * s, va_list * va)
/** Default heap size for the IPv4 mtries */
#define IP4_FIB_DEFAULT_MTRIE_HEAP_SIZE (32<<20)
/** Default heap size for the IPv4 mtries */
#define IP4_FIB_DEFAULT_MTRIE_HEAP_SIZE (32<<20)
+#ifndef MAP_HUGE_SHIFT
+#define MAP_HUGE_SHIFT 26
+#endif
static clib_error_t *
ip4_mtrie_module_init (vlib_main_t * vm)
{
CLIB_UNUSED (ip4_fib_mtrie_8_ply_t * p);
static clib_error_t *
ip4_mtrie_module_init (vlib_main_t * vm)
{
CLIB_UNUSED (ip4_fib_mtrie_8_ply_t * p);
- ip4_main_t *im = &ip4_main;
clib_error_t *error = NULL;
clib_error_t *error = NULL;
- uword *old_heap;
-
- if (0 == im->mtrie_heap_size)
- im->mtrie_heap_size = IP4_FIB_DEFAULT_MTRIE_HEAP_SIZE;
- im->mtrie_mheap = create_mspace (im->mtrie_heap_size, 1 /* locked */ );
/* Burn one ply so index 0 is taken */
/* Burn one ply so index 0 is taken */
- old_heap = clib_mem_set_heap (ip4_main.mtrie_mheap);
pool_get (ip4_ply_pool, p);
pool_get (ip4_ply_pool, p);
- clib_mem_set_heap (old_heap);
return (error);
}
return (error);
}