Commit 821b5162 authored by Alexey Kuznetsov's avatar Alexey Kuznetsov Committed by David S. Miller

PKT SCHED: Add HTB scheduler by Martin Devera.

parent 7b041aa0
......@@ -713,6 +713,11 @@ S: 3000 FORE Drive
S: Warrendale, Pennsylvania 15086
S: USA
N: Martin Devera
E: devik@cdi.cz
W: http://luxik.cdi.cz/~devik/qos/
D: HTB qdisc and random networking hacks
N: Alex deVries
E: adevries@thepuffingroup.com
D: Various SGI parts, bits of HAL2 and Newport, PA-RISC Linux.
......
......@@ -248,6 +248,48 @@ struct tc_gred_sopt
__u8 grio;
};
/* HTB section */
#define TC_HTB_NUMPRIO 8
#define TC_HTB_MAXDEPTH 8
#define TC_HTB_PROTOVER 3 /* the same as HTB and TC's major */
struct tc_htb_opt
{
struct tc_ratespec rate;
struct tc_ratespec ceil;
__u32 buffer;
__u32 cbuffer;
__u32 quantum;
__u32 level; /* out only */
__u32 prio;
};
struct tc_htb_glob
{
__u32 version; /* to match HTB/TC */
__u32 rate2quantum; /* bps->quantum divisor */
__u32 defcls; /* default class number */
__u32 debug; /* debug flags */
/* stats */
__u32 direct_pkts; /* count of non shapped packets */
};
enum
{
TCA_HTB_UNSPEC,
TCA_HTB_PARMS,
TCA_HTB_INIT,
TCA_HTB_CTAB,
TCA_HTB_RTAB,
};
struct tc_htb_xstats
{
__u32 lends;
__u32 borrows;
__u32 giants; /* too big packets (rate will not be accurate) */
__u32 tokens;
__u32 ctokens;
};
/* CBQ section */
#define TC_CBQ_MAXPRIO 8
......
......@@ -20,6 +20,20 @@ CONFIG_NET_SCH_CBQ
whenever you want). If you want to compile it as a module, say M
here and read <file:Documentation/modules.txt>.
CONFIG_NET_SCH_HTB
Say Y here if you want to use the Hierarchical Token Buckets (HTB)
packet scheduling algorithm for some of your network devices. See
URL http://luxik.cdi.cz/~devik/qos/htb/ for complete manual and
in-depth articles.
HTB is very similar to the CBQ regarding its goals however is has
different properties and different algorithm.
This code is also available as a module called sch_htb.o ( = code
which can be inserted in and removed from the running kernel
whenever you want). If you want to compile it as a module, say M
here and read <file:Documentation/modules.txt>.
CONFIG_NET_SCH_CSZ
Say Y here if you want to use the Clark-Shenker-Zhang (CSZ) packet
scheduling algorithm for some of your network devices. At the
......
......@@ -2,6 +2,7 @@
# Traffic control configuration.
#
tristate ' CBQ packet scheduler' CONFIG_NET_SCH_CBQ
tristate ' HTB packet scheduler' CONFIG_NET_SCH_HTB
tristate ' CSZ packet scheduler' CONFIG_NET_SCH_CSZ
#tristate ' H-PFQ packet scheduler' CONFIG_NET_SCH_HPFQ
#tristate ' H-FSC packet scheduler' CONFIG_NET_SCH_HFCS
......
......@@ -13,6 +13,7 @@ obj-$(CONFIG_NET_SCH_CBQ) += sch_cbq.o
obj-$(CONFIG_NET_SCH_CSZ) += sch_csz.o
obj-$(CONFIG_NET_SCH_HPFQ) += sch_hpfq.o
obj-$(CONFIG_NET_SCH_HFSC) += sch_hfsc.o
obj-$(CONFIG_NET_SCH_HTB) += sch_htb.o
obj-$(CONFIG_NET_SCH_SFQ) += sch_sfq.o
obj-$(CONFIG_NET_SCH_RED) += sch_red.o
obj-$(CONFIG_NET_SCH_TBF) += sch_tbf.o
......
......@@ -1205,6 +1205,9 @@ int __init pktsched_init(void)
#ifdef CONFIG_NET_SCH_CBQ
INIT_QDISC(cbq);
#endif
#ifdef CONFIG_NET_SCH_HTB
INIT_QDISC(htb);
#endif
#ifdef CONFIG_NET_SCH_CSZ
INIT_QDISC(csz);
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment