|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
20 #ifndef __included_nat44_ed_affinity_h__
21 #define __included_nat44_ed_affinity_h__
50 u32 per_service_index;
114 u16 service_port,
u8 *backend_index);
130 u16 service_port,
u8 backend_index,
132 u32 affinity_per_service_list_head_index);
typedef CLIB_PACKED(struct { nat_affinity_key_t key;u32 sticky_time;u32 ref_cnt;u32 per_service_index;u8 backend_index;f64 expire;}) nat_affinity_t
void nat_affinity_enable()
NAT affinity enable.
u32 nat_affinity_get_per_service_list_head_index(void)
Get new affinity per service list head index.
clib_bihash_16_8_t affinity_hash
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
void nat_affinity_flush_service(u32 affinity_per_service_list_head_index)
Flush all service affinity data.
nat_affinity_t * affinity_pool
nat_affinity_main_t nat_affinity_main
int nat_affinity_create_and_lock(ip4_address_t client_addr, ip4_address_t service_addr, u8 proto, u16 service_port, u8 backend_index, u32 sticky_time, u32 affinity_per_service_list_head_index)
Create affinity record and take reference counting lock.
clib_spinlock_t affinity_lock
ip4_address_t client_addr
int nat_affinity_find_and_lock(vlib_main_t *vm, ip4_address_t client_addr, ip4_address_t service_addr, u8 proto, u16 service_port, u8 *backend_index)
Find service backend index for client-IP and take a reference counting lock.
clib_error_t * nat_affinity_init(vlib_main_t *vm)
Initialize NAT client-IP based affinity.
ip4_address_t service_addr
void nat_affinity_disable()
NAT affinity disable.
void nat_affinity_unlock(ip4_address_t client_addr, ip4_address_t service_addr, u8 proto, u16 service_port)
Release a reference counting lock for affinity.