summaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/ip_vs.h
diff options
context:
space:
mode:
authorAlexander Frolkin2013-06-19 11:54:25 +0200
committerSimon Horman2013-06-26 11:01:46 +0200
commiteba3b5a78799d21dea05118b294524958f0ab592 (patch)
tree2f84838b89f17c7b10cee8fa618f232c64e9fc1d /include/uapi/linux/ip_vs.h
parentipvs: drop SCTP connections depending on state (diff)
downloadkernel-qcow2-linux-eba3b5a78799d21dea05118b294524958f0ab592.tar.gz
kernel-qcow2-linux-eba3b5a78799d21dea05118b294524958f0ab592.tar.xz
kernel-qcow2-linux-eba3b5a78799d21dea05118b294524958f0ab592.zip
ipvs: SH fallback and L4 hashing
By default the SH scheduler rejects connections that are hashed onto a realserver of weight 0. This patch adds a flag to make SH choose a different realserver in this case, instead of rejecting the connection. The patch also adds a flag to make SH include the source port (TCP, UDP, SCTP) in the hash as well as the source address. This basically allows for deterministic round-robin load balancing (i.e., where any director in a cluster of directors with identical config will send the same packet the same way). The flags are service flags (IP_VS_SVC_F_SCHED*) so that these options can be set per service. They are set using a new option to ipvsadm. Signed-off-by: Alexander Frolkin <avf@eldamar.org.uk> Acked-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'include/uapi/linux/ip_vs.h')
-rw-r--r--include/uapi/linux/ip_vs.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/uapi/linux/ip_vs.h b/include/uapi/linux/ip_vs.h
index a24537725e80..29458223d044 100644
--- a/include/uapi/linux/ip_vs.h
+++ b/include/uapi/linux/ip_vs.h
@@ -20,6 +20,12 @@
#define IP_VS_SVC_F_PERSISTENT 0x0001 /* persistent port */
#define IP_VS_SVC_F_HASHED 0x0002 /* hashed entry */
#define IP_VS_SVC_F_ONEPACKET 0x0004 /* one-packet scheduling */
+#define IP_VS_SVC_F_SCHED1 0x0008 /* scheduler flag 1 */
+#define IP_VS_SVC_F_SCHED2 0x0010 /* scheduler flag 2 */
+#define IP_VS_SVC_F_SCHED3 0x0020 /* scheduler flag 3 */
+
+#define IP_VS_SVC_F_SCHED_SH_FALLBACK IP_VS_SVC_F_SCHED1 /* SH fallback */
+#define IP_VS_SVC_F_SCHED_SH_PORT IP_VS_SVC_F_SCHED2 /* SH use port */
/*
* Destination Server Flags