25 _get_session_tables (
void)
53 #define foreach_hash_table_parameter \
54 _(v4,session,buckets,20000) \
55 _(v4,session,memory,(64<<20)) \
56 _(v6,session,buckets,20000) \
57 _(v6,session,memory,(64<<20)) \
58 _(v4,halfopen,buckets,20000) \
59 _(v4,halfopen,memory,(64<<20)) \
60 _(v6,halfopen,buckets,20000) \
61 _(v6,halfopen,memory,(64<<20))
76 clib_bihash_free_16_8 (&slt->v4_session_hash);
77 clib_bihash_free_16_8 (&slt->v4_half_open_hash);
81 clib_bihash_free_48_8 (&slt->v6_session_hash);
82 clib_bihash_free_48_8 (&slt->v6_half_open_hash);
100 #define _(af,table,parm,value) \
101 u32 configured_##af##_##table##_table_##parm = value;
105 #define _(af,table,parm,value) \
106 if (session_main.configured_##af##_##table##_table_##parm) \
107 configured_##af##_##table##_table_##parm = \
108 session_main.configured_##af##_##table##_table_##parm;
114 clib_bihash_init2_args_16_8_t _a, *
a = &_a;
116 memset (
a, 0,
sizeof (*
a));
117 a->h = &slt->v4_session_hash;
118 a->name =
"v4 session table";
119 a->nbuckets = configured_v4_session_table_buckets;
120 a->memory_size = configured_v4_session_table_memory;
121 a->dont_add_to_all_bihash_list = 1;
122 a->instantiate_immediately = 1;
123 clib_bihash_init2_16_8 (
a);
125 memset (
a, 0,
sizeof (*
a));
126 a->h = &slt->v4_half_open_hash;
127 a->name =
"v4 half-open table";
128 a->nbuckets = configured_v4_halfopen_table_buckets;
129 a->memory_size = configured_v4_halfopen_table_memory;
130 a->dont_add_to_all_bihash_list = 1;
131 a->instantiate_immediately = 1;
132 clib_bihash_init2_16_8 (
a);
136 clib_bihash_init2_args_48_8_t _a, *
a = &_a;
138 memset (
a, 0,
sizeof (*
a));
139 a->h = &slt->v6_session_hash;
140 a->name =
"v6 session table";
141 a->nbuckets = configured_v6_session_table_buckets;
142 a->memory_size = configured_v6_session_table_memory;
143 a->dont_add_to_all_bihash_list = 1;
144 a->instantiate_immediately = 1;
145 clib_bihash_init2_48_8 (
a);
147 memset (
a, 0,
sizeof (*
a));
148 a->h = &slt->v6_half_open_hash;
149 a->name =
"v6 half-open table";
150 a->nbuckets = configured_v6_halfopen_table_buckets;
151 a->memory_size = configured_v6_halfopen_table_memory;
152 a->dont_add_to_all_bihash_list = 1;
153 a->instantiate_immediately = 1;
154 clib_bihash_init2_48_8 (
a);
162 typedef struct _ip4_session_table_walk_ctx_t
173 return (BIHASH_WALK_CONTINUE);