Go to the source code of this file.
|
enum | kp_next_t { KP_NEXT_DROP,
KP_N_NEXT
} |
|
enum | kp_nat4_in2out_next_t { KP_NAT4_IN2OUT_NEXT_DROP,
KP_NAT4_IN2OUT_NEXT_LOOKUP,
KP_NAT4_IN2OUT_N_NEXT
} |
|
enum | kp_nat_in2out_error_t { KP_NAT_IN2OUT_N_ERROR
} |
|
enum | kp_svr_type_t { KP_SVR_TYPE_VIP_PORT,
KP_SVR_TYPE_NODEIP_PORT,
KP_SVR_TYPE_EXT_LB,
KP_SVR_N_TYPES
} |
| kube-proxy supports three types of service More...
|
|
enum | kp_nodeport_next_t {
KP_NODEPORT_NEXT_IP4_NAT4,
KP_NODEPORT_NEXT_IP4_NAT6,
KP_NODEPORT_NEXT_IP6_NAT4,
KP_NODEPORT_NEXT_IP6_NAT6,
KP_NODEPORT_NEXT_DROP,
KP_NODEPORT_N_NEXT
} |
|
enum | kp_vip_counter_t { KP_N_VIP_COUNTERS
} |
|
enum | kp_vip_type_t {
KP_VIP_TYPE_IP4_NAT44,
KP_VIP_TYPE_IP4_NAT46,
KP_VIP_TYPE_IP6_NAT64,
KP_VIP_TYPE_IP6_NAT66,
KP_VIP_N_TYPES
} |
| kube-proxy supports IPv4 and IPv6 traffic and NAT4 and NAT6. More...
|
|
enum | kp_nat_protocol_t { foreach_kp_nat_protocol
} |
|
|
static u32 | kp_ip_proto_to_nat_proto (u8 ip_proto) |
|
void | ip46_prefix_normalize (ip46_address_t *prefix, u8 plen) |
|
uword | unformat_ip46_prefix (unformat_input_t *input, va_list *args) |
|
u8 * | format_ip46_prefix (u8 *s, va_list *args) |
|
int | kp_conf (u32 sticky_buckets, u32 flow_timeout) |
| Fix global kube-proxy parameters. More...
|
|
int | kp_vip_add (ip46_address_t *prefix, u8 plen, kp_vip_type_t type, u32 new_length, u32 *vip_index, u16 port, u16 target_port, u16 node_port) |
|
int | kp_vip_del (u32 vip_index) |
|
int | kp_vip_find_index (ip46_address_t *prefix, u8 plen, u32 *vip_index) |
|
int | kp_vip_add_pods (u32 vip_index, ip46_address_t *addresses, u32 n) |
|
int | kp_vip_del_pods (u32 vip_index, ip46_address_t *addresses, u32 n) |
|
u32 | kp_hash_time_now (vlib_main_t *vm) |
|
void | kp_garbage_collection () |
|
int | kp_nat4_interface_add_del (u32 sw_if_index, int is_del) |
|
#define foreach_kp_nat_in2out_error |
Value:_(UNSUPPORTED_PROTOCOL, "Unsupported protocol") \
_(IN2OUT_PACKETS, "Good in2out packets processed") \
_(NO_TRANSLATION, "No translation")
Definition at line 58 of file kp.h.
#define foreach_kp_nat_protocol |
Value:_(UDP, 0, udp, "udp") \
_(TCP, 1, tcp, "tcp")
Definition at line 284 of file kp.h.
Definition at line 431 of file kp.h.
Definition at line 432 of file kp.h.
#define ip46_prefix_type |
( |
|
ip46, |
|
|
|
len |
|
) |
| (ip46_prefix_is_ip4(ip46, len)?IP46_TYPE_IP4:IP46_TYPE_IP6) |
Definition at line 433 of file kp.h.
#define KP_DEFAULT_FLOW_TIMEOUT 40 |
Definition at line 43 of file kp.h.
#define KP_DEFAULT_PER_CPU_STICKY_BUCKETS 1 << 10 |
kp-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 kube-proxy receives traffic destined to VIP (Virtual IP) addresses from one or multiple(ECMP) routers. The kube-proxy 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 42 of file kp.h.
#define kp_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 154 of file kp.h.
#define KP_MAPPING_BUCKETS 1024 |
Definition at line 44 of file kp.h.
#define KP_MAPPING_MEMORY_SIZE 64<<20 |
Definition at line 45 of file kp.h.
#define KP_POD_FLAGS_USED 0x1 |
Definition at line 118 of file kp.h.
#define KP_VIP_FLAGS_USED 0x1 |
Definition at line 258 of file kp.h.
#define kp_vip_get_by_index |
( |
|
index | ) |
(pool_is_free_index(kp_main.vips, index)?NULL:pool_elt_at_index(kp_main.vips, index)) |
Definition at line 460 of file kp.h.
#define kp_vip_is_ip4 |
( |
|
vip | ) |
|
Value:
Definition at line 277 of file kp.h.
#define kp_vip_is_nat4 |
( |
|
vip | ) |
|
Value:
Definition at line 279 of file kp.h.
Enumerator |
---|
KP_NAT4_IN2OUT_NEXT_DROP |
|
KP_NAT4_IN2OUT_NEXT_LOOKUP |
|
KP_NAT4_IN2OUT_N_NEXT |
|
Definition at line 52 of file kp.h.
Enumerator |
---|
KP_NAT_IN2OUT_N_ERROR |
|
Definition at line 63 of file kp.h.
Enumerator |
---|
foreach_kp_nat_protocol |
|
Definition at line 288 of file kp.h.
Enumerator |
---|
KP_NEXT_DROP |
|
KP_N_NEXT |
|
Definition at line 47 of file kp.h.
Enumerator |
---|
KP_NODEPORT_NEXT_IP4_NAT4 |
|
KP_NODEPORT_NEXT_IP4_NAT6 |
|
KP_NODEPORT_NEXT_IP6_NAT4 |
|
KP_NODEPORT_NEXT_IP6_NAT6 |
|
KP_NODEPORT_NEXT_DROP |
|
KP_NODEPORT_N_NEXT |
|
Definition at line 80 of file kp.h.
kube-proxy supports three types of service
Enumerator |
---|
KP_SVR_TYPE_VIP_PORT |
|
KP_SVR_TYPE_NODEIP_PORT |
|
KP_SVR_TYPE_EXT_LB |
|
KP_SVR_N_TYPES |
|
Definition at line 73 of file kp.h.
Enumerator |
---|
KP_N_VIP_COUNTERS |
|
Definition at line 160 of file kp.h.
kube-proxy supports IPv4 and IPv6 traffic and NAT4 and NAT6.
Enumerator |
---|
KP_VIP_TYPE_IP4_NAT44 |
|
KP_VIP_TYPE_IP4_NAT46 |
|
KP_VIP_TYPE_IP6_NAT64 |
|
KP_VIP_TYPE_IP6_NAT66 |
|
KP_VIP_N_TYPES |
|
Definition at line 171 of file kp.h.
u8* format_ip46_prefix |
( |
u8 * |
s, |
|
|
va_list * |
args |
|
) |
| |
Definition at line 71 of file kp.c.
void ip46_prefix_normalize |
( |
ip46_address_t * |
prefix, |
|
|
u8 |
plen |
|
) |
| |
Definition at line 35 of file kp.c.
int kp_conf |
( |
u32 |
sticky_buckets, |
|
|
u32 |
flow_timeout |
|
) |
| |
Fix global kube-proxy parameters.
- Returns
- 0 on success. VNET_KP_ERR_XXX on error
Definition at line 421 of file kp.c.
void kp_garbage_collection |
( |
| ) |
|
Definition at line 292 of file kp.c.
Definition at line 106 of file kp.c.
static u32 kp_ip_proto_to_nat_proto |
( |
u8 |
ip_proto | ) |
|
|
inlinestatic |
Definition at line 295 of file kp.h.
int kp_nat4_interface_add_del |
( |
u32 |
sw_if_index, |
|
|
int |
is_del |
|
) |
| |
Definition at line 906 of file kp.c.
Definition at line 725 of file kp.c.
int kp_vip_add_pods |
( |
u32 |
vip_index, |
|
|
ip46_address_t * |
addresses, |
|
|
u32 |
n |
|
) |
| |
Definition at line 481 of file kp.c.
int kp_vip_del |
( |
u32 |
vip_index | ) |
|
Definition at line 810 of file kp.c.
int kp_vip_del_pods |
( |
u32 |
vip_index, |
|
|
ip46_address_t * |
addresses, |
|
|
u32 |
n |
|
) |
| |
Definition at line 670 of file kp.c.
int kp_vip_find_index |
( |
ip46_address_t * |
prefix, |
|
|
u8 |
plen, |
|
|
u32 * |
vip_index |
|
) |
| |
Definition at line 454 of file kp.c.
Definition at line 49 of file kp.c.
Definition at line 471 of file kp.h.
Definition at line 148 of file kp.h.
Definition at line 281 of file kp.h.
Definition at line 282 of file kp.h.
Definition at line 179 of file kp.h.
(constructor) VLIB_REGISTER_NODE (kp4_nodeport_node)
Definition at line 774 of file kp_node.c.
(constructor) VLIB_REGISTER_NODE (kp6_nodeport_node)
Definition at line 795 of file kp_node.c.
Definition at line 28 of file kp.c.
(constructor) VLIB_REGISTER_NODE (kp_nat4_in2out_node)
Definition at line 823 of file kp_node.c.
Definition at line 180 of file kp.h.