Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
iproute2
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
Kirill Smelkov
iproute2
Commits
f3f28c21
Commit
f3f28c21
authored
Jan 23, 2011
by
Eric Dumazet
Committed by
Stephen Hemminger
Feb 25, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sfq: add divisor support
In 2.6.39, we can build SFQ queues with a given hash table size,
parent
81d03dc3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
tc/q_sfq.c
tc/q_sfq.c
+9
-0
No files found.
tc/q_sfq.c
View file @
f3f28c21
...
...
@@ -26,6 +26,7 @@
static
void
explain
(
void
)
{
fprintf
(
stderr
,
"Usage: ... sfq [ limit NUMBER ] [ perturb SECS ] [ quantum BYTES ]
\n
"
);
fprintf
(
stderr
,
" [ divisor NUMBER ]
\n
"
);
}
static
int
sfq_parse_opt
(
struct
qdisc_util
*
qu
,
int
argc
,
char
**
argv
,
struct
nlmsghdr
*
n
)
...
...
@@ -61,6 +62,13 @@ static int sfq_parse_opt(struct qdisc_util *qu, int argc, char **argv, struct nl
return
-
1
;
}
ok
++
;
}
else
if
(
strcmp
(
*
argv
,
"divisor"
)
==
0
)
{
NEXT_ARG
();
if
(
get_u32
(
&
opt
.
divisor
,
*
argv
,
0
))
{
fprintf
(
stderr
,
"Illegal
\"
divisor
\"\n
"
);
return
-
1
;
}
ok
++
;
}
else
if
(
strcmp
(
*
argv
,
"help"
)
==
0
)
{
explain
();
return
-
1
;
...
...
@@ -93,6 +101,7 @@ static int sfq_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
if
(
show_details
)
{
fprintf
(
f
,
"flows %u/%u "
,
qopt
->
flows
,
qopt
->
divisor
);
}
fprintf
(
f
,
"divisor %u "
,
qopt
->
divisor
);
if
(
qopt
->
perturb_period
)
fprintf
(
f
,
"perturb %dsec "
,
qopt
->
perturb_period
);
return
0
;
...
...
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