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);
76 dm->
is_ce = (
set != 0);
90 .fp_addr.ip4.as_u32 = 0,
101 .fp_addr.ip6.as_u64[0] = addr->
as_u64[0],
102 .fp_addr.ip6.as_u64[1] = addr->
as_u64[1],
133 .fp_addr.ip6.as_u64[0] = addr->
as_u64[0],
134 .fp_addr.ip6.as_u64[1] = addr->
as_u64[1],
146 return VNET_API_ERROR_FEATURE_DISABLED;
161 return VNET_API_ERROR_FEATURE_DISABLED;
177 .fp_addr.ip4.as_u32 = addr->
as_u32,
191 return VNET_API_ERROR_VALUE_EXIST;
194 #define _(N, i, n, s) \ 195 clib_bitmap_alloc (a->busy_##n##_port_bitmap, 65535); \ 196 a->busy_##n##_ports = 0; \ 197 vec_validate_init_empty (a->busy_##n##_ports_per_thread, tm->n_vlib_mains - 1, 0); 208 return VNET_API_ERROR_NO_SUCH_ENTRY;
209 #define _(N, id, n, s) \ 210 clib_bitmap_free (a->busy_##n##_port_bitmap); \ 211 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.
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)
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
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
int dslite_set_aftr_ip4_addr(dslite_main_t *dm, ip4_address_t *addr)
#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)
#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
int dslite_set_aftr_ip6_addr(dslite_main_t *dm, ip6_address_t *addr)