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))
75 #define _(af,table,parm,value) \
76 u32 configured_##af##_##table##_table_##parm = value;
80 #define _(af,table,parm,value) \
81 if (session_main.configured_##af##_##table##_table_##parm) \
82 configured_##af##_##table##_table_##parm = \
83 session_main.configured_##af##_##table##_table_##parm;
89 clib_bihash_init2_args_16_8_t _a, *
a = &_a;
91 memset (
a, 0,
sizeof (*
a));
92 a->h = &slt->v4_session_hash;
93 a->name =
"v4 session table";
94 a->nbuckets = configured_v4_session_table_buckets;
95 a->memory_size = configured_v4_session_table_memory;
96 a->dont_add_to_all_bihash_list = 1;
97 a->instantiate_immediately = 1;
98 clib_bihash_init2_16_8 (
a);
100 memset (
a, 0,
sizeof (*
a));
101 a->h = &slt->v4_half_open_hash;
102 a->name =
"v4 half-open table";
103 a->nbuckets = configured_v4_halfopen_table_buckets;
104 a->memory_size = configured_v4_halfopen_table_memory;
105 a->dont_add_to_all_bihash_list = 1;
106 a->instantiate_immediately = 1;
107 clib_bihash_init2_16_8 (
a);
111 clib_bihash_init2_args_48_8_t _a, *
a = &_a;
113 memset (
a, 0,
sizeof (*
a));
114 a->h = &slt->v6_session_hash;
115 a->name =
"v6 session table";
116 a->nbuckets = configured_v6_session_table_buckets;
117 a->memory_size = configured_v6_session_table_memory;
118 a->dont_add_to_all_bihash_list = 1;
119 a->instantiate_immediately = 1;
120 clib_bihash_init2_48_8 (
a);
122 memset (
a, 0,
sizeof (*
a));
123 a->h = &slt->v6_half_open_hash;
124 a->name =
"v6 half-open table";
125 a->nbuckets = configured_v6_halfopen_table_buckets;
126 a->memory_size = configured_v6_halfopen_table_memory;
127 a->dont_add_to_all_bihash_list = 1;
128 a->instantiate_immediately = 1;
129 clib_bihash_init2_48_8 (
a);
137 typedef struct _ip4_session_table_walk_ctx_t
148 return (BIHASH_WALK_CONTINUE);