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
1372dfd7
Commit
1372dfd7
authored
Mar 19, 2002
by
Alexey Kuznetsov
Committed by
David S. Miller
Mar 19, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
In sch_sfq.c, allow to descrease length of queue
parent
2f3c3f98
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
net/sched/sch_sfq.c
net/sched/sch_sfq.c
+11
-4
No files found.
net/sched/sch_sfq.c
View file @
1372dfd7
...
...
@@ -105,6 +105,7 @@ struct sfq_sched_data
/* Parameters */
int
perturb_period
;
unsigned
quantum
;
/* Allotment per round: MUST BE >= MTU */
int
limit
;
/* Variables */
struct
timer_list
perturb_timer
;
...
...
@@ -275,7 +276,7 @@ sfq_enqueue(struct sk_buff *skb, struct Qdisc* sch)
q
->
tail
=
x
;
}
}
if
(
++
sch
->
q
.
qlen
<
SFQ_DEPTH
-
1
)
{
if
(
++
sch
->
q
.
qlen
<
q
->
limit
-
1
)
{
sch
->
stats
.
bytes
+=
skb
->
len
;
sch
->
stats
.
packets
++
;
return
0
;
...
...
@@ -310,7 +311,7 @@ sfq_requeue(struct sk_buff *skb, struct Qdisc* sch)
q
->
tail
=
x
;
}
}
if
(
++
sch
->
q
.
qlen
<
SFQ_DEPTH
-
1
)
if
(
++
sch
->
q
.
qlen
<
q
->
limit
-
1
)
return
0
;
sch
->
stats
.
drops
++
;
...
...
@@ -390,6 +391,11 @@ static int sfq_change(struct Qdisc *sch, struct rtattr *opt)
sch_tree_lock
(
sch
);
q
->
quantum
=
ctl
->
quantum
?
:
psched_mtu
(
sch
->
dev
);
q
->
perturb_period
=
ctl
->
perturb_period
*
HZ
;
if
(
ctl
->
limit
)
q
->
limit
=
min_t
(
u32
,
ctl
->
limit
,
SFQ_DEPTH
);
while
(
sch
->
q
.
qlen
>=
q
->
limit
-
1
)
sfq_drop
(
sch
);
del_timer
(
&
q
->
perturb_timer
);
if
(
q
->
perturb_period
)
{
...
...
@@ -416,6 +422,7 @@ static int sfq_init(struct Qdisc *sch, struct rtattr *opt)
q
->
dep
[
i
+
SFQ_DEPTH
].
next
=
i
+
SFQ_DEPTH
;
q
->
dep
[
i
+
SFQ_DEPTH
].
prev
=
i
+
SFQ_DEPTH
;
}
q
->
limit
=
SFQ_DEPTH
;
q
->
max_depth
=
0
;
q
->
tail
=
SFQ_DEPTH
;
if
(
opt
==
NULL
)
{
...
...
@@ -448,9 +455,9 @@ static int sfq_dump(struct Qdisc *sch, struct sk_buff *skb)
opt
.
quantum
=
q
->
quantum
;
opt
.
perturb_period
=
q
->
perturb_period
/
HZ
;
opt
.
limit
=
SFQ_DEPTH
;
opt
.
limit
=
q
->
limit
;
opt
.
divisor
=
SFQ_HASH_DIVISOR
;
opt
.
flows
=
SFQ_DEPTH
;
opt
.
flows
=
q
->
limit
;
RTA_PUT
(
skb
,
TCA_OPTIONS
,
sizeof
(
opt
),
&
opt
);
...
...
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