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
Kirill Smelkov
linux
Commits
53f2191e
Commit
53f2191e
authored
Mar 14, 2004
by
Colin Gibbs
Committed by
David S. Miller
Mar 14, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NET_SCHED]: Use time_after, fixes htb on 64-bit arch.
parent
ae26e2ef
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
net/sched/sch_htb.c
net/sched/sch_htb.c
+4
-4
No files found.
net/sched/sch_htb.c
View file @
53f2191e
...
@@ -437,13 +437,13 @@ static void htb_add_to_wait_tree (struct htb_sched *q,
...
@@ -437,13 +437,13 @@ static void htb_add_to_wait_tree (struct htb_sched *q,
cl
->
pq_key
++
;
cl
->
pq_key
++
;
/* update the nearest event cache */
/* update the nearest event cache */
if
(
q
->
near_ev_cache
[
cl
->
level
]
-
cl
->
pq_key
<
0x80000000
)
if
(
time_after
(
q
->
near_ev_cache
[
cl
->
level
],
cl
->
pq_key
)
)
q
->
near_ev_cache
[
cl
->
level
]
=
cl
->
pq_key
;
q
->
near_ev_cache
[
cl
->
level
]
=
cl
->
pq_key
;
while
(
*
p
)
{
while
(
*
p
)
{
struct
htb_class
*
c
;
parent
=
*
p
;
struct
htb_class
*
c
;
parent
=
*
p
;
c
=
rb_entry
(
parent
,
struct
htb_class
,
pq_node
);
c
=
rb_entry
(
parent
,
struct
htb_class
,
pq_node
);
if
(
cl
->
pq_key
-
c
->
pq_key
<
0x80000000
)
if
(
time_after_eq
(
cl
->
pq_key
,
c
->
pq_key
)
)
p
=
&
parent
->
rb_right
;
p
=
&
parent
->
rb_right
;
else
else
p
=
&
parent
->
rb_left
;
p
=
&
parent
->
rb_left
;
...
@@ -869,7 +869,7 @@ static long htb_do_events(struct htb_sched *q,int level)
...
@@ -869,7 +869,7 @@ static long htb_do_events(struct htb_sched *q,int level)
while
(
p
->
rb_left
)
p
=
p
->
rb_left
;
while
(
p
->
rb_left
)
p
=
p
->
rb_left
;
cl
=
rb_entry
(
p
,
struct
htb_class
,
pq_node
);
cl
=
rb_entry
(
p
,
struct
htb_class
,
pq_node
);
if
(
cl
->
pq_key
-
(
q
->
jiffies
+
1
)
<
0x80000000
)
{
if
(
time_after
(
cl
->
pq_key
,
q
->
jiffies
)
)
{
HTB_DBG
(
8
,
3
,
"htb_do_ev_ret delay=%ld
\n
"
,
cl
->
pq_key
-
q
->
jiffies
);
HTB_DBG
(
8
,
3
,
"htb_do_ev_ret delay=%ld
\n
"
,
cl
->
pq_key
-
q
->
jiffies
);
return
cl
->
pq_key
-
q
->
jiffies
;
return
cl
->
pq_key
-
q
->
jiffies
;
}
}
...
@@ -1048,7 +1048,7 @@ static struct sk_buff *htb_dequeue(struct Qdisc *sch)
...
@@ -1048,7 +1048,7 @@ static struct sk_buff *htb_dequeue(struct Qdisc *sch)
/* common case optimization - skip event handler quickly */
/* common case optimization - skip event handler quickly */
int
m
;
int
m
;
long
delay
;
long
delay
;
if
(
q
->
jiffies
-
q
->
near_ev_cache
[
level
]
<
0x80000000
||
0
)
{
if
(
time_after_eq
(
q
->
jiffies
,
q
->
near_ev_cache
[
level
])
)
{
delay
=
htb_do_events
(
q
,
level
);
delay
=
htb_do_events
(
q
,
level
);
q
->
near_ev_cache
[
level
]
=
q
->
jiffies
+
(
delay
?
delay
:
HZ
);
q
->
near_ev_cache
[
level
]
=
q
->
jiffies
+
(
delay
?
delay
:
HZ
);
#ifdef HTB_DEBUG
#ifdef HTB_DEBUG
...
...
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