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
nexedi
linux
Commits
55bea115
Commit
55bea115
authored
Sep 15, 2003
by
Jamal Hadi Salim
Committed by
David S. Miller
Sep 15, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NET]: Make pfifo_fast actually report statistics.
parent
98921832
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
1 deletion
+25
-1
net/sched/sch_generic.c
net/sched/sch_generic.c
+25
-1
No files found.
net/sched/sch_generic.c
View file @
55bea115
...
...
@@ -7,7 +7,7 @@
* 2 of the License, or (at your option) any later version.
*
* Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
* Jamal Hadi Salim, <hadi@
nortelnetworks.com
> 990601
* Jamal Hadi Salim, <hadi@
cyberus.ca
> 990601
* - Ingress support
*/
...
...
@@ -278,6 +278,8 @@ pfifo_fast_enqueue(struct sk_buff *skb, struct Qdisc* qdisc)
if
(
list
->
qlen
<=
qdisc
->
dev
->
tx_queue_len
)
{
__skb_queue_tail
(
list
,
skb
);
qdisc
->
q
.
qlen
++
;
qdisc
->
stats
.
bytes
+=
skb
->
len
;
qdisc
->
stats
.
packets
++
;
return
0
;
}
qdisc
->
stats
.
drops
++
;
...
...
@@ -326,6 +328,21 @@ pfifo_fast_reset(struct Qdisc* qdisc)
qdisc
->
q
.
qlen
=
0
;
}
static
int
pfifo_fast_dump
(
struct
Qdisc
*
qdisc
,
struct
sk_buff
*
skb
)
{
unsigned
char
*
b
=
skb
->
tail
;
struct
tc_prio_qopt
opt
;
opt
.
bands
=
3
;
memcpy
(
&
opt
.
priomap
,
prio2band
,
TC_PRIO_MAX
+
1
);
RTA_PUT
(
skb
,
TCA_OPTIONS
,
sizeof
(
opt
),
&
opt
);
return
skb
->
len
;
rtattr_failure:
skb_trim
(
skb
,
b
-
skb
->
data
);
return
-
1
;
}
static
int
pfifo_fast_init
(
struct
Qdisc
*
qdisc
,
struct
rtattr
*
opt
)
{
int
i
;
...
...
@@ -349,6 +366,7 @@ static struct Qdisc_ops pfifo_fast_ops = {
.
requeue
=
pfifo_fast_requeue
,
.
init
=
pfifo_fast_init
,
.
reset
=
pfifo_fast_reset
,
.
dump
=
pfifo_fast_dump
,
.
owner
=
THIS_MODULE
,
};
...
...
@@ -438,6 +456,12 @@ void dev_activate(struct net_device *dev)
printk
(
KERN_INFO
"%s: activation failed
\n
"
,
dev
->
name
);
return
;
}
write_lock
(
&
qdisc_tree_lock
);
qdisc
->
next
=
dev
->
qdisc_list
;
dev
->
qdisc_list
=
qdisc
;
write_unlock
(
&
qdisc_tree_lock
);
}
else
{
qdisc
=
&
noqueue_qdisc
;
}
...
...
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