# This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/09/28 20:49:52-07:00 davem@nuts.davemloft.net # [IPV4]: Define fib_alias in new header fib_lookup.h # # Also s/FN_S_ACCESSED/FA_S_ACCESSED/ # # Signed-off-by: David S. Miller # # net/ipv4/fib_hash.c # 2004/09/28 20:49:13-07:00 davem@nuts.davemloft.net +7 -16 # [IPV4]: Define fib_alias in new header fib_lookup.h # # net/ipv4/fib_lookup.h # 2004/09/28 20:49:07-07:00 davem@nuts.davemloft.net +19 -0 # [IPV4]: Define fib_alias in new header fib_lookup.h # # net/ipv4/fib_lookup.h # 2004/09/28 20:49:07-07:00 davem@nuts.davemloft.net +0 -0 # BitKeeper file /disk1/BK/net-2.6/net/ipv4/fib_lookup.h # diff -Nru a/net/ipv4/fib_hash.c b/net/ipv4/fib_hash.c --- a/net/ipv4/fib_hash.c 2004-09-28 21:24:46 -07:00 +++ b/net/ipv4/fib_hash.c 2004-09-28 21:24:46 -07:00 @@ -43,6 +43,8 @@ #include #include +#include "fib_lookup.h" + static kmem_cache_t *fn_hash_kmem; static kmem_cache_t *fn_alias_kmem; @@ -52,17 +54,6 @@ u32 fn_key; }; -struct fib_alias { - struct list_head fa_list; - struct fib_info *fa_info; - u8 fa_tos; - u8 fa_type; - u8 fa_scope; - u8 fa_state; -}; - -#define FN_S_ACCESSED 1 - struct fn_zone { struct fn_zone *fz_next; /* Next not empty zone */ struct hlist_head *fz_hash; /* Hash table pointer */ @@ -277,7 +268,7 @@ if (fa->fa_scope < flp->fl4_scope) continue; - fa->fa_state |= FN_S_ACCESSED; + fa->fa_state |= FA_S_ACCESSED; err = fib_semantic_match(fa->fa_type, fa->fa_info, @@ -358,7 +349,7 @@ if (!next_fi->fib_nh[0].nh_gw || next_fi->fib_nh[0].nh_scope != RT_SCOPE_LINK) continue; - fa->fa_state |= FN_S_ACCESSED; + fa->fa_state |= FA_S_ACCESSED; if (fi == NULL) { if (next_fi != res->fi) @@ -521,11 +512,11 @@ fa->fa_type = type; fa->fa_scope = r->rtm_scope; state = fa->fa_state; - fa->fa_state &= ~FN_S_ACCESSED; + fa->fa_state &= ~FA_S_ACCESSED; write_unlock_bh(&fib_hash_lock); fib_release_info(fi_drop); - if (state & FN_S_ACCESSED) + if (state & FA_S_ACCESSED) rt_cache_flush(-1); return 0; } @@ -669,7 +660,7 @@ } write_unlock_bh(&fib_hash_lock); - if (fa->fa_state & FN_S_ACCESSED) + if (fa->fa_state & FA_S_ACCESSED) rt_cache_flush(-1); fn_free_alias(fa); if (kill_fn) { diff -Nru a/net/ipv4/fib_lookup.h b/net/ipv4/fib_lookup.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/net/ipv4/fib_lookup.h 2004-09-28 21:24:46 -07:00 @@ -0,0 +1,19 @@ +#ifndef _FIB_LOOKUP_H +#define _FIB_LOOKUP_H + +#include +#include +#include + +struct fib_alias { + struct list_head fa_list; + struct fib_info *fa_info; + u8 fa_tos; + u8 fa_type; + u8 fa_scope; + u8 fa_state; +}; + +#define FA_S_ACCESSED 0x01 + +#endif /* _FIB_LOOKUP_H */