Go to the source code of this file.
|
enum | lb_next_t { LB_NEXT_DROP,
LB_N_NEXT
} |
|
enum | LB_nat4_in2out_next_t { LB_NAT4_IN2OUT_NEXT_DROP,
LB_NAT4_IN2OUT_NEXT_LOOKUP,
LB_NAT4_IN2OUT_N_NEXT
} |
|
enum | LB_nat6_in2out_next_t { LB_NAT6_IN2OUT_NEXT_DROP,
LB_NAT6_IN2OUT_NEXT_LOOKUP,
LB_NAT6_IN2OUT_N_NEXT
} |
|
enum | lb_nat_in2out_error_t { LB_NAT_IN2OUT_N_ERROR
} |
|
enum | lb_svr_type_t { LB_SRV_TYPE_CLUSTERIP,
LB_SRV_TYPE_NODEPORT,
LB_SRV_N_TYPES
} |
| lb for kube-proxy supports three types of service More...
|
|
enum | lb4_nodeport_next_t { LB4_NODEPORT_NEXT_IP4_NAT4,
LB4_NODEPORT_NEXT_DROP,
LB4_NODEPORT_N_NEXT
} |
|
enum | lb6_nodeport_next_t { LB6_NODEPORT_NEXT_IP6_NAT6,
LB6_NODEPORT_NEXT_DROP,
LB6_NODEPORT_N_NEXT
} |
|
enum | lb_vip_counter_t { LB_N_VIP_COUNTERS
} |
|
enum | lb_encap_type_t {
LB_ENCAP_TYPE_GRE4,
LB_ENCAP_TYPE_GRE6,
LB_ENCAP_TYPE_L3DSR,
LB_ENCAP_TYPE_NAT4,
LB_ENCAP_TYPE_NAT6,
LB_ENCAP_N_TYPES
} |
|
enum | lb_vip_type_t {
LB_VIP_TYPE_IP6_GRE6,
LB_VIP_TYPE_IP6_GRE4,
LB_VIP_TYPE_IP4_GRE6,
LB_VIP_TYPE_IP4_GRE4,
LB_VIP_TYPE_IP4_L3DSR,
LB_VIP_TYPE_IP4_NAT4,
LB_VIP_TYPE_IP6_NAT6,
LB_VIP_N_TYPES
} |
| The load balancer supports IPv4 and IPv6 traffic and GRE4, GRE6, L3DSR and NAT4, NAT6 encap. More...
|
|
enum | lb_nat_protocol_t { foreach_lb_nat_protocol
} |
|
|
static bool | lb_vip_is_l3dsr (const lb_vip_t *vip) |
|
static bool | lb_vip_is_nat4 (const lb_vip_t *vip) |
|
static bool | lb_vip_is_nat6 (const lb_vip_t *vip) |
|
static u32 | lb_ip_proto_to_nat_proto (u8 ip_proto) |
|
int | lb_conf (ip4_address_t *ip4_address, ip6_address_t *ip6_address, u32 sticky_buckets, u32 flow_timeout) |
| Fix global load-balancer parameters. More...
|
|
int | lb_vip_add (lb_vip_add_args_t args, u32 *vip_index) |
|
int | lb_vip_del (u32 vip_index) |
|
int | lb_vip_find_index (ip46_address_t *prefix, u8 plen, u32 *vip_index) |
|
int | lb_vip_add_ass (u32 vip_index, ip46_address_t *addresses, u32 n) |
|
int | lb_vip_del_ass (u32 vip_index, ip46_address_t *addresses, u32 n) |
|
u32 | lb_hash_time_now (vlib_main_t *vm) |
|
void | lb_garbage_collection () |
|
int | lb_nat4_interface_add_del (u32 sw_if_index, int is_del) |
|
int | lb_nat6_interface_add_del (u32 sw_if_index, int is_del) |
|
#define foreach_lb_nat_in2out_error |
Value:_(UNSUPPORTED_PROTOCOL, "Unsupported protocol") \
_(IN2OUT_PACKETS, "Good in2out packets processed") \
_(NO_TRANSLATION, "No translation")
Definition at line 67 of file lb.h.
#define foreach_lb_nat_protocol |
Value:_(UDP, 0, udp, "udp") \
_(TCP, 1, tcp, "tcp")
Definition at line 339 of file lb.h.
#define LB_AS_FLAGS_USED 0x1 |
Definition at line 131 of file lb.h.
#define LB_DEFAULT_FLOW_TIMEOUT 40 |
Definition at line 46 of file lb.h.
#define LB_DEFAULT_PER_CPU_STICKY_BUCKETS 1 << 10 |
lb-plugin implements a MagLev-like load balancer.
http://research.google.com/pubs/pub44824.html
It hasn't been tested for interoperability with the original MagLev but intends to provide similar functionality. The load-balancer receives traffic destined to VIP (Virtual IP) addresses from one or multiple(ECMP) routers. The load-balancer tunnels the traffic toward many application servers ensuring session stickyness (i.e. that a single sessions is tunneled towards a single application server).
Definition at line 45 of file lb.h.
#define lb_encap_is_ip4 |
( |
|
vip | ) |
|
Value:
Definition at line 315 of file lb.h.
#define lb_foreach_vip_counter |
Value:_(NEXT_PACKET, "packet from existing sessions", 0) \
_(FIRST_PACKET, "first session packet", 1) \
_(UNTRACKED_PACKET, "untracked packet", 2) \
_(NO_SERVER, "no server configured", 3)
Definition at line 167 of file lb.h.
#define LB_MAPPING_BUCKETS 1024 |
Definition at line 47 of file lb.h.
#define LB_MAPPING_MEMORY_SIZE 64<<20 |
Definition at line 48 of file lb.h.
#define LB_VIP_FLAGS_USED 0x1 |
Definition at line 295 of file lb.h.
#define lb_vip_get_by_index |
( |
|
index | ) |
(pool_is_free_index(lb_main.vips, index)?NULL:pool_elt_at_index(lb_main.vips, index)) |
Definition at line 542 of file lb.h.
#define lb_vip_is_gre4 |
( |
|
vip | ) |
|
Value:
Definition at line 309 of file lb.h.
#define lb_vip_is_gre6 |
( |
|
vip | ) |
|
Value:
Definition at line 312 of file lb.h.
#define lb_vip_is_ip4 |
( |
|
vip | ) |
|
Value:
Definition at line 304 of file lb.h.
Enumerator |
---|
LB4_NODEPORT_NEXT_IP4_NAT4 |
|
LB4_NODEPORT_NEXT_DROP |
|
LB4_NODEPORT_N_NEXT |
|
Definition at line 88 of file lb.h.
Enumerator |
---|
LB6_NODEPORT_NEXT_IP6_NAT6 |
|
LB6_NODEPORT_NEXT_DROP |
|
LB6_NODEPORT_N_NEXT |
|
Definition at line 94 of file lb.h.
Enumerator |
---|
LB_ENCAP_TYPE_GRE4 |
|
LB_ENCAP_TYPE_GRE6 |
|
LB_ENCAP_TYPE_L3DSR |
|
LB_ENCAP_TYPE_NAT4 |
|
LB_ENCAP_TYPE_NAT6 |
|
LB_ENCAP_N_TYPES |
|
Definition at line 180 of file lb.h.
Enumerator |
---|
LB_NAT4_IN2OUT_NEXT_DROP |
|
LB_NAT4_IN2OUT_NEXT_LOOKUP |
|
LB_NAT4_IN2OUT_N_NEXT |
|
Definition at line 55 of file lb.h.
Enumerator |
---|
LB_NAT6_IN2OUT_NEXT_DROP |
|
LB_NAT6_IN2OUT_NEXT_LOOKUP |
|
LB_NAT6_IN2OUT_N_NEXT |
|
Definition at line 61 of file lb.h.
Enumerator |
---|
LB_NAT_IN2OUT_N_ERROR |
|
Definition at line 72 of file lb.h.
Enumerator |
---|
foreach_lb_nat_protocol |
|
Definition at line 343 of file lb.h.
Enumerator |
---|
LB_NEXT_DROP |
|
LB_N_NEXT |
|
Definition at line 50 of file lb.h.
lb for kube-proxy supports three types of service
Enumerator |
---|
LB_SRV_TYPE_CLUSTERIP |
|
LB_SRV_TYPE_NODEPORT |
|
LB_SRV_N_TYPES |
|
Definition at line 82 of file lb.h.
Enumerator |
---|
LB_N_VIP_COUNTERS |
|
Definition at line 173 of file lb.h.
The load balancer supports IPv4 and IPv6 traffic and GRE4, GRE6, L3DSR and NAT4, NAT6 encap.
Enumerator |
---|
LB_VIP_TYPE_IP6_GRE6 |
|
LB_VIP_TYPE_IP6_GRE4 |
|
LB_VIP_TYPE_IP4_GRE6 |
|
LB_VIP_TYPE_IP4_GRE4 |
|
LB_VIP_TYPE_IP4_L3DSR |
|
LB_VIP_TYPE_IP4_NAT4 |
|
LB_VIP_TYPE_IP6_NAT6 |
|
LB_VIP_N_TYPES |
|
Definition at line 193 of file lb.h.
Fix global load-balancer parameters.
- Parameters
-
ip4_address | IPv4 source address used for encapsulated traffic |
ip6_address | IPv6 source address used for encapsulated traffic |
- Returns
- 0 on success. VNET_LB_ERR_XXX on error
Definition at line 464 of file lb.c.
void lb_garbage_collection |
( |
| ) |
|
Definition at line 335 of file lb.c.
Definition at line 70 of file lb.c.
static u32 lb_ip_proto_to_nat_proto |
( |
u8 |
ip_proto | ) |
|
|
inlinestatic |
Definition at line 350 of file lb.h.
int lb_nat4_interface_add_del |
( |
u32 |
sw_if_index, |
|
|
int |
is_del |
|
) |
| |
int lb_nat6_interface_add_del |
( |
u32 |
sw_if_index, |
|
|
int |
is_del |
|
) |
| |
Definition at line 823 of file lb.c.
int lb_vip_add_ass |
( |
u32 |
vip_index, |
|
|
ip46_address_t * |
addresses, |
|
|
u32 |
n |
|
) |
| |
Definition at line 527 of file lb.c.
int lb_vip_del |
( |
u32 |
vip_index | ) |
|
Definition at line 936 of file lb.c.
int lb_vip_del_ass |
( |
u32 |
vip_index, |
|
|
ip46_address_t * |
addresses, |
|
|
u32 |
n |
|
) |
| |
Definition at line 755 of file lb.c.
int lb_vip_find_index |
( |
ip46_address_t * |
prefix, |
|
|
u8 |
plen, |
|
|
u32 * |
vip_index |
|
) |
| |
Definition at line 500 of file lb.c.
Definition at line 321 of file lb.h.
Definition at line 326 of file lb.h.
Definition at line 331 of file lb.h.
Definition at line 161 of file lb.h.
Definition at line 554 of file lb.h.
Definition at line 336 of file lb.h.
Definition at line 337 of file lb.h.
Definition at line 204 of file lb.h.
(constructor) VLIB_REGISTER_NODE (lb4_nodeport_node)
Definition at line 1053 of file node.c.
(constructor) VLIB_REGISTER_NODE (lb6_nodeport_node)
Definition at line 1069 of file node.c.
Definition at line 28 of file lb.c.
(constructor) VLIB_REGISTER_NODE (lb_nat4_in2out_node)
Definition at line 1092 of file node.c.
(constructor) VLIB_REGISTER_NODE (lb_nat6_in2out_node)
Definition at line 1115 of file node.c.
Definition at line 205 of file lb.h.