Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
6e22ce74
Commit
6e22ce74
authored
Jan 28, 2004
by
Patrick McHardy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NET_SCHED]: Add HFSC packet scheduler.
parent
53608418
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1908 additions
and
1 deletion
+1908
-1
include/linux/pkt_sched.h
include/linux/pkt_sched.h
+31
-0
include/net/pkt_sched.h
include/net/pkt_sched.h
+3
-0
net/sched/Kconfig
net/sched/Kconfig
+10
-1
net/sched/sch_hfsc.c
net/sched/sch_hfsc.c
+1864
-0
No files found.
include/linux/pkt_sched.h
View file @
6e22ce74
...
@@ -290,6 +290,37 @@ struct tc_htb_xstats
...
@@ -290,6 +290,37 @@ struct tc_htb_xstats
__u32
ctokens
;
__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 */
/* CBQ section */
#define TC_CBQ_MAXPRIO 8
#define TC_CBQ_MAXPRIO 8
...
...
include/net/pkt_sched.h
View file @
6e22ce74
...
@@ -203,6 +203,7 @@ typedef long psched_tdiff_t;
...
@@ -203,6 +203,7 @@ typedef long psched_tdiff_t;
#define PSCHED_GET_TIME(stamp) do_gettimeofday(&(stamp))
#define PSCHED_GET_TIME(stamp) do_gettimeofday(&(stamp))
#define PSCHED_US2JIFFIE(usecs) (((usecs)+(1000000/HZ-1))/(1000000/HZ))
#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);
#define PSCHED_EXPORTLIST EXPORT_SYMBOL(psched_tod_diff);
...
@@ -251,6 +252,7 @@ extern PSCHED_WATCHER psched_time_mark;
...
@@ -251,6 +252,7 @@ extern PSCHED_WATCHER psched_time_mark;
#endif
#endif
#define PSCHED_US2JIFFIE(delay) (((delay)+(1<<PSCHED_JSCALE)-1)>>PSCHED_JSCALE)
#define PSCHED_US2JIFFIE(delay) (((delay)+(1<<PSCHED_JSCALE)-1)>>PSCHED_JSCALE)
#define PSCHED_JIFFIE2US(delay) ((delay)<<PSCHED_JSCALE)
#elif PSCHED_CLOCK_SOURCE == PSCHED_CPU
#elif PSCHED_CLOCK_SOURCE == PSCHED_CPU
...
@@ -261,6 +263,7 @@ extern int psched_clock_scale;
...
@@ -261,6 +263,7 @@ extern int psched_clock_scale;
EXPORT_SYMBOL(psched_clock_scale);
EXPORT_SYMBOL(psched_clock_scale);
#define PSCHED_US2JIFFIE(delay) (((delay)+psched_clock_per_hz-1)/psched_clock_per_hz)
#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
#ifdef CONFIG_X86_TSC
...
...
net/sched/Kconfig
View file @
6e22ce74
...
@@ -39,6 +39,16 @@ config NET_SCH_HTB
...
@@ -39,6 +39,16 @@ config NET_SCH_HTB
To compile this code as a module, choose M here: the
To compile this code as a module, choose M here: the
module will be called sch_htb.
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
config NET_SCH_CSZ
tristate "CSZ packet scheduler"
tristate "CSZ packet scheduler"
depends on NET_SCHED
depends on NET_SCHED
...
@@ -55,7 +65,6 @@ config NET_SCH_CSZ
...
@@ -55,7 +65,6 @@ config NET_SCH_CSZ
module will be called sch_csz.
module will be called sch_csz.
#tristate ' H-PFQ packet scheduler' CONFIG_NET_SCH_HPFQ
#tristate ' H-PFQ packet scheduler' CONFIG_NET_SCH_HPFQ
#tristate ' H-FSC packet scheduler' CONFIG_NET_SCH_HFCS
config NET_SCH_ATM
config NET_SCH_ATM
tristate "ATM pseudo-scheduler"
tristate "ATM pseudo-scheduler"
depends on NET_SCHED && ATM
depends on NET_SCHED && ATM
...
...
net/sched/sch_hfsc.c
0 → 100644
View file @
6e22ce74
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment