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
58db9501
Commit
58db9501
authored
Jun 14, 2003
by
Robert Olsson
Committed by
David S. Miller
Jun 14, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[IPV4]: Add rtcache hash lookup statistics to rtstat.
parent
b9c7862d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
include/net/route.h
include/net/route.h
+2
-0
net/ipv4/route.c
net/ipv4/route.c
+6
-2
No files found.
include/net/route.h
View file @
58db9501
...
@@ -102,6 +102,8 @@ struct rt_cache_stat
...
@@ -102,6 +102,8 @@ struct rt_cache_stat
unsigned
int
gc_ignored
;
unsigned
int
gc_ignored
;
unsigned
int
gc_goal_miss
;
unsigned
int
gc_goal_miss
;
unsigned
int
gc_dst_overflow
;
unsigned
int
gc_dst_overflow
;
unsigned
int
in_hlist_search
;
unsigned
int
out_hlist_search
;
};
};
extern
struct
rt_cache_stat
*
rt_cache_stat
;
extern
struct
rt_cache_stat
*
rt_cache_stat
;
...
...
net/ipv4/route.c
View file @
58db9501
...
@@ -321,7 +321,7 @@ static int rt_cache_stat_get_info(char *buffer, char **start, off_t offset, int
...
@@ -321,7 +321,7 @@ static int rt_cache_stat_get_info(char *buffer, char **start, off_t offset, int
for
(
i
=
0
;
i
<
NR_CPUS
;
i
++
)
{
for
(
i
=
0
;
i
<
NR_CPUS
;
i
++
)
{
if
(
!
cpu_possible
(
i
))
if
(
!
cpu_possible
(
i
))
continue
;
continue
;
len
+=
sprintf
(
buffer
+
len
,
"%08x %08x %08x %08x %08x %08x %08x %08x %08x %08x %08x %08x %08x %08x %08x
\n
"
,
len
+=
sprintf
(
buffer
+
len
,
"%08x %08x %08x %08x %08x %08x %08x %08x %08x %08x %08x %08x %08x %08x %08x
%08x %08x
\n
"
,
dst_entries
,
dst_entries
,
per_cpu_ptr
(
rt_cache_stat
,
i
)
->
in_hit
,
per_cpu_ptr
(
rt_cache_stat
,
i
)
->
in_hit
,
per_cpu_ptr
(
rt_cache_stat
,
i
)
->
in_slow_tot
,
per_cpu_ptr
(
rt_cache_stat
,
i
)
->
in_slow_tot
,
...
@@ -338,7 +338,9 @@ static int rt_cache_stat_get_info(char *buffer, char **start, off_t offset, int
...
@@ -338,7 +338,9 @@ static int rt_cache_stat_get_info(char *buffer, char **start, off_t offset, int
per_cpu_ptr
(
rt_cache_stat
,
i
)
->
gc_total
,
per_cpu_ptr
(
rt_cache_stat
,
i
)
->
gc_total
,
per_cpu_ptr
(
rt_cache_stat
,
i
)
->
gc_ignored
,
per_cpu_ptr
(
rt_cache_stat
,
i
)
->
gc_ignored
,
per_cpu_ptr
(
rt_cache_stat
,
i
)
->
gc_goal_miss
,
per_cpu_ptr
(
rt_cache_stat
,
i
)
->
gc_goal_miss
,
per_cpu_ptr
(
rt_cache_stat
,
i
)
->
gc_dst_overflow
per_cpu_ptr
(
rt_cache_stat
,
i
)
->
gc_dst_overflow
,
per_cpu_ptr
(
rt_cache_stat
,
i
)
->
in_hlist_search
,
per_cpu_ptr
(
rt_cache_stat
,
i
)
->
out_hlist_search
);
);
}
}
...
@@ -1786,6 +1788,7 @@ int ip_route_input(struct sk_buff *skb, u32 daddr, u32 saddr,
...
@@ -1786,6 +1788,7 @@ int ip_route_input(struct sk_buff *skb, u32 daddr, u32 saddr,
skb
->
dst
=
(
struct
dst_entry
*
)
rth
;
skb
->
dst
=
(
struct
dst_entry
*
)
rth
;
return
0
;
return
0
;
}
}
RT_CACHE_STAT_INC
(
in_hlist_search
);
}
}
rcu_read_unlock
();
rcu_read_unlock
();
...
@@ -2153,6 +2156,7 @@ int __ip_route_output_key(struct rtable **rp, const struct flowi *flp)
...
@@ -2153,6 +2156,7 @@ int __ip_route_output_key(struct rtable **rp, const struct flowi *flp)
*
rp
=
rth
;
*
rp
=
rth
;
return
0
;
return
0
;
}
}
RT_CACHE_STAT_INC
(
out_hlist_search
);
}
}
rcu_read_unlock
();
rcu_read_unlock
();
...
...
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