xref: /linux/net/sched/Kconfig (revision c537b994505099b7197e7d3125b942ecbcc51eb6)
1#
2# Traffic control configuration.
3#
4
5menu "QoS and/or fair queueing"
6
7config NET_SCHED
8	bool "QoS and/or fair queueing"
9	select NET_SCH_FIFO
10	---help---
11	  When the kernel has several packets to send out over a network
12	  device, it has to decide which ones to send first, which ones to
13	  delay, and which ones to drop. This is the job of the queueing
14	  disciplines, several different algorithms for how to do this
15	  "fairly" have been proposed.
16
17	  If you say N here, you will get the standard packet scheduler, which
18	  is a FIFO (first come, first served). If you say Y here, you will be
19	  able to choose from among several alternative algorithms which can
20	  then be attached to different network devices. This is useful for
21	  example if some of your network devices are real time devices that
22	  need a certain minimum data flow rate, or if you need to limit the
23	  maximum data flow rate for traffic which matches specified criteria.
24	  This code is considered to be experimental.
25
26	  To administer these schedulers, you'll need the user-level utilities
27	  from the package iproute2+tc at <ftp://ftp.tux.org/pub/net/ip-routing/>.
28	  That package also contains some documentation; for more, check out
29	  <http://linux-net.osdl.org/index.php/Iproute2>.
30
31	  This Quality of Service (QoS) support will enable you to use
32	  Differentiated Services (diffserv) and Resource Reservation Protocol
33	  (RSVP) on your Linux router if you also say Y to the corresponding
34	  classifiers below.  Documentation and software is at
35	  <http://diffserv.sourceforge.net/>.
36
37	  If you say Y here and to "/proc file system" below, you will be able
38	  to read status information about packet schedulers from the file
39	  /proc/net/psched.
40
41	  The available schedulers are listed in the following questions; you
42	  can say Y to as many as you like. If unsure, say N now.
43
44config NET_SCH_FIFO
45	bool
46
47if NET_SCHED
48
49choice
50	prompt "Packet scheduler clock source"
51	default NET_SCH_CLK_GETTIMEOFDAY
52	---help---
53	  Packet schedulers need a monotonic clock that increments at a static
54	  rate. The kernel provides several suitable interfaces, each with
55	  different properties:
56
57	  - high resolution (us or better)
58	  - fast to read (minimal locking, no i/o access)
59	  - synchronized on all processors
60	  - handles cpu clock frequency changes
61
62	  but nothing provides all of the above.
63
64config NET_SCH_CLK_JIFFIES
65	bool "Timer interrupt"
66	---help---
67	  Say Y here if you want to use the timer interrupt (jiffies) as clock
68	  source. This clock source is fast, synchronized on all processors and
69	  handles cpu clock frequency changes, but its resolution is too low
70	  for accurate shaping except at very low speed.
71
72config NET_SCH_CLK_GETTIMEOFDAY
73	bool "gettimeofday"
74	---help---
75	  Say Y here if you want to use gettimeofday as clock source. This clock
76	  source has high resolution, is synchronized on all processors and
77	  handles cpu clock frequency changes, but it is slow.
78
79	  Choose this if you need a high resolution clock source but can't use
80	  the CPU's cycle counter.
81
82# don't allow on SMP x86 because they can have unsynchronized TSCs.
83# gettimeofday is a good alternative
84config NET_SCH_CLK_CPU
85	bool "CPU cycle counter"
86	depends on ((X86_TSC || X86_64) && !SMP) || ALPHA || SPARC64 || PPC64 || IA64
87	---help---
88	  Say Y here if you want to use the CPU's cycle counter as clock source.
89	  This is a cheap and high resolution clock source, but on some
90	  architectures it is not synchronized on all processors and doesn't
91	  handle cpu clock frequency changes.
92
93	  The useable cycle counters are:
94
95	  	x86/x86_64	- Timestamp Counter
96		alpha		- Cycle Counter
97		sparc64		- %ticks register
98		ppc64		- Time base
99		ia64		- Interval Time Counter
100
101	  Choose this if your CPU's cycle counter is working properly.
102
103endchoice
104
105comment "Queueing/Scheduling"
106
107config NET_SCH_CBQ
108	tristate "Class Based Queueing (CBQ)"
109	---help---
110	  Say Y here if you want to use the Class-Based Queueing (CBQ) packet
111	  scheduling algorithm. This algorithm classifies the waiting packets
112	  into a tree-like hierarchy of classes; the leaves of this tree are
113	  in turn scheduled by separate algorithms.
114
115	  See the top of <file:net/sched/sch_cbq.c> for more details.
116
117	  CBQ is a commonly used scheduler, so if you're unsure, you should
118	  say Y here. Then say Y to all the queueing algorithms below that you
119	  want to use as leaf disciplines.
120
121	  To compile this code as a module, choose M here: the
122	  module will be called sch_cbq.
123
124config NET_SCH_HTB
125	tristate "Hierarchical Token Bucket (HTB)"
126	---help---
127	  Say Y here if you want to use the Hierarchical Token Buckets (HTB)
128	  packet scheduling algorithm. See
129	  <http://luxik.cdi.cz/~devik/qos/htb/> for complete manual and
130	  in-depth articles.
131
132	  HTB is very similar to CBQ regarding its goals however is has
133	  different properties and different algorithm.
134
135	  To compile this code as a module, choose M here: the
136	  module will be called sch_htb.
137
138config NET_SCH_HFSC
139	tristate "Hierarchical Fair Service Curve (HFSC)"
140	---help---
141	  Say Y here if you want to use the Hierarchical Fair Service Curve
142	  (HFSC) packet scheduling algorithm.
143
144	  To compile this code as a module, choose M here: the
145	  module will be called sch_hfsc.
146
147config NET_SCH_ATM
148	tristate "ATM Virtual Circuits (ATM)"
149	depends on ATM
150	---help---
151	  Say Y here if you want to use the ATM pseudo-scheduler.  This
152	  provides a framework for invoking classifiers, which in turn
153	  select classes of this queuing discipline.  Each class maps
154	  the flow(s) it is handling to a given virtual circuit.
155
156	  See the top of <file:net/sched/sch_atm.c>) for more details.
157
158	  To compile this code as a module, choose M here: the
159	  module will be called sch_atm.
160
161config NET_SCH_PRIO
162	tristate "Multi Band Priority Queueing (PRIO)"
163	---help---
164	  Say Y here if you want to use an n-band priority queue packet
165	  scheduler.
166
167	  To compile this code as a module, choose M here: the
168	  module will be called sch_prio.
169
170config NET_SCH_RED
171	tristate "Random Early Detection (RED)"
172	---help---
173	  Say Y here if you want to use the Random Early Detection (RED)
174	  packet scheduling algorithm.
175
176	  See the top of <file:net/sched/sch_red.c> for more details.
177
178	  To compile this code as a module, choose M here: the
179	  module will be called sch_red.
180
181config NET_SCH_SFQ
182	tristate "Stochastic Fairness Queueing (SFQ)"
183	---help---
184	  Say Y here if you want to use the Stochastic Fairness Queueing (SFQ)
185	  packet scheduling algorithm .
186
187	  See the top of <file:net/sched/sch_sfq.c> for more details.
188
189	  To compile this code as a module, choose M here: the
190	  module will be called sch_sfq.
191
192config NET_SCH_TEQL
193	tristate "True Link Equalizer (TEQL)"
194	---help---
195	  Say Y here if you want to use the True Link Equalizer (TLE) packet
196	  scheduling algorithm. This queueing discipline allows the combination
197	  of several physical devices into one virtual device.
198
199	  See the top of <file:net/sched/sch_teql.c> for more details.
200
201	  To compile this code as a module, choose M here: the
202	  module will be called sch_teql.
203
204config NET_SCH_TBF
205	tristate "Token Bucket Filter (TBF)"
206	---help---
207	  Say Y here if you want to use the Token Bucket Filter (TBF) packet
208	  scheduling algorithm.
209
210	  See the top of <file:net/sched/sch_tbf.c> for more details.
211
212	  To compile this code as a module, choose M here: the
213	  module will be called sch_tbf.
214
215config NET_SCH_GRED
216	tristate "Generic Random Early Detection (GRED)"
217	---help---
218	  Say Y here if you want to use the Generic Random Early Detection
219	  (GRED) packet scheduling algorithm for some of your network devices
220	  (see the top of <file:net/sched/sch_red.c> for details and
221	  references about the algorithm).
222
223	  To compile this code as a module, choose M here: the
224	  module will be called sch_gred.
225
226config NET_SCH_DSMARK
227	tristate "Differentiated Services marker (DSMARK)"
228	---help---
229	  Say Y if you want to schedule packets according to the
230	  Differentiated Services architecture proposed in RFC 2475.
231	  Technical information on this method, with pointers to associated
232	  RFCs, is available at <http://www.gta.ufrj.br/diffserv/>.
233
234	  To compile this code as a module, choose M here: the
235	  module will be called sch_dsmark.
236
237config NET_SCH_NETEM
238	tristate "Network emulator (NETEM)"
239	---help---
240	  Say Y if you want to emulate network delay, loss, and packet
241	  re-ordering. This is often useful to simulate networks when
242	  testing applications or protocols.
243
244	  To compile this driver as a module, choose M here: the module
245	  will be called sch_netem.
246
247	  If unsure, say N.
248
249config NET_SCH_INGRESS
250	tristate "Ingress Qdisc"
251	---help---
252	  Say Y here if you want to use classifiers for incoming packets.
253	  If unsure, say Y.
254
255	  To compile this code as a module, choose M here: the
256	  module will be called sch_ingress.
257
258comment "Classification"
259
260config NET_CLS
261	boolean
262
263config NET_CLS_BASIC
264	tristate "Elementary classification (BASIC)"
265	select NET_CLS
266	---help---
267	  Say Y here if you want to be able to classify packets using
268	  only extended matches and actions.
269
270	  To compile this code as a module, choose M here: the
271	  module will be called cls_basic.
272
273config NET_CLS_TCINDEX
274	tristate "Traffic-Control Index (TCINDEX)"
275	select NET_CLS
276	---help---
277	  Say Y here if you want to be able to classify packets based on
278	  traffic control indices. You will want this feature if you want
279	  to implement Differentiated Services together with DSMARK.
280
281	  To compile this code as a module, choose M here: the
282	  module will be called cls_tcindex.
283
284config NET_CLS_ROUTE4
285	tristate "Routing decision (ROUTE)"
286	select NET_CLS_ROUTE
287	select NET_CLS
288	---help---
289	  If you say Y here, you will be able to classify packets
290	  according to the route table entry they matched.
291
292	  To compile this code as a module, choose M here: the
293	  module will be called cls_route.
294
295config NET_CLS_ROUTE
296	bool
297
298config NET_CLS_FW
299	tristate "Netfilter mark (FW)"
300	select NET_CLS
301	---help---
302	  If you say Y here, you will be able to classify packets
303	  according to netfilter/firewall marks.
304
305	  To compile this code as a module, choose M here: the
306	  module will be called cls_fw.
307
308config NET_CLS_U32
309	tristate "Universal 32bit comparisons w/ hashing (U32)"
310	select NET_CLS
311	---help---
312	  Say Y here to be able to classify packets using a universal
313	  32bit pieces based comparison scheme.
314
315	  To compile this code as a module, choose M here: the
316	  module will be called cls_u32.
317
318config CLS_U32_PERF
319	bool "Performance counters support"
320	depends on NET_CLS_U32
321	---help---
322	  Say Y here to make u32 gather additional statistics useful for
323	  fine tuning u32 classifiers.
324
325config CLS_U32_MARK
326	bool "Netfilter marks support"
327	depends on NET_CLS_U32
328	---help---
329	  Say Y here to be able to use netfilter marks as u32 key.
330
331config NET_CLS_RSVP
332	tristate "IPv4 Resource Reservation Protocol (RSVP)"
333	select NET_CLS
334	select NET_ESTIMATOR
335	---help---
336	  The Resource Reservation Protocol (RSVP) permits end systems to
337	  request a minimum and maximum data flow rate for a connection; this
338	  is important for real time data such as streaming sound or video.
339
340	  Say Y here if you want to be able to classify outgoing packets based
341	  on their RSVP requests.
342
343	  To compile this code as a module, choose M here: the
344	  module will be called cls_rsvp.
345
346config NET_CLS_RSVP6
347	tristate "IPv6 Resource Reservation Protocol (RSVP6)"
348	select NET_CLS
349	select NET_ESTIMATOR
350	---help---
351	  The Resource Reservation Protocol (RSVP) permits end systems to
352	  request a minimum and maximum data flow rate for a connection; this
353	  is important for real time data such as streaming sound or video.
354
355	  Say Y here if you want to be able to classify outgoing packets based
356	  on their RSVP requests and you are using the IPv6.
357
358	  To compile this code as a module, choose M here: the
359	  module will be called cls_rsvp6.
360
361config NET_EMATCH
362	bool "Extended Matches"
363	select NET_CLS
364	---help---
365	  Say Y here if you want to use extended matches on top of classifiers
366	  and select the extended matches below.
367
368	  Extended matches are small classification helpers not worth writing
369	  a separate classifier for.
370
371	  A recent version of the iproute2 package is required to use
372	  extended matches.
373
374config NET_EMATCH_STACK
375	int "Stack size"
376	depends on NET_EMATCH
377	default "32"
378	---help---
379	  Size of the local stack variable used while evaluating the tree of
380	  ematches. Limits the depth of the tree, i.e. the number of
381	  encapsulated precedences. Every level requires 4 bytes of additional
382	  stack space.
383
384config NET_EMATCH_CMP
385	tristate "Simple packet data comparison"
386	depends on NET_EMATCH
387	---help---
388	  Say Y here if you want to be able to classify packets based on
389	  simple packet data comparisons for 8, 16, and 32bit values.
390
391	  To compile this code as a module, choose M here: the
392	  module will be called em_cmp.
393
394config NET_EMATCH_NBYTE
395	tristate "Multi byte comparison"
396	depends on NET_EMATCH
397	---help---
398	  Say Y here if you want to be able to classify packets based on
399	  multiple byte comparisons mainly useful for IPv6 address comparisons.
400
401	  To compile this code as a module, choose M here: the
402	  module will be called em_nbyte.
403
404config NET_EMATCH_U32
405	tristate "U32 key"
406	depends on NET_EMATCH
407	---help---
408	  Say Y here if you want to be able to classify packets using
409	  the famous u32 key in combination with logic relations.
410
411	  To compile this code as a module, choose M here: the
412	  module will be called em_u32.
413
414config NET_EMATCH_META
415	tristate "Metadata"
416	depends on NET_EMATCH
417	---help---
418	  Say Y here if you want to be able to classify packets based on
419	  metadata such as load average, netfilter attributes, socket
420	  attributes and routing decisions.
421
422	  To compile this code as a module, choose M here: the
423	  module will be called em_meta.
424
425config NET_EMATCH_TEXT
426	tristate "Textsearch"
427	depends on NET_EMATCH
428	select TEXTSEARCH
429	select TEXTSEARCH_KMP
430	select TEXTSEARCH_BM
431	select TEXTSEARCH_FSM
432	---help---
433	  Say Y here if you want to be able to classify packets based on
434	  textsearch comparisons.
435
436	  To compile this code as a module, choose M here: the
437	  module will be called em_text.
438
439config NET_CLS_ACT
440	bool "Actions"
441	select NET_ESTIMATOR
442	---help---
443	  Say Y here if you want to use traffic control actions. Actions
444	  get attached to classifiers and are invoked after a successful
445	  classification. They are used to overwrite the classification
446	  result, instantly drop or redirect packets, etc.
447
448	  A recent version of the iproute2 package is required to use
449	  extended matches.
450
451config NET_ACT_POLICE
452	tristate "Traffic Policing"
453        depends on NET_CLS_ACT
454        ---help---
455	  Say Y here if you want to do traffic policing, i.e. strict
456	  bandwidth limiting. This action replaces the existing policing
457	  module.
458
459	  To compile this code as a module, choose M here: the
460	  module will be called police.
461
462config NET_ACT_GACT
463        tristate "Generic actions"
464        depends on NET_CLS_ACT
465        ---help---
466	  Say Y here to take generic actions such as dropping and
467	  accepting packets.
468
469	  To compile this code as a module, choose M here: the
470	  module will be called gact.
471
472config GACT_PROB
473        bool "Probability support"
474        depends on NET_ACT_GACT
475        ---help---
476	  Say Y here to use the generic action randomly or deterministically.
477
478config NET_ACT_MIRRED
479        tristate "Redirecting and Mirroring"
480        depends on NET_CLS_ACT
481        ---help---
482	  Say Y here to allow packets to be mirrored or redirected to
483	  other devices.
484
485	  To compile this code as a module, choose M here: the
486	  module will be called mirred.
487
488config NET_ACT_IPT
489        tristate "IPtables targets"
490        depends on NET_CLS_ACT && NETFILTER && IP_NF_IPTABLES
491        ---help---
492	  Say Y here to be able to invoke iptables targets after successful
493	  classification.
494
495	  To compile this code as a module, choose M here: the
496	  module will be called ipt.
497
498config NET_ACT_PEDIT
499        tristate "Packet Editing"
500        depends on NET_CLS_ACT
501        ---help---
502	  Say Y here if you want to mangle the content of packets.
503
504	  To compile this code as a module, choose M here: the
505	  module will be called pedit.
506
507config NET_ACT_SIMP
508        tristate "Simple Example (Debug)"
509        depends on NET_CLS_ACT
510        ---help---
511	  Say Y here to add a simple action for demonstration purposes.
512	  It is meant as an example and for debugging purposes. It will
513	  print a configured policy string followed by the packet count
514	  to the console for every packet that passes by.
515
516	  If unsure, say N.
517
518	  To compile this code as a module, choose M here: the
519	  module will be called simple.
520
521config NET_CLS_POLICE
522	bool "Traffic Policing (obsolete)"
523	depends on NET_CLS_ACT!=y
524	select NET_ESTIMATOR
525	---help---
526	  Say Y here if you want to do traffic policing, i.e. strict
527	  bandwidth limiting. This option is obsoleted by the traffic
528	  policer implemented as action, it stays here for compatibility
529	  reasons.
530
531config NET_CLS_IND
532	bool "Incoming device classification"
533	depends on NET_CLS_U32 || NET_CLS_FW
534	---help---
535	  Say Y here to extend the u32 and fw classifier to support
536	  classification based on the incoming device. This option is
537	  likely to disappear in favour of the metadata ematch.
538
539config NET_ESTIMATOR
540	bool "Rate estimator"
541	---help---
542	  Say Y here to allow using rate estimators to estimate the current
543	  rate-of-flow for network devices, queues, etc. This module is
544	  automatically selected if needed but can be selected manually for
545	  statistical purposes.
546
547endif # NET_SCHED
548
549endmenu
550