: HFSC packet scheduler
Subsystems (3)
PATCH 1/1 : HFSC packet scheduler
This is the 2.6 version of HFSC. Changes to last patch:
- don't crash on user error (non-work-conserving inner qdisc)
- trailing whitespace cleanup
Best regards,
Patrick
include/linux/pkt_sched.h +31 -0
@@ -290,6 +290,37 @@__u32 ctokens; }; +/* HFSC section */ + +struct tc_hfsc_qopt +{ +__u16 defcls;/* default class */ +}; + +struct tc_service_curve +{ +__u32 m1;/* slope of the first segment in bps */ +__u32 d;/* x-projection of the first segment in us */ +__u32 m2;/* slope of the second segment in bps */ +}; + +struct tc_hfsc_stats +{ +__u64 work;/* total work done */ +__u64 rtwork;/* work done by real-time criteria */ +__u32 period;/* current period */ +__u32 level;/* class level in hierarchy */ +}; + +enum +{ +TCA_HFSC_UNSPEC , +TCA_HFSC_RSC , +TCA_HFSC_FSC , +TCA_HFSC_USC , +TCA_HFSC_MAX =TCA_HFSC_USC +}; +/* CBQ section */ #define TC_CBQ_MAXPRIO 8
include/net/pkt_sched.h +3 -0
@@ -203,6 +203,7 @@#define PSCHED_GET_TIME (stamp) do_gettimeofday(&(stamp))#define PSCHED_US2JIFFIE (usecs) (((usecs)+(1000000/HZ-1))/(1000000/HZ)) +#define PSCHED_JIFFIE2US (delay) ((delay)*(1000000/HZ))#define PSCHED_EXPORTLIST EXPORT_SYMBOL(psched_tod_diff);
@@ -251,6 +252,7 @@#endif #define PSCHED_US2JIFFIE (delay) (((delay)+(1<<PSCHED_JSCALE)-1)>>PSCHED_JSCALE) +#define PSCHED_JIFFIE2US (delay) ((delay)<<PSCHED_JSCALE)#elif PSCHED_CLOCK_SOURCE == PSCHED_CPU
@@ -261,6 +263,7 @@EXPORT_SYMBOL (psched_clock_scale);#define PSCHED_US2JIFFIE (delay) (((delay)+psched_clock_per_hz-1)/psched_clock_per_hz) +#define PSCHED_JIFFIE2US (delay) ((delay)*psched_clock_per_hz)#ifdef CONFIG_X86_TSC
net/sched/Kconfig +10 -1
@@ -39,6 +39,16 @@ To compile this code as a module, choose M here: the module will be called sch_htb. +config NET_SCH_HFSC + tristate "HFSC packet scheduler" + depends on NET_SCHED + ---help--- + Say Y here if you want to use the Hierarchical Fair Service Curve + (HFSC) packet scheduling algorithm for some of your network devices. + + To compile this code as a module, choose M here: the + module will be called sch_hfsc. + config NET_SCH_CSZ tristate "CSZ packet scheduler" depends on NET_SCHED
@@ -55,7 +65,6 @@ module will be called sch_csz. #tristate ' H-PFQ packet scheduler' CONFIG_NET_SCH_HPFQ -#tristate ' H-FSC packet scheduler' CONFIG_NET_SCH_HFCS config NET_SCH_ATM tristate "ATM pseudo-scheduler" depends on NET_SCHED && ATM
net/sched/sch_hfsc.c +1864 -0
1,864 lines not on this page · raw message
Quoted 4 lines · On Thu, 29 Jan 2004 16:16:08 +0100 Patrick McHardy <[email protected]> wrote:
This is the 2.6 version of HFSC. Changes to last patch:
- don't crash on user error (non-work-conserving inner qdisc)
- trailing whitespace cleanup
Ok applied. I did a s/u_intX_t/uX/ in sch_hfsc.c, I hope you don't mind.