FD.io VPP
v16.09
Vector Packet Processing
|
Go to the source code of this file.
Data Structures | |
struct | map_domain_t |
union | map_ip4_reass_key_t |
struct | map_ip4_reass_t |
union | map_ip6_reass_key_t |
struct | map_ip6_fragment_t |
struct | map_ip6_reass_t |
struct | map_main_t |
struct | map_trace_t |
Macros | |
#define | MAP_SKIP_IP6_LOOKUP 1 |
#define | MAP_IP4_REASS_LIFETIME_DEFAULT (100) /* ms */ |
IP4 reassembly logic: One virtually reassembled flow requires a map_ip4_reass_t structure in order to keep the first-fragment port number and, optionally, cache out of sequence packets. More... | |
#define | MAP_IP4_REASS_HT_RATIO_DEFAULT (1.0) |
#define | MAP_IP4_REASS_POOL_SIZE_DEFAULT 1024 |
#define | MAP_IP4_REASS_BUFFERS_DEFAULT 2048 |
#define | MAP_IP4_REASS_MAX_FRAGMENTS_PER_REASSEMBLY 5 |
#define | MAP_IP6_REASS_LIFETIME_DEFAULT (100) /* ms */ |
#define | MAP_IP6_REASS_HT_RATIO_DEFAULT (1.0) |
#define | MAP_IP6_REASS_POOL_SIZE_DEFAULT 1024 |
#define | MAP_IP6_REASS_BUFFERS_DEFAULT 2048 |
#define | MAP_IP6_REASS_MAX_FRAGMENTS_PER_REASSEMBLY 5 |
#define | MAP_IP6_REASS_COUNT_BYTES |
#define | MAP_IP4_REASS_COUNT_BYTES |
#define | MAP_REASS_INDEX_NONE ((u16)0xffff) |
#define | foreach_map_error |
#define | map_ip4_reass_lock() while (__sync_lock_test_and_set(map_main.ip4_reass_lock, 1)) {} |
#define | map_ip4_reass_unlock() do {CLIB_MEMORY_BARRIER(); *map_main.ip4_reass_lock = 0;} while(0) |
#define | map_ip6_reass_lock() while (__sync_lock_test_and_set(map_main.ip6_reass_lock, 1)) {} |
#define | map_ip6_reass_unlock() do {CLIB_MEMORY_BARRIER(); *map_main.ip6_reass_lock = 0;} while(0) |
#define | MAP_IP4_REASS_CONF_HT_RATIO_MAX 100 |
#define | MAP_IP4_REASS_CONF_POOL_SIZE_MAX (0xfeff) |
#define | MAP_IP4_REASS_CONF_LIFETIME_MAX 0xffff |
#define | MAP_IP4_REASS_CONF_BUFFERS_MAX (0xffffffff) |
#define | MAP_IP6_REASS_CONF_HT_RATIO_MAX 100 |
#define | MAP_IP6_REASS_CONF_POOL_SIZE_MAX (0xfeff) |
#define | MAP_IP6_REASS_CONF_LIFETIME_MAX 0xffff |
#define | MAP_IP6_REASS_CONF_BUFFERS_MAX (0xffffffff) |
#define | u8_ptr_add(ptr, index) (((u8 *)ptr) + index) |
#define | u16_net_add(u, val) clib_host_to_net_u16(clib_net_to_host_u16(u) + (val)) |
#define | frag_id_6to4(id) ((id) ^ ((id) >> 16)) |
Enumerations | |
enum | map_dir_e { MAP_SENDER, MAP_RECEIVER } |
enum | map_domain_flags_e { MAP_DOMAIN_PREFIX = 1 << 0, MAP_DOMAIN_TRANSLATION = 1 << 1 } |
enum | map_domain_counter_t { MAP_DOMAIN_IPV4_FRAGMENT = 0, MAP_DOMAIN_COUNTER_RX = 0, MAP_DOMAIN_COUNTER_TX, MAP_N_DOMAIN_COUNTER } |
enum | map_error_t { MAP_N_ERROR } |
Variables | |
map_main_t | map_main |
vlib_node_registration_t | ip4_map_node |
(constructor) VLIB_REGISTER_NODE (ip4_map_node) More... | |
vlib_node_registration_t | ip6_map_node |
(constructor) VLIB_REGISTER_NODE (ip6_map_node) More... | |
vlib_node_registration_t | ip4_map_t_node |
(constructor) VLIB_REGISTER_NODE (ip4_map_t_node) More... | |
vlib_node_registration_t | ip4_map_t_fragmented_node |
(constructor) VLIB_REGISTER_NODE (ip4_map_t_fragmented_node) More... | |
vlib_node_registration_t | ip4_map_t_tcp_udp_node |
(constructor) VLIB_REGISTER_NODE (ip4_map_t_tcp_udp_node) More... | |
vlib_node_registration_t | ip4_map_t_icmp_node |
(constructor) VLIB_REGISTER_NODE (ip4_map_t_icmp_node) More... | |
vlib_node_registration_t | ip6_map_t_node |
(constructor) VLIB_REGISTER_NODE (ip6_map_t_node) More... | |
vlib_node_registration_t | ip6_map_t_fragmented_node |
(constructor) VLIB_REGISTER_NODE (ip6_map_t_fragmented_node) More... | |
vlib_node_registration_t | ip6_map_t_tcp_udp_node |
(constructor) VLIB_REGISTER_NODE (ip6_map_t_tcp_udp_node) More... | |
vlib_node_registration_t | ip6_map_t_icmp_node |
(constructor) VLIB_REGISTER_NODE (ip6_map_t_icmp_node) More... | |
#define foreach_map_error |
#define MAP_IP4_REASS_LIFETIME_DEFAULT (100) /* ms */ |
IP4 reassembly logic: One virtually reassembled flow requires a map_ip4_reass_t structure in order to keep the first-fragment port number and, optionally, cache out of sequence packets.
There are up to MAP_IP4_REASS_MAX_REASSEMBLY such structures. When in use, those structures are stored in a hash table of MAP_IP4_REASS_BUCKETS buckets. When a new structure needs to be used, it is allocated from available ones. If there is no structure available, the oldest in use is selected and used if and only if it was first allocated more than MAP_IP4_REASS_LIFETIME seconds ago. In case no structure can be allocated, the fragment is dropped.
#define map_ip4_reass_lock | ( | ) | while (__sync_lock_test_and_set(map_main.ip4_reass_lock, 1)) {} |
#define map_ip4_reass_unlock | ( | ) | do {CLIB_MEMORY_BARRIER(); *map_main.ip4_reass_lock = 0;} while(0) |
#define map_ip6_reass_lock | ( | ) | while (__sync_lock_test_and_set(map_main.ip6_reass_lock, 1)) {} |
#define map_ip6_reass_unlock | ( | ) | do {CLIB_MEMORY_BARRIER(); *map_main.ip6_reass_lock = 0;} while(0) |
#define u16_net_add | ( | u, | |
val | |||
) | clib_host_to_net_u16(clib_net_to_host_u16(u) + (val)) |
enum map_domain_counter_t |
enum map_domain_flags_e |
enum map_error_t |
i32 ip4_get_port | ( | ip4_header_t * | ip, |
map_dir_e | dir, | ||
u16 | buffer_len | ||
) |
static_always_inline map_domain_t* ip4_map_get_domain | ( | u32 | adj_index, |
u32 * | map_domain_index | ||
) |
u16 ip4_map_get_port | ( | ip4_header_t * | ip, |
map_dir_e | dir | ||
) |
static_always_inline void ip4_map_t_embedded_address | ( | map_domain_t * | d, |
ip6_address_t * | ip6, | ||
const ip4_address_t * | ip4 | ||
) |
i32 ip6_get_port | ( | ip6_header_t * | ip6, |
map_dir_e | dir, | ||
u16 | buffer_len | ||
) |
static_always_inline map_domain_t* ip6_map_get_domain | ( | u32 | adj_index, |
ip4_address_t * | addr, | ||
u32 * | map_domain_index, | ||
u8 * | error | ||
) |
static_always_inline u32 ip6_map_t_embedded_address | ( | map_domain_t * | d, |
ip6_address_t * | addr | ||
) |
static_always_inline int ip6_parse | ( | const ip6_header_t * | ip6, |
u32 | buff_len, | ||
u8 * | l4_protocol, | ||
u16 * | l4_offset, | ||
u16 * | frag_hdr_offset | ||
) |
int map_add_del_psid | ( | u32 | map_domain_index, |
u16 | psid, | ||
ip6_address_t * | tep, | ||
u8 | is_add | ||
) |
int map_create_domain | ( | ip4_address_t * | ip4_prefix, |
u8 | ip4_prefix_len, | ||
ip6_address_t * | ip6_prefix, | ||
u8 | ip6_prefix_len, | ||
ip6_address_t * | ip6_src, | ||
u8 | ip6_src_len, | ||
u8 | ea_bits_len, | ||
u8 | psid_offset, | ||
u8 | psid_length, | ||
u32 * | map_domain_index, | ||
u16 | mtu, | ||
u8 | flags | ||
) |
int map_delete_domain | ( | u32 | map_domain_index | ) |
|
inlinestatic |
|
inlinestatic |
u64 map_error_counter_get | ( | u32 | node_index, |
map_error_t | map_error | ||
) |
static_always_inline u32 map_get_ip4 | ( | ip6_address_t * | addr | ) |
static_always_inline u64 map_get_pfx | ( | map_domain_t * | d, |
u32 | addr, | ||
u16 | port | ||
) |
static_always_inline u64 map_get_pfx_net | ( | map_domain_t * | d, |
u32 | addr, | ||
u16 | port | ||
) |
static_always_inline u64 map_get_sfx | ( | map_domain_t * | d, |
u32 | addr, | ||
u16 | port | ||
) |
static_always_inline u64 map_get_sfx_net | ( | map_domain_t * | d, |
u32 | addr, | ||
u16 | port | ||
) |
void map_ip4_drop_pi | ( | u32 | pi | ) |
int map_ip4_reass_add_fragment | ( | map_ip4_reass_t * | r, |
u32 | pi | ||
) |
int map_ip4_reass_conf_buffers | ( | u32 | buffers | ) |
int map_ip4_reass_conf_lifetime | ( | u16 | lifetime_ms | ) |
void map_ip4_reass_free | ( | map_ip4_reass_t * | r, |
u32 ** | pi_to_drop | ||
) |
static_always_inline void map_ip4_reass_get_fragments | ( | map_ip4_reass_t * | r, |
u32 ** | pi | ||
) |
void map_ip6_drop_pi | ( | u32 | pi | ) |
int map_ip6_reass_conf_buffers | ( | u32 | buffers | ) |
int map_ip6_reass_conf_lifetime | ( | u16 | lifetime_ms | ) |
void map_ip6_reass_free | ( | map_ip6_reass_t * | r, |
u32 ** | pi_to_drop | ||
) |
map_ip6_reass_t* map_ip6_reass_get | ( | ip6_address_t * | src, |
ip6_address_t * | dst, | ||
u32 | fragment_id, | ||
u8 | protocol, | ||
u32 ** | pi_to_drop | ||
) |
static_always_inline void map_send_all_to_node | ( | vlib_main_t * | vm, |
u32 * | pi_vector, | ||
vlib_node_runtime_t * | node, | ||
vlib_error_t * | error, | ||
u32 | next | ||
) |
vlib_node_registration_t ip4_map_node |
vlib_node_registration_t ip4_map_t_fragmented_node |
(constructor) VLIB_REGISTER_NODE (ip4_map_t_fragmented_node)
Definition at line 1277 of file ip4_map_t.c.
vlib_node_registration_t ip4_map_t_icmp_node |
(constructor) VLIB_REGISTER_NODE (ip4_map_t_icmp_node)
Definition at line 1297 of file ip4_map_t.c.
vlib_node_registration_t ip4_map_t_node |
(constructor) VLIB_REGISTER_NODE (ip4_map_t_node)
Definition at line 1337 of file ip4_map_t.c.
vlib_node_registration_t ip4_map_t_tcp_udp_node |
(constructor) VLIB_REGISTER_NODE (ip4_map_t_tcp_udp_node)
Definition at line 1317 of file ip4_map_t.c.
vlib_node_registration_t ip6_map_node |
vlib_node_registration_t ip6_map_t_fragmented_node |
(constructor) VLIB_REGISTER_NODE (ip6_map_t_fragmented_node)
Definition at line 1431 of file ip6_map_t.c.
vlib_node_registration_t ip6_map_t_icmp_node |
(constructor) VLIB_REGISTER_NODE (ip6_map_t_icmp_node)
Definition at line 1451 of file ip6_map_t.c.
vlib_node_registration_t ip6_map_t_node |
(constructor) VLIB_REGISTER_NODE (ip6_map_t_node)
Definition at line 1491 of file ip6_map_t.c.
vlib_node_registration_t ip6_map_t_tcp_udp_node |
(constructor) VLIB_REGISTER_NODE (ip6_map_t_tcp_udp_node)
Definition at line 1471 of file ip6_map_t.c.
map_main_t map_main |