FD.io VPP
v18.07.1-19-g511ce25
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_pre_resolved_t_ |
A pre-resolved next-hop. More... | |
struct | map_main_t |
struct | map_trace_t |
Typedefs | |
typedef struct map_main_pre_resolved_t_ | map_main_pre_resolved_t |
A pre-resolved next-hop. More... | |
Enumerations | |
enum | map_domain_flags_e { MAP_DOMAIN_PREFIX = 1 << 0, MAP_DOMAIN_TRANSLATION = 1 << 1, MAP_DOMAIN_RFC6052 = 1 << 2 } |
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_pre_resolved_t | pre_resolved [FIB_PROTOCOL_MAX] |
Pre-resolved next hops for v4 and v6. More... | |
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) |
typedef struct map_main_pre_resolved_t_ map_main_pre_resolved_t |
A pre-resolved next-hop.
enum map_domain_counter_t |
enum map_domain_flags_e |
enum map_error_t |
static_always_inline map_domain_t* ip4_map_get_domain | ( | u32 | mdi | ) |
static_always_inline void ip4_map_t_embedded_address | ( | map_domain_t * | d, |
ip6_address_t * | ip6, | ||
const ip4_address_t * | ip4 | ||
) |
static_always_inline map_domain_t* ip6_map_get_domain | ( | u32 | mdi, |
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 | ||
) |
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, |
map_domain_flags_e | flags | ||
) |
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 | ||
) |
clib_error_t* map_plugin_api_hookup | ( | vlib_main_t * | vm | ) |
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 | ||
) |
STATIC_ASSERT | ( | (sizeof(map_domain_t)<=CLIB_CACHE_LINE_BYTES) | , |
"MAP domain fits in one cacheline" | |||
) |
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 812 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 832 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 872 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 852 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 1100 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 1120 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 1160 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 1140 of file ip6_map_t.c.
map_main_t map_main |
map_main_pre_resolved_t pre_resolved[FIB_PROTOCOL_MAX] |