FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the source code of this file.
Data Structures | |
struct | nat_ha_message_header_t |
struct | nat_ha_event_t |
struct | nat_ha_resend_entry_t |
struct | nat_ha_per_thread_data_t |
struct | nat_ha_main_s |
struct | nat_ha_trace_t |
struct | nat_ha_handoff_trace_t |
Macros | |
#define | NAT_HA_RETRIES 3 |
#define | foreach_nat_ha_counter |
#define | NAT_HA_VERSION 0x01 |
#define | NAT_HA_FLAG_ACK 0x01 |
#define | skip_if_disabled() |
#define | foreach_nat_ha_error |
#define | foreach_nat_ha_handoff_error |
Typedefs | |
typedef struct nat_ha_main_s | nat_ha_main_t |
Enumerations | |
enum | nat_ha_event_type_t { NAT_HA_ADD = 1, NAT_HA_DEL, NAT_HA_REFRESH } |
enum | nat_ha_counter_t { NAT_HA_N_COUNTERS } |
enum | nat_ha_next_t { NAT_HA_NEXT_IP4_LOOKUP, NAT_HA_NEXT_DROP, NAT_HA_N_NEXT } |
enum | nat_ha_error_t { NAT_HA_N_ERROR } |
enum | nat_ha_handoff_error_t { NAT_HA_HANDOFF_N_ERROR } |
Variables | |
nat_ha_main_t | nat_ha_main |
vlib_node_registration_t | nat_ha_worker_node |
(constructor) VLIB_REGISTER_NODE (nat_ha_worker_node) More... | |
vlib_node_registration_t | nat_ha_process_node |
(constructor) VLIB_REGISTER_NODE (nat_ha_process_node) More... | |
static char * | nat_ha_error_strings [] |
vlib_node_registration_t | nat_ha_node |
(constructor) VLIB_REGISTER_NODE (nat_ha_node) More... | |
static char * | nat_ha_handoff_error_strings [] |
vlib_node_registration_t | nat_ha_handoff_node |
(constructor) VLIB_REGISTER_NODE (nat_ha_handoff_node) More... | |
#define foreach_nat_ha_counter |
Definition at line 30 of file nat44_ei_ha.c.
#define foreach_nat_ha_error |
Definition at line 1015 of file nat44_ei_ha.c.
#define foreach_nat_ha_handoff_error |
Definition at line 1192 of file nat44_ei_ha.c.
#define NAT_HA_FLAG_ACK 0x01 |
Definition at line 46 of file nat44_ei_ha.c.
#define NAT_HA_RETRIES 3 |
Definition at line 28 of file nat44_ei_ha.c.
#define NAT_HA_VERSION 0x01 |
Definition at line 43 of file nat44_ei_ha.c.
#define skip_if_disabled | ( | ) |
Definition at line 819 of file nat44_ei_ha.c.
typedef struct nat_ha_main_s nat_ha_main_t |
enum nat_ha_counter_t |
Enumerator | |
---|---|
NAT_HA_N_COUNTERS |
Definition at line 92 of file nat44_ei_ha.c.
enum nat_ha_error_t |
Enumerator | |
---|---|
NAT_HA_N_ERROR |
Definition at line 1019 of file nat44_ei_ha.c.
enum nat_ha_event_type_t |
Enumerator | |
---|---|
NAT_HA_ADD | |
NAT_HA_DEL | |
NAT_HA_REFRESH |
Definition at line 49 of file nat44_ei_ha.c.
Enumerator | |
---|---|
NAT_HA_HANDOFF_N_ERROR |
Definition at line 1197 of file nat44_ei_ha.c.
enum nat_ha_next_t |
Enumerator | |
---|---|
NAT_HA_NEXT_IP4_LOOKUP | |
NAT_HA_NEXT_DROP | |
NAT_HA_N_NEXT |
Definition at line 1008 of file nat44_ei_ha.c.
Definition at line 1212 of file nat44_ei_ha.c.
Definition at line 996 of file nat44_ei_ha.c.
static_always_inline void nat44_ei_ha_sadd | ( | ip4_address_t * | in_addr, |
u16 | in_port, | ||
ip4_address_t * | out_addr, | ||
u16 | out_port, | ||
ip4_address_t * | eh_addr, | ||
u16 | eh_port, | ||
ip4_address_t * | ehn_addr, | ||
u16 | ehn_port, | ||
u8 | proto, | ||
u32 | fib_index, | ||
u16 | flags, | ||
u32 | thread_index | ||
) |
Definition at line 174 of file nat44_ei_ha.c.
static_always_inline void nat44_ei_ha_sdel | ( | ip4_address_t * | out_addr, |
u16 | out_port, | ||
ip4_address_t * | eh_addr, | ||
u16 | eh_port, | ||
u8 | proto, | ||
u32 | fib_index, | ||
u32 | thread_index | ||
) |
Definition at line 255 of file nat44_ei_ha.c.
static_always_inline void nat44_ei_ha_sref | ( | ip4_address_t * | out_addr, |
u16 | out_port, | ||
ip4_address_t * | eh_addr, | ||
u16 | eh_port, | ||
u8 | proto, | ||
u32 | fib_index, | ||
u32 | total_pkts, | ||
u64 | total_bytes, | ||
u32 | thread_index | ||
) |
Definition at line 276 of file nat44_ei_ha.c.
static_always_inline void nat_ha_ack_recv | ( | u32 | seq, |
u32 | thread_index | ||
) |
Definition at line 340 of file nat44_ei_ha.c.
void nat_ha_disable | ( | ) |
Disable NAT HA.
Definition at line 450 of file nat44_ei_ha.c.
void nat_ha_enable | ( | ) |
Enable NAT HA.
Definition at line 443 of file nat44_ei_ha.c.
static_always_inline void nat_ha_event_add | ( | nat_ha_event_t * | event, |
u8 | do_flush, | ||
u32 | session_thread_index, | ||
u8 | is_resync | ||
) |
Definition at line 725 of file nat44_ei_ha.c.
static_always_inline void nat_ha_event_process | ( | nat_ha_event_t * | event, |
f64 | now, | ||
u32 | thread_index | ||
) |
Definition at line 630 of file nat44_ei_ha.c.
void nat_ha_flush | ( | u8 | is_resync | ) |
Flush the current HA data (for testing)
Definition at line 827 of file nat44_ei_ha.c.
void nat_ha_get_failover | ( | ip4_address_t * | addr, |
u16 * | port, | ||
u32 * | session_refresh_interval | ||
) |
Get HA failover/remote settings.
Definition at line 555 of file nat44_ei_ha.c.
void nat_ha_get_listener | ( | ip4_address_t * | addr, |
u16 * | port, | ||
u32 * | path_mtu | ||
) |
Get HA listener/local configuration.
Definition at line 530 of file nat44_ei_ha.c.
Get resync status.
in_resync | 1 if resync in progress |
resync_ack_missed | number of missed (not ACKed) messages |
Definition at line 981 of file nat44_ei_ha.c.
|
static |
|
inlinestatic |
Definition at line 652 of file nat44_ei_ha.c.
void nat_ha_init | ( | vlib_main_t * | vm, |
u32 | num_workers, | ||
u32 | num_threads | ||
) |
Initialize NAT HA.
Definition at line 473 of file nat44_ei_ha.c.
|
static |
|
static |
static_always_inline void nat_ha_recv_add | ( | nat_ha_event_t * | event, |
f64 | now, | ||
u32 | thread_index | ||
) |
Definition at line 566 of file nat44_ei_ha.c.
static_always_inline void nat_ha_recv_del | ( | nat_ha_event_t * | event, |
u32 | thread_index | ||
) |
Definition at line 589 of file nat44_ei_ha.c.
static_always_inline void nat_ha_recv_refresh | ( | nat_ha_event_t * | event, |
f64 | now, | ||
u32 | thread_index | ||
) |
Definition at line 607 of file nat44_ei_ha.c.
|
static |
Definition at line 321 of file nat44_ei_ha.c.
|
static |
Definition at line 371 of file nat44_ei_ha.c.
int nat_ha_resync | ( | u32 | client_index, |
u32 | pid, | ||
nat_ha_resync_event_cb_t | event_callback | ||
) |
Resync HA (resend existing sessions to new failover)
Definition at line 1283 of file nat44_ei_ha.c.
|
static |
void nat_ha_sadd | ( | ip4_address_t * | in_addr, |
u16 | in_port, | ||
ip4_address_t * | out_addr, | ||
u16 | out_port, | ||
ip4_address_t * | eh_addr, | ||
u16 | eh_port, | ||
ip4_address_t * | ehn_addr, | ||
u16 | ehn_port, | ||
u8 | proto, | ||
u32 | fib_index, | ||
u16 | flags, | ||
u32 | thread_index, | ||
u8 | is_resync | ||
) |
Create session add HA event.
in_addr | inside IPv4 address |
in_port | inside L4 port number |
out_addr | outside IPv4 address |
out_port | outside L4 port number |
eh_addr | external host IPv4 address |
eh_port | external host L4 port number |
ehn_addr | external host IPv4 address after translation |
ehn_port | external host L4 port number after translation |
proto | L4 protocol |
fib_index | fib index |
flags | session flags |
thread_index | thread index |
is_resync | 1 if HA resync |
Definition at line 834 of file nat44_ei_ha.c.
void nat_ha_sdel | ( | ip4_address_t * | out_addr, |
u16 | out_port, | ||
ip4_address_t * | eh_addr, | ||
u16 | eh_port, | ||
u8 | proto, | ||
u32 | fib_index, | ||
u32 | session_thread_index | ||
) |
Create session delete HA event.
out_addr | outside IPv4 address |
out_port | outside L4 port number |
eh_addr | external host IPv4 address |
eh_port | external host L4 port number |
proto | L4 protocol |
fib_index | fib index |
session_thread_index | index of thread where this session was stored |
Definition at line 860 of file nat44_ei_ha.c.
|
inlinestatic |
Definition at line 697 of file nat44_ei_ha.c.
int nat_ha_set_failover | ( | vlib_main_t * | vm, |
ip4_address_t * | addr, | ||
u16 | port, | ||
u32 | session_refresh_interval | ||
) |
Set HA failover (remote settings)
addr | failover IP4 address |
port | failvoer UDP port number |
session_refresh_interval | number of seconds after which to send session counters refresh |
Definition at line 540 of file nat44_ei_ha.c.
int nat_ha_set_listener | ( | vlib_main_t * | vm, |
ip4_address_t * | addr, | ||
u16 | port, | ||
u32 | path_mtu | ||
) |
Set HA listener (local settings)
addr | local IP4 address |
port | local UDP port number |
path_mtu | path MTU between local and failover |
Definition at line 495 of file nat44_ei_ha.c.
void nat_ha_set_node_indexes | ( | nat_ha_main_t * | ha, |
vlib_main_t * | vm | ||
) |
Definition at line 458 of file nat44_ei_ha.c.
void nat_ha_sref | ( | ip4_address_t * | out_addr, |
u16 | out_port, | ||
ip4_address_t * | eh_addr, | ||
u16 | eh_port, | ||
u8 | proto, | ||
u32 | fib_index, | ||
u32 | total_pkts, | ||
u64 | total_bytes, | ||
u32 | thread_index, | ||
f64 * | last_refreshed, | ||
f64 | now | ||
) |
Create session refresh HA event.
out_addr | outside IPv4 address |
out_port | outside L4 port number |
eh_addr | external host IPv4 address |
eh_port | external host L4 port number |
proto | L4 protocol |
fib_index | fib index |
total_pkts | total packets processed |
total_bytes | total bytes processed |
thread_index | thread index |
last_refreshed | last session refresh time |
now | current time |
Definition at line 879 of file nat44_ei_ha.c.
|
static |
static_always_inline u8 plugin_enabled | ( | ) |
|
static |
Definition at line 1027 of file nat44_ei_ha.c.
|
static |
Definition at line 1205 of file nat44_ei_ha.c.
vlib_node_registration_t nat_ha_handoff_node |
(constructor) VLIB_REGISTER_NODE (nat_ha_handoff_node)
Definition at line 1290 of file nat44_ei_ha.c.
nat_ha_main_t nat_ha_main |
Definition at line 171 of file nat44_ei_ha.c.
vlib_node_registration_t nat_ha_node |
(constructor) VLIB_REGISTER_NODE (nat_ha_node)
Definition at line 1170 of file nat44_ei_ha.c.
vlib_node_registration_t nat_ha_process_node |
(constructor) VLIB_REGISTER_NODE (nat_ha_process_node)
Definition at line 973 of file nat44_ei_ha.c.
vlib_node_registration_t nat_ha_worker_node |
(constructor) VLIB_REGISTER_NODE (nat_ha_worker_node)
Definition at line 930 of file nat44_ei_ha.c.