|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
19 #include <vpp/app/version.h>
99 u32 translation_buckets = 1024;
100 u32 translation_memory_size = 128 << 20;
101 u32 b4_buckets = 128;
102 u32 b4_memory_size = 64 << 20;
107 clib_bihash_init_24_8 (&td->
in2out,
"dslite in2out", translation_buckets,
108 translation_memory_size);
110 clib_bihash_init_8_8 (&td->
out2in,
"dslite out2in", translation_buckets,
111 translation_memory_size);
113 clib_bihash_init_16_8 (&td->
b4_hash,
"dslite b4s", b4_buckets, b4_memory_size);
154 .fp_addr.ip4.as_u32 = 0,
165 .fp_addr.ip6.as_u64[0] =
addr->as_u64[0],
166 .fp_addr.ip6.as_u64[1] =
addr->as_u64[1],
200 .fp_addr.ip6.as_u64[0] =
addr->as_u64[0],
201 .fp_addr.ip6.as_u64[1] =
addr->as_u64[1],
213 return VNET_API_ERROR_FEATURE_DISABLED;
228 return VNET_API_ERROR_FEATURE_DISABLED;
241 .fp_addr.ip4.as_u32 =
addr.as_u32,
287 .version = VPP_BUILD_VER,
288 .description =
"Dual-Stack Lite",
#define DPO_INVALID
An initialiser for DPOs declared on the stack.
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...
int dslite_set_aftr_ip6_addr(dslite_main_t *dm, ip6_address_t *addr)
clib_bihash_16_8_t b4_hash
dslite_per_thread_data_t * per_thread_data
fib_source_t nat_fib_src_hi
vlib_main_t vlib_node_runtime_t * node
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
static void dslite_init_datastructures(void)
ip6_address_t aftr_ip6_addr
static clib_error_t * dslite_config(vlib_main_t *vm, unformat_input_t *input)
@ FIB_ENTRY_FLAG_EXCLUSIVE
nat_alloc_ip4_addr_and_port_cb_t * alloc_addr_and_port_cb
void add_del_dslite_pool_addr_cb(ip4_address_t addr, u8 is_add, void *opaque)
#define VLIB_CONFIG_FUNCTION(x, n,...)
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.
u32 dslite_in2out_node_index
void dslite_set_ce(dslite_main_t *dm, u8 set)
int dslite_set_b4_ip4_addr(dslite_main_t *dm, ip4_address_t *addr)
vlib_simple_counter_main_t total_b4s
ip4_address_t aftr_ip4_addr
u8 * format_dslite_trace(u8 *s, va_list *args)
clib_error_t * dslite_api_hookup(vlib_main_t *vm)
uword * thread_registrations_by_name
char * name
The counter collection's name.
int dslite_set_aftr_ip4_addr(dslite_main_t *dm, ip4_address_t *addr)
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment)
nat_add_del_ip4_pool_addr_cb_t * add_del_pool_addr_cb
fib_source_t fib_source_allocate(const char *name, fib_source_priority_t prio, fib_source_behaviour_t bh)
vlib_simple_counter_main_t total_sessions
#define FIB_SOURCE_PRIORITY_HI
Some priority values that plugins might use when they are not to concerned where in the list they'll ...
#define hash_get_mem(h, key)
vlib_node_t * vlib_get_node_by_name(vlib_main_t *vm, u8 *name)
description fragment has unexpected format
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.
char * stat_segment_name
Name in stat segment directory.
#define VLIB_INIT_FUNCTION(x)
void dslite_dpo_create(dpo_proto_t dproto, u32 aftr_index, dpo_id_t *dpo)
void vlib_validate_simple_counter(vlib_simple_counter_main_t *cm, u32 index)
validate a simple counter
int nat_alloc_ip4_addr_and_port_cb_default(nat_ip4_pool_t *pool, u32 fib_index, u32 thread_index, u32 nat_thread_index, u16 port_per_thread, u16 protocol, nat_ip4_addr_port_t *out)
ip6_address_t b4_ip6_addr
u32 dslite_out2in_node_index
#define vec_foreach(var, vec)
Vector iterator.
u32 dslite_in2out_slowpath_node_index
fib_protocol_t fp_proto
protocol type
clib_bihash_24_8_t in2out
int dslite_set_b4_ip6_addr(dslite_main_t *dm, ip6_address_t *addr)
u8 * format_dslite_ce_trace(u8 *s, va_list *args)
clib_error_t *() vlib_init_function_t(struct vlib_main_t *vm)
@ FIB_SOURCE_BH_SIMPLE
add paths without path extensions
ip4_address_t b4_ip4_addr
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
enum fib_source_t_ fib_source_t
The different sources that can create a route.
void dslite_dpo_module_init(void)
dslite_main_t dslite_main
static vlib_thread_main_t * vlib_get_thread_main()
static clib_error_t * dslite_init(vlib_main_t *vm)
void dpo_reset(dpo_id_t *dpo)
reset a DPO ID The DPO will be unlocked.
Aggregate type for a prefix.
void dslite_ce_dpo_create(dpo_proto_t dproto, u32 b4_index, dpo_id_t *dpo)