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
24bc83a5
Commit
24bc83a5
authored
Aug 15, 2003
by
Alexey Kuznetsov
Committed by
Stephen Hemminger
Aug 15, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[IPV4]: Fix rt_score() and usage when purging rtcache hash chains.
parent
6e2920d0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
net/ipv4/route.c
net/ipv4/route.c
+4
-3
No files found.
net/ipv4/route.c
View file @
24bc83a5
...
...
@@ -463,7 +463,9 @@ out: return ret;
*/
static
inline
u32
rt_score
(
struct
rtable
*
rt
)
{
u32
score
=
rt
->
u
.
dst
.
__use
;
u32
score
=
jiffies
-
rt
->
u
.
dst
.
lastuse
;
score
=
~
score
&
~
(
3
<<
30
);
if
(
rt_valuable
(
rt
))
score
|=
(
1
<<
31
);
...
...
@@ -805,8 +807,7 @@ static int rt_intern_hash(unsigned hash, struct rtable *rt, struct rtable **rp)
* The second limit is less certain. At the moment it allows
* only 2 entries per bucket. We will see.
*/
if
(
chain_length
>
ip_rt_gc_elasticity
||
(
chain_length
>
1
&&
!
(
min_score
&
(
1
<<
31
))))
{
if
(
chain_length
>
ip_rt_gc_elasticity
)
{
*
candp
=
cand
->
u
.
rt_next
;
rt_free
(
cand
);
}
...
...
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