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
dcc64c24
Commit
dcc64c24
authored
Jun 29, 2004
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cset exclude: dtor_core@ameritech.net|ChangeSet|20040629212548|46753
parent
5e883a38
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
14 deletions
+16
-14
net/sched/sch_prio.c
net/sched/sch_prio.c
+16
-14
No files found.
net/sched/sch_prio.c
View file @
dcc64c24
...
...
@@ -47,19 +47,20 @@ struct prio_sched_data
};
struct
Qdisc
*
prio_classify
(
struct
sk_buff
*
skb
,
struct
Qdisc
*
sch
,
int
*
r
)
struct
Qdisc
*
prio_classify
(
struct
sk_buff
*
skb
,
struct
Qdisc
*
sch
,
int
*
r
)
{
struct
prio_sched_data
*
q
=
(
struct
prio_sched_data
*
)
sch
->
data
;
struct
tcf_result
res
;
u32
band
;
int
result
=
0
;
band
=
skb
->
priority
;
if
(
TC_H_MAJ
(
skb
->
priority
)
!=
sch
->
handle
)
{
#ifdef CONFIG_NET_CLS_ACT
*
r
=
tc_classify
(
skb
,
q
->
filter_list
,
&
res
);
*
r
=
result
=
tc_classify
(
skb
,
q
->
filter_list
,
&
res
);
switch
(
*
r
)
{
switch
(
result
)
{
case
TC_ACT_SHOT
:
case
TC_ACT_STOLEN
:
case
TC_ACT_QUEUED
:
...
...
@@ -72,19 +73,19 @@ struct Qdisc *prio_classify(struct sk_buff *skb, struct Qdisc *sch, int *r)
break
;
};
if
(
!
q
->
filter_list
)
{
if
(
!
q
->
filter_list
)
{
#else
if
(
!
q
->
filter_list
||
tc_classify
(
skb
,
q
->
filter_list
,
&
res
))
{
#endif
if
(
TC_H_MAJ
(
band
))
band
=
0
;
return
q
->
queues
[
q
->
prio2band
[
band
&
TC_PRIO_MAX
]];
return
q
->
queues
[
q
->
prio2band
[
band
&
TC_PRIO_MAX
]];
}
band
=
res
.
classid
;
}
band
=
TC_H_MIN
(
band
)
-
1
;
if
(
band
>
q
->
bands
)
band
=
q
->
prio2band
[
0
];
return
q
->
queues
[
q
->
prio2band
[
0
]
];
return
q
->
queues
[
band
];
}
...
...
@@ -111,16 +112,17 @@ prio_enqueue(struct sk_buff *skb, struct Qdisc* sch)
}
dropped:
#ifdef CONFIG_NET_CLS_ACT
if
(
ret
!=
TC_ACT_SHOT
&&
ret
!=
NET_XMIT_DROP
)
{
if
(
TC_ACT_SHOT
==
ret
||
NET_XMIT_DROP
==
ret
)
{
#endif
sch
->
stats
.
drops
++
;
return
NET_XMIT_DROP
;
#ifdef CONFIG_NET_CLS_ACT
}
else
{
sch
->
stats
.
overlimits
++
;
/* abuse, but noone uses it */
return
NET_XMIT_BYPASS
;
/* we dont want to confuse TCP */
}
#endif
sch
->
stats
.
drops
++
;
return
NET_XMIT_DROP
;
}
...
...
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