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
18e9e312
Commit
18e9e312
authored
Sep 11, 2003
by
Stephen Hemminger
Committed by
Hideaki Yoshifuji
Sep 11, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NET]: Convert packet scheduler API to seq_file.
parent
95cf467f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
18 deletions
+17
-18
net/sched/sch_api.c
net/sched/sch_api.c
+17
-18
No files found.
net/sched/sch_api.c
View file @
18e9e312
...
@@ -32,6 +32,7 @@
...
@@ -32,6 +32,7 @@
#include <linux/rtnetlink.h>
#include <linux/rtnetlink.h>
#include <linux/init.h>
#include <linux/init.h>
#include <linux/proc_fs.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/kmod.h>
#include <linux/kmod.h>
#include <net/sock.h>
#include <net/sock.h>
...
@@ -1059,27 +1060,27 @@ int psched_us_per_tick = 1;
...
@@ -1059,27 +1060,27 @@ int psched_us_per_tick = 1;
int
psched_tick_per_us
=
1
;
int
psched_tick_per_us
=
1
;
#ifdef CONFIG_PROC_FS
#ifdef CONFIG_PROC_FS
static
int
psched_read_proc
(
char
*
buffer
,
char
**
start
,
off_t
offset
,
static
int
psched_show
(
struct
seq_file
*
seq
,
void
*
v
)
int
length
,
int
*
eof
,
void
*
data
)
{
{
int
len
;
seq_printf
(
seq
,
"%08x %08x %08x %08x
\n
"
,
len
=
sprintf
(
buffer
,
"%08x %08x %08x %08x
\n
"
,
psched_tick_per_us
,
psched_us_per_tick
,
psched_tick_per_us
,
psched_us_per_tick
,
1000000
,
HZ
);
1000000
,
HZ
);
len
-=
offset
;
return
0
;
}
if
(
len
>
length
)
len
=
length
;
if
(
len
<
0
)
len
=
0
;
*
start
=
buffer
+
offset
;
*
eof
=
1
;
return
len
;
static
int
psched_open
(
struct
inode
*
inode
,
struct
file
*
file
)
{
return
single_open
(
file
,
psched_show
,
PDE
(
inode
)
->
data
);
}
}
static
struct
file_operations
psched_fops
=
{
.
owner
=
THIS_MODULE
,
.
open
=
psched_open
,
.
read
=
seq_read
,
.
llseek
=
seq_lseek
,
.
release
=
single_release
,
};
#endif
#endif
#if PSCHED_CLOCK_SOURCE == PSCHED_GETTIMEOFDAY
#if PSCHED_CLOCK_SOURCE == PSCHED_GETTIMEOFDAY
...
@@ -1250,9 +1251,7 @@ int __init pktsched_init(void)
...
@@ -1250,9 +1251,7 @@ int __init pktsched_init(void)
tc_filter_init
();
tc_filter_init
();
#endif
#endif
#ifdef CONFIG_PROC_FS
proc_net_fops_create
(
"psched"
,
0
,
&
psched_fops
);
create_proc_read_entry
(
"net/psched"
,
0
,
0
,
psched_read_proc
,
NULL
);
#endif
return
0
;
return
0
;
}
}
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