LB: fix flush flow table issue
[vpp.git] / src / plugins / lb / lb.api
1 option version = "1.0.0";
2
3 /** \brief Configure Load-Balancer global parameters
4     @param client_index - opaque cookie to identify the sender
5     @param context - sender context, to match reply w/ request
6     @param ip4_src_address - IPv4 address to be used as source for IPv4 traffic(applicable in GRE4/GRE6/NAT4/NAT6 mode only).
7     @param ip6_src_address - IPv6 address to be used as source for IPv6 traffic(applicable in GRE4/GRE6/NAT4/NAT6 mode only).
8     @param sticky_buckets_per_core - Number of buckets *per worker thread* in the
9            established flow table (must be power of 2).
10     @param flow_timeout - Time in seconds after which, if no packet is received
11            for a given flow, the flow is removed from the established flow table.
12 */
13 autoreply define lb_conf
14 {
15   u32 client_index;
16   u32 context;
17   u32 ip4_src_address;
18   u8 ip6_src_address[16];
19   u32 sticky_buckets_per_core;
20   u32 flow_timeout;
21 };
22
23 /** \brief Add a virtual address (or prefix)
24     @param client_index - opaque cookie to identify the sender
25     @param context - sender context, to match reply w/ request
26     @param ip_prefix - IP address (IPv4 in lower order 32 bits).
27     @param prefix_length - IP prefix length (96 + 'IPv4 prefix length' for IPv4).
28     @param protocol - tcp or udp.
29     @param port - destination port.
30     @param encap - Encap is ip4 GRE(0) or ip6 GRE(1) or L3DSR(2) or NAT4(3) or NAT6(4).
31     @param dscp - DSCP bit corresponding to VIP(applicable in L3DSR mode only).
32     @param type - service type(applicable in NAT4/NAT6 mode only).
33     @param target_port - Pod's port corresponding to specific service(applicable in NAT4/NAT6 mode only).
34     @param node_port - Node's port(applicable in NAT4/NAT6 mode only).
35     @param new_flows_table_length - Size of the new connections flow table used
36            for this VIP (must be power of 2).
37     @param is_del - The VIP should be removed.
38 */
39 autoreply define lb_add_del_vip {
40   u32 client_index;
41   u32 context;
42   u8 ip_prefix[16];
43   u8 prefix_length;
44   u8 protocol;
45   u16 port;
46   u8 encap;
47   u8 dscp;
48   u8 type;
49   u16 target_port;
50   u16 node_port;
51   u32 new_flows_table_length;
52   u8 is_del;
53 };
54
55 /** \brief Add an application server for a given VIP
56     @param client_index - opaque cookie to identify the sender
57     @param context - sender context, to match reply w/ request
58     @param vip_ip_prefix - VIP IP address (IPv4 in lower order 32 bits).
59     @param vip_prefix_length - VIP IP prefix length (96 + 'IPv4 prefix length' for IPv4).
60     @param protocol - tcp or udp.
61     @param port - destination port.
62     @param as_address - The application server address (IPv4 in lower order 32 bits).
63     @param is_del - The AS should be removed.
64     @param is_flush - The sessions related to this AS should be flushed.
65 */
66 autoreply define lb_add_del_as {
67   u32 client_index;
68   u32 context;
69   u8 vip_ip_prefix[16];
70   u8 vip_prefix_length;
71   u8 protocol;
72   u16 port;
73   u8 as_address[16];
74   u8 is_del;
75   u8 is_flush;
76 };
77
78 /** \brief Flush a given vip
79     @param client_index - opaque cookie to identify the sender
80     @param context - sender context, to match reply w/ request
81     @param ip_prefix - IP address (IPv4 in lower order 32 bits).
82     @param prefix_length - IP prefix length (96 + 'IPv4 prefix length' for IPv4).
83     @param protocol - tcp or udp.
84     @param port - destination port.
85 */
86 autoreply define lb_flush_vip {
87   u32 client_index;
88   u32 context;
89   u8 ip_prefix[16];
90   u8 prefix_length;
91   u8 protocol;
92   u16 port;
93 };