29 u32 translation_buckets = 1024;
30 u32 translation_memory_size = 128 << 20;
32 u32 b4_memory_size = 64 << 20;
58 clib_bihash_init_24_8 (&td->
in2out,
"in2out", translation_buckets,
59 translation_memory_size);
61 clib_bihash_init_8_8 (&td->
out2in,
"out2in", translation_buckets,
62 translation_memory_size);
64 clib_bihash_init_16_8 (&td->
b4_hash,
"b4s", b4_buckets, b4_memory_size);
80 .fp_addr.ip6.as_u64[0] = addr->
as_u64[0],
81 .fp_addr.ip6.as_u64[1] = addr->
as_u64[1],
102 .fp_addr.ip4.as_u32 = addr->
as_u32,
116 return VNET_API_ERROR_VALUE_EXIST;
119 #define _(N, i, n, s) \ 120 clib_bitmap_alloc (a->busy_##n##_port_bitmap, 65535); \ 121 a->busy_##n##_ports = 0; \ 122 vec_validate_init_empty (a->busy_##n##_ports_per_thread, tm->n_vlib_mains - 1, 0); 133 return VNET_API_ERROR_NO_SUCH_ENTRY;
134 #define _(N, id, n, s) \ 135 clib_bitmap_free (a->busy_##n##_port_bitmap); \ 136 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) ...
fib_protocol_t fp_proto
protocol type
void dslite_dpo_create(dpo_proto_t dproto, u32 aftr_index, dpo_id_t *dpo)
sll srl srl sll sra u16x4 i
void dslite_init(vlib_main_t *vm)
u8 * format_dslite_trace(u8 *s, va_list *args)
#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.
A high priority source a plugin can use.
Aggregrate type for a prefix.
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
#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)
void dslite_dpo_module_init(void)
ip6_address_t aftr_ip6_addr
dslite_main_t dslite_main
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...
uword * thread_registrations_by_name
dslite_per_thread_data_t * per_thread_data
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
#define DPO_INVALID
An initialiser for DPOs declared on the stack.
#define hash_get_mem(h, key)
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.
clib_bihash_24_8_t in2out
int dslite_set_aftr_ip6_addr(dslite_main_t *dm, ip6_address_t *addr)