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
025dc69a
Commit
025dc69a
authored
Aug 09, 2004
by
osdl.net!shemminger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix errors in netem scheduler when using PSCHED_CLOCK_CPU,
correct value before passing to kernel. (Logical change 1.63)
parent
cbe1a23d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
ChangeLog
ChangeLog
+2
-0
tc/q_netem.c
tc/q_netem.c
+5
-2
No files found.
ChangeLog
View file @
025dc69a
2004-08-09 Stephen Hemminger <shemminger@osdl.org>
2004-08-09 Stephen Hemminger <shemminger@osdl.org>
* Fix netem scheduler to handle case where psched us != real us
* Remove configuration for everything that can depend on
* Remove configuration for everything that can depend on
extracted kernel headers
extracted kernel headers
* Add kernel headers required to include/linux
* Add kernel headers required to include/linux
...
...
tc/q_netem.c
View file @
025dc69a
...
@@ -42,6 +42,7 @@ static int netem_parse_opt(struct qdisc_util *qu, int argc, char **argv,
...
@@ -42,6 +42,7 @@ static int netem_parse_opt(struct qdisc_util *qu, int argc, char **argv,
struct
nlmsghdr
*
n
)
struct
nlmsghdr
*
n
)
{
{
struct
tc_netem_qopt
opt
;
struct
tc_netem_qopt
opt
;
unsigned
latency
=
0
;
int
ok
=
0
;
int
ok
=
0
;
memset
(
&
opt
,
0
,
sizeof
(
opt
));
memset
(
&
opt
,
0
,
sizeof
(
opt
));
...
@@ -57,7 +58,7 @@ static int netem_parse_opt(struct qdisc_util *qu, int argc, char **argv,
...
@@ -57,7 +58,7 @@ static int netem_parse_opt(struct qdisc_util *qu, int argc, char **argv,
ok
++
;
ok
++
;
}
else
if
(
matches
(
*
argv
,
"latency"
)
==
0
)
{
}
else
if
(
matches
(
*
argv
,
"latency"
)
==
0
)
{
NEXT_ARG
();
NEXT_ARG
();
if
(
get_usecs
(
&
opt
.
latency
,
*
argv
))
{
if
(
get_usecs
(
&
latency
,
*
argv
))
{
explain1
(
"latency"
);
explain1
(
"latency"
);
return
-
1
;
return
-
1
;
}
}
...
@@ -101,6 +102,8 @@ static int netem_parse_opt(struct qdisc_util *qu, int argc, char **argv,
...
@@ -101,6 +102,8 @@ static int netem_parse_opt(struct qdisc_util *qu, int argc, char **argv,
argc
--
;
argv
++
;
argc
--
;
argv
++
;
}
}
opt
.
latency
=
tc_core_usec2tick
(
latency
);
return
ok
?
addattr_l
(
n
,
1024
,
TCA_OPTIONS
,
&
opt
,
sizeof
(
opt
))
:
0
;
return
ok
?
addattr_l
(
n
,
1024
,
TCA_OPTIONS
,
&
opt
,
sizeof
(
opt
))
:
0
;
}
}
...
@@ -120,7 +123,7 @@ static int netem_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
...
@@ -120,7 +123,7 @@ static int netem_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
fprintf
(
f
,
"limit %d"
,
qopt
->
limit
);
fprintf
(
f
,
"limit %d"
,
qopt
->
limit
);
if
(
qopt
->
latency
)
if
(
qopt
->
latency
)
fprintf
(
f
,
" latency %s"
,
fprintf
(
f
,
" latency %s"
,
sprint_usecs
(
qopt
->
latency
,
b1
));
sprint_usecs
(
tc_core_tick2usec
(
qopt
->
latency
)
,
b1
));
if
(
qopt
->
jitter
)
if
(
qopt
->
jitter
)
fprintf
(
f
,
" jitter %s"
,
sprint_usecs
(
qopt
->
jitter
,
b1
));
fprintf
(
f
,
" jitter %s"
,
sprint_usecs
(
qopt
->
jitter
,
b1
));
...
...
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