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_init_16_8 (&slt->v4_session_hash,
"v4 session table",
90 configured_v4_session_table_buckets,
91 configured_v4_session_table_memory);
92 clib_bihash_init_16_8 (&slt->v4_half_open_hash,
"v4 half-open table",
93 configured_v4_halfopen_table_buckets,
94 configured_v4_halfopen_table_memory);
98 clib_bihash_init_48_8 (&slt->v6_session_hash,
"v6 session table",
99 configured_v6_session_table_buckets,
100 configured_v6_session_table_memory);
101 clib_bihash_init_48_8 (&slt->v6_half_open_hash,
"v6 half-open table",
102 configured_v6_halfopen_table_buckets,
103 configured_v6_halfopen_table_memory);
110 typedef struct _ip4_session_table_walk_ctx_t
120 ctx->fn (kvp, ctx->ctx);
struct _ip4_session_table_walk_ctx_t ip4_session_table_walk_ctx_t
void session_rules_table_init(session_rules_table_t *srt)
session_table_t * session_table_alloc(void)
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
int(* ip4_session_table_walk_fn_t)(clib_bihash_kv_16_8_t *kvp, void *ctx)
#define foreach_hash_table_parameter
static session_table_t * lookup_tables
Pool of session tables.
void session_table_init(session_table_t *slt, u8 fib_proto)
Initialize session table hash tables.
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
#define pool_get_aligned(P, E, A)
Allocate an object E from a pool P with alignment A.
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
session_table_t * session_table_get(u32 table_index)
void ip4_session_table_walk(clib_bihash_16_8_t *hash, ip4_session_table_walk_fn_t fn, void *arg)
void ip4_session_table_walk_cb(clib_bihash_kv_16_8_t *kvp, void *arg)
struct _session_lookup_table session_table_t
u32 session_table_index(session_table_t *slt)
#define CLIB_CACHE_LINE_BYTES