30 u32 translation_buckets = 1024;
31 u32 translation_memory_size = 128 << 20;
33 u32 b4_memory_size = 64 << 20;
68 clib_bihash_init_24_8 (&td->
in2out,
"in2out", translation_buckets,
69 translation_memory_size);
71 clib_bihash_init_8_8 (&td->
out2in,
"out2in", translation_buckets,
72 translation_memory_size);
74 clib_bihash_init_16_8 (&td->
b4_hash,
"b4s", b4_buckets, b4_memory_size);
96 dm->
is_ce = (
set != 0);
110 .fp_addr.ip4.as_u32 = 0,
121 .fp_addr.ip6.as_u64[0] = addr->
as_u64[0],
122 .fp_addr.ip6.as_u64[1] = addr->
as_u64[1],
153 .fp_addr.ip6.as_u64[0] = addr->
as_u64[0],
154 .fp_addr.ip6.as_u64[1] = addr->
as_u64[1],
166 return VNET_API_ERROR_FEATURE_DISABLED;
181 return VNET_API_ERROR_FEATURE_DISABLED;
197 .fp_addr.ip4.as_u32 = addr->
as_u32,
211 return VNET_API_ERROR_VALUE_EXIST;
214 #define _(N, i, n, s) \ 215 clib_bitmap_alloc (a->busy_##n##_port_bitmap, 65535); \ 216 a->busy_##n##_ports = 0; \ 217 vec_validate_init_empty (a->busy_##n##_ports_per_thread, tm->n_vlib_mains - 1, 0); 228 return VNET_API_ERROR_NO_SUCH_ENTRY;
229 #define _(N, id, n, s) \ 230 clib_bitmap_free (a->busy_##n##_port_bitmap); \ 231 vec_free (a->busy_##n##_ports_per_thread); #define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment) ...
void dslite_set_ce(dslite_main_t *dm, u8 set)
fib_protocol_t fp_proto
protocol type
void dslite_dpo_create(dpo_proto_t dproto, u32 aftr_index, dpo_id_t *dpo)
void dslite_init(vlib_main_t *vm)
u8 * format_dslite_trace(u8 *s, va_list *args)
ip4_address_t aftr_ip4_addr
#define vec_add2(V, P, N)
Add N elements to end of vector V, return pointer to new elements in P.
clib_bihash_16_8_t b4_hash
void fib_table_entry_special_remove(u32 fib_index, const fib_prefix_t *prefix, fib_source_t source)
Remove a 'special' entry from the FIB.
ip6_address_t b4_ip6_addr
A high priority source a plugin can use.
Aggregate type for a prefix.
char * name
The counter collection's name.
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
u32 dslite_in2out_slowpath_node_index
#define vec_del1(v, i)
Delete the element at index I.
snat_address_t * addr_pool
int dslite_add_del_pool_addr(dslite_main_t *dm, ip4_address_t *addr, u8 is_add)
int dslite_set_b4_ip4_addr(dslite_main_t *dm, ip4_address_t *addr)
void dslite_dpo_module_init(void)
ip6_address_t aftr_ip6_addr
ip4_address_t b4_ip4_addr
dslite_main_t dslite_main
vlib_node_t * vlib_get_node_by_name(vlib_main_t *vm, u8 *name)
fib_node_index_t fib_table_entry_special_dpo_add(u32 fib_index, const fib_prefix_t *prefix, fib_source_t source, fib_entry_flag_t flags, const dpo_id_t *dpo)
Add a 'special' entry to the FIB that links to the DPO passed A special entry is an entry that the FI...
void vlib_validate_simple_counter(vlib_simple_counter_main_t *cm, u32 index)
validate a simple counter
static void vlib_zero_simple_counter(vlib_simple_counter_main_t *cm, u32 index)
Clear a simple counter Clears the set of per-thread u16 counters, and the u64 counter.
uword * thread_registrations_by_name
vlib_simple_counter_main_t total_b4s
dslite_per_thread_data_t * per_thread_data
int dslite_set_aftr_ip4_addr(dslite_main_t *dm, ip4_address_t *addr)
char * stat_segment_name
Name in stat segment directory.
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
int dslite_set_b4_ip6_addr(dslite_main_t *dm, ip6_address_t *addr)
vlib_simple_counter_main_t total_sessions
#define DPO_INVALID
An initialiser for DPOs declared on the stack.
#define hash_get_mem(h, key)
void dslite_ce_dpo_create(dpo_proto_t dproto, u32 b4_index, dpo_id_t *dpo)
static vlib_thread_main_t * vlib_get_thread_main()
void dpo_reset(dpo_id_t *dpo)
reset a DPO ID The DPO will be unlocked.
#define vec_foreach(var, vec)
Vector iterator.
u8 * format_dslite_ce_trace(u8 *s, va_list *args)
clib_bihash_24_8_t in2out
u32 dslite_out2in_node_index
int dslite_set_aftr_ip6_addr(dslite_main_t *dm, ip6_address_t *addr)
u32 dslite_in2out_node_index