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
0e3a42cc
Commit
0e3a42cc
authored
Dec 07, 2003
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge master.kernel.org:/home/davem/BK/net-2.5
into home.osdl.org:/home/torvalds/v2.5/linux
parents
5902dfcc
419b7ac4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
net/sched/sch_htb.c
net/sched/sch_htb.c
+14
-4
No files found.
net/sched/sch_htb.c
View file @
0e3a42cc
...
...
@@ -74,7 +74,7 @@
#define HTB_HYSTERESIS 1
/* whether to use mode hysteresis for speedup */
#define HTB_QLOCK(S) spin_lock_bh(&(S)->dev->queue_lock)
#define HTB_QUNLOCK(S) spin_unlock_bh(&(S)->dev->queue_lock)
#define HTB_VER 0x3000
d
/* major must be matched with number suplied by TC as version */
#define HTB_VER 0x3000
e
/* major must be matched with number suplied by TC as version */
#if HTB_VER >> 16 != TC_HTB_PROTOVER
#error "Mismatched sch_htb.c and pkt_sch.h"
...
...
@@ -290,6 +290,11 @@ static __inline__ struct htb_class *htb_find(u32 handle, struct Qdisc *sch)
* then finish and return direct queue.
*/
#define HTB_DIRECT (struct htb_class*)-1
static
inline
u32
htb_classid
(
struct
htb_class
*
cl
)
{
return
(
cl
&&
cl
!=
HTB_DIRECT
)
?
cl
->
classid
:
TC_H_UNSPEC
;
}
static
struct
htb_class
*
htb_classify
(
struct
sk_buff
*
skb
,
struct
Qdisc
*
sch
)
{
struct
htb_sched
*
q
=
(
struct
htb_sched
*
)
sch
->
data
;
...
...
@@ -703,7 +708,7 @@ static int htb_enqueue(struct sk_buff *skb, struct Qdisc *sch)
sch
->
q
.
qlen
++
;
sch
->
stats
.
packets
++
;
sch
->
stats
.
bytes
+=
skb
->
len
;
HTB_DBG
(
1
,
1
,
"htb_enq_ok cl=%X skb=%p
\n
"
,
cl
?
cl
->
classid
:
0
,
skb
);
HTB_DBG
(
1
,
1
,
"htb_enq_ok cl=%X skb=%p
\n
"
,
htb_classid
(
cl
)
,
skb
);
return
NET_XMIT_SUCCESS
;
}
...
...
@@ -731,7 +736,7 @@ static int htb_requeue(struct sk_buff *skb, struct Qdisc *sch)
htb_activate
(
q
,
cl
);
sch
->
q
.
qlen
++
;
HTB_DBG
(
1
,
1
,
"htb_req_ok cl=%X skb=%p
\n
"
,
cl
?
cl
->
classid
:
0
,
skb
);
HTB_DBG
(
1
,
1
,
"htb_req_ok cl=%X skb=%p
\n
"
,
htb_classid
(
cl
)
,
skb
);
return
NET_XMIT_SUCCESS
;
}
...
...
@@ -1381,11 +1386,16 @@ static void htb_destroy(struct Qdisc* sch)
#ifdef HTB_RATECM
del_timer_sync
(
&
q
->
rttim
);
#endif
/* This line used to be after htb_destroy_class call below
and surprisingly it worked in 2.4. But it must precede it
because filter need its target class alive to be able to call
unbind_filter on it (without Oops). */
htb_destroy_filters
(
&
q
->
filter_list
);
while
(
!
list_empty
(
&
q
->
root
))
htb_destroy_class
(
sch
,
list_entry
(
q
->
root
.
next
,
struct
htb_class
,
sibling
));
htb_destroy_filters
(
&
q
->
filter_list
);
__skb_queue_purge
(
&
q
->
direct_queue
);
}
...
...
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