Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 215401
b: refs/heads/master
c: 9b0c290
h: refs/heads/master
i:
  215399: cf6c639
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Oct 21, 2010
1 parent cc1c357 commit 132f002
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7b5edbc4cfe2297b0915adea5aa1eafcafadbf06
refs/heads/master: 9b0c290e78d667e6a483bde8c7cef7dd15f49017
3 changes: 2 additions & 1 deletion trunk/net/ipv4/fib_hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,8 @@ void fib_table_select_default(struct fib_table *tb,
if (!next_fi->fib_nh[0].nh_gw ||
next_fi->fib_nh[0].nh_scope != RT_SCOPE_LINK)
continue;
fa->fa_state |= FA_S_ACCESSED;

fib_alias_accessed(fa);

if (fi == NULL) {
if (next_fi != res->fi)
Expand Down
7 changes: 7 additions & 0 deletions trunk/net/ipv4/fib_lookup.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ struct fib_alias {

#define FA_S_ACCESSED 0x01

/* Dont write on fa_state unless needed, to keep it shared on all cpus */
static inline void fib_alias_accessed(struct fib_alias *fa)
{
if (!(fa->fa_state & FA_S_ACCESSED))
fa->fa_state |= FA_S_ACCESSED;
}

/* Exported by fib_semantics.c */
extern int fib_semantic_match(struct list_head *head,
const struct flowi *flp,
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ipv4/fib_semantics.c
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,7 @@ int fib_semantic_match(struct list_head *head, const struct flowi *flp,
if (fa->fa_scope < flp->fl4_scope)
continue;

fa->fa_state |= FA_S_ACCESSED;
fib_alias_accessed(fa);

err = fib_props[fa->fa_type].error;
if (err == 0) {
Expand Down
3 changes: 2 additions & 1 deletion trunk/net/ipv4/fib_trie.c
Original file line number Diff line number Diff line change
Expand Up @@ -1838,7 +1838,8 @@ void fib_table_select_default(struct fib_table *tb,
if (!next_fi->fib_nh[0].nh_gw ||
next_fi->fib_nh[0].nh_scope != RT_SCOPE_LINK)
continue;
fa->fa_state |= FA_S_ACCESSED;

fib_alias_accessed(fa);

if (fi == NULL) {
if (next_fi != res->fi)
Expand Down

0 comments on commit 132f002

Please sign in to comment.