forked from heil/owrt-package
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ipvs.mk
278 lines (236 loc) · 8.57 KB
/
ipvs.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
# test
define KernelPackage/ipvs-core
SUBMENU:=$(NF_MENU)
TITLE:=IP Virtual Server Support
KCONFIG:= \
CONFIG_IP_VS \
CONFIG_IP_VS_IPV6=y \
CONFIG_IP_VS_PROTO_TCP=y \
CONFIG_IP_VS_PROTO_UDP=y \
CONFIG_IP_VS_PROTO_ESP=y \
CONFIG_IP_VS_PROTO_AH=y \
CONFIG_IP_VS_PROTO_SCTP=y \
CONFIG_IP_VS_NFCT=y \
CONFIG_IP_VS_DEBUG=n \
CONFIG_IP_VS_TAB_BITS=12 \
CONFIG_IP_VS_SH_TAB_BITS=8 \
CONFIG_NETFILTER_XT_MATCH_IPVS=n
DEPENDS:=+kmod-ipt-core +kmod-lib-crc32c +ip6tables
FILES:=$(LINUX_DIR)/net/netfilter/ipvs/ip_vs.ko
AUTOLOAD:=$(call AutoLoad,60,ip_vs)
endef
define KernelPackage/ipvs-core/description
Kernel modules core support for Linux Virtual Server
endef
$(eval $(call KernelPackage,ipvs-core))
define KernelPackage/ipvs-rr
SUBMENU:=$(NF_MENU)
TITLE:=IP Virtual Server Round Robin Scheduler
KCONFIG:= \
CONFIG_IP_VS_RR
DEPENDS:=+kmod-ipvs-core
FILES:=$(LINUX_DIR)/net/netfilter/ipvs/ip_vs_rr.ko
AUTOLOAD:=$(call AutoLoad,61,ip_vs_rr)
endef
define KernelPackage/ipvs-rr/description
The robin-robin scheduling algorithm simply directs network
endef
$(eval $(call KernelPackage,ipvs-rr))
define KernelPackage/ipvs-wrr
SUBMENU:=$(NF_MENU)
TITLE:=IP Virtual Server weighted round robin scheduler
KCONFIG:= \
CONFIG_IP_VS_WRR
DEPENDS:=+kmod-ipvs-core
FILES:=$(LINUX_DIR)/net/netfilter/ipvs/ip_vs_wrr.ko
AUTOLOAD:=$(call AutoLoad,61,ip_vs_wrr)
endef
define KernelPackage/ipvs-wrr/description
The robin-robin scheduling algorithm with weights
endef
$(eval $(call KernelPackage,ipvs-wrr))
define KernelPackage/ipvs-lc
SUBMENU:=$(NF_MENU)
TITLE:=IP Virtual Server least connections scheduler
KCONFIG:= \
CONFIG_IP_VS_LC
DEPENDS:=+kmod-ipvs-core
FILES:=$(LINUX_DIR)/net/netfilter/ipvs/ip_vs_lc.ko
AUTOLOAD:=$(call AutoLoad,61,ip_vs_lc)
endef
define KernelPackage/ipvs-lc/description
The least-connection scheduling algorithm directs network
connections to the server with the least number of active
connections
endef
$(eval $(call KernelPackage,ipvs-lc))
define KernelPackage/ipvs-wlc
SUBMENU:=$(NF_MENU)
TITLE:=IP Virtual Server weighted least connections scheduler
KCONFIG:= \
CONFIG_IP_VS_WLC
DEPENDS:=+kmod-ipvs-core
FILES:=$(LINUX_DIR)/net/netfilter/ipvs/ip_vs_wlc.ko
AUTOLOAD:=$(call AutoLoad,61,ip_vs_wlc)
endef
define KernelPackage/ipvs-wlc/description
The least-connection scheduling algorithm directs network
connections to the server with the least connections with
normalized by the server weight
endef
$(eval $(call KernelPackage,ipvs-wlc))
define KernelPackage/ipvs-lblc
SUBMENU:=$(NF_MENU)
TITLE:=IP Virtual Server locality based connections scheduler
KCONFIG:= \
CONFIG_IP_VS_LBLC
DEPENDS:=+kmod-ipvs-core
FILES:=$(LINUX_DIR)/net/netfilter/ipvs/ip_vs_lblc.ko
AUTOLOAD:=$(call AutoLoad,61,ip_vs_lblc)
endef
define KernelPackage/ipvs-lblc/description
The locality-based least-connection scheduling algorithm is for
destination IP load balancing. It is usually used in cache cluster
This algorithm usually directs packet destined for an IP address to
its server if the server is alive and under load. If the server is
overloaded (its active connection numbers is larger than its weight)
and there is a server in its half load, then allocate the weighted
least-connection server to this IP address.
endef
$(eval $(call KernelPackage,ipvs-lblc))
define KernelPackage/ipvs-lblcr
SUBMENU:=$(NF_MENU)
TITLE:=IP Virtual Server locality based with replication
KCONFIG:= \
CONFIG_IP_VS_LBLCR
DEPENDS:=+kmod-ipvs-core
FILES:=$(LINUX_DIR)/net/netfilter/ipvs/ip_vs_lblcr.ko
AUTOLOAD:=$(call AutoLoad,61,ip_vs_lblcr)
endef
define KernelPackage/ipvs-lblcr/description
The locality-based least-connection with replication scheduling
algorithm is also for destination IP load balancing. It is
usually used in cache cluster. It differs from the LBLC
scheduling as follows: the load balancer maintains mappings from a target
to a set of server nodes that can serve the target. Requests
for a target are assigned to the least-connection node in the target's
server set. If all the node in the server set are over
loaded, it picks up a least-connection node in the cluster and adds it
in the sever set for the target. If the server set has not been
modified for the specified time, the most loaded node is
removed from the server set, in order to avoid high degree of replication
endef
$(eval $(call KernelPackage,ipvs-lblcr))
define KernelPackage/ipvs-dh
SUBMENU:=$(NF_MENU)
TITLE:=IP Virtual Server destination hashing scheduler
KCONFIG:= \
CONFIG_IP_VS_DH
DEPENDS:=+kmod-ipvs-core
FILES:=$(LINUX_DIR)/net/netfilter/ipvs/ip_vs_dh.ko
AUTOLOAD:=$(call AutoLoad,61,ip_vs_dh)
endef
define KernelPackage/ipvs-dh/description
The destination hashing scheduling algorithm assigns network
connections to the servers through looking up a statically assigned
hash table by their destination IP addresses
endef
$(eval $(call KernelPackage,ipvs-dh))
define KernelPackage/ipvs-sh
SUBMENU:=$(NF_MENU)
TITLE:=IP Virtual Server source hashing scheduler
KCONFIG:= \
CONFIG_IP_VS_SH
DEPENDS:=+kmod-ipvs-core
FILES:=$(LINUX_DIR)/net/netfilter/ipvs/ip_vs_sh.ko
AUTOLOAD:=$(call AutoLoad,61,ip_vs_sh)
endef
define KernelPackage/ipvs-sh/description
The source hashing scheduling algorithm assigns network
connections to the servers through looking up a statically assigned
hash table by their source IP addresses
endef
$(eval $(call KernelPackage,ipvs-sh))
define KernelPackage/ipvs-sed
SUBMENU:=$(NF_MENU)
TITLE:=IP Virtual Server shortest expected delay scheduling
KCONFIG:= \
CONFIG_IP_VS_SED
DEPENDS:=+kmod-ipvs-core
FILES:=$(LINUX_DIR)/net/netfilter/ipvs/ip_vs_sed.ko
AUTOLOAD:=$(call AutoLoad,61,ip_vs_sed)
endef
define KernelPackage/ipvs-sed/description
The shortest expected delay scheduling algorithm assigns network
connections to the server with the shortest expected delay. The
expected delay that the job will experience is (Ci + 1) / Ui if
sent to the ith server, in which Ci is the number of connections
on the ith server and Ui is the fixed service rate (weight)
of the ith server.
endef
$(eval $(call KernelPackage,ipvs-sed))
define KernelPackage/ipvs-nq
SUBMENU:=$(NF_MENU)
TITLE:=IP Virtual Server never queuing scheduling
KCONFIG:= \
CONFIG_IP_VS_NQ
DEPENDS:=+kmod-ipvs-core
FILES:=$(LINUX_DIR)/net/netfilter/ipvs/ip_vs_nq.ko
AUTOLOAD:=$(call AutoLoad,61,ip_vs_nq)
endef
define KernelPackage/ipvs-nq/description
The never queue scheduling algorithm adopts a two-speed model.
When there is an idle server available, the job will be sent to
the idle server, instead of waiting for a fast one. When there
is no idle server available, the job will be sent to the server
that minimize its expected delay (The Shortest Expected Delay
scheduling algorithm)
endef
$(eval $(call KernelPackage,ipvs-nq))
define KernelPackage/ipvs-ftp
SUBMENU:=$(NF_MENU)
TITLE:=IP Virtual Server FTP protocol helper
KCONFIG:= \
CONFIG_IP_VS_FTP
DEPENDS:=+kmod-ipvs-core +kmod-ipt-nat +kmpd-ipt-nat6
FILES:=$(LINUX_DIR)/net/netfilter/ipvs/ip_vs_ftp.ko
AUTOLOAD:=$(call AutoLoad,61,ip_vs_ftp)
endef
define KernelPackage/ipvs-ftp/description
FTP is a protocol that transfers IP address and/or port number in
the payload. In the virtual server via Network Address Translation,
the IP address and port number of real servers cannot be sent to
clients in ftp connections directly, so FTP protocol helper is
required for tracking the connection and mangling it back to that of
virtual service.
endef
$(eval $(call KernelPackage,ipvs-ftp))
define KernelPackage/ipvs-pe-sip
SUBMENU:=$(NF_MENU)
TITLE:=IP Virtual Server SIP persistence engine
KCONFIG:= \
CONFIG_IP_VS_PE_SIP
DEPENDS:=+kmod-ipvs-core +kmod-ipt-nathelper-extra
FILES:=$(LINUX_DIR)/net/netfilter/ipvs/ip_vs_pe_sip.ko
AUTOLOAD:=$(call AutoLoad,61,ip_vs_pe_sip)
endef
define KernelPackage/ipvs-pe-sip/description
Allow persistence based on the SIP Call-I
endef
$(eval $(call KernelPackage,ipvs-pe-sip))
define KernelPackage/ipt-CLUSTERIP
TITLE:=CLUSTERIP SUPPORT
DEPENDS+=+IPV6:kmod-ipv6
KCONFIG:= \
CONFIG_IP_NF_TARGET_CLUSTERIP \
CONFIG_NETFILTER_XT_MATCH_CLUSTER
FILES:= \
$(LINUX_DIR)/net/ipv4/netfilter/ipt_CLUSTERIP.ko \
$(LINUX_DIR)/net/netfilter/xt_cluster.ko
AUTOLOAD:=$(call AutoLoad,61,ipt_CLUSTERIP xt_cluster )
$(call AddDepends/ipt)
endef
define KernelPackage/ipt-CLUSTERIP/description
Kernel modules for Transparent Proxying
endef
$(eval $(call KernelPackage,ipt-CLUSTERIP))