diff options
| author | David S. Miller <davem@davemloft.net> | 2014-10-07 08:02:49 +0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2014-10-07 08:02:49 +0400 |
| commit | 6093f7570e5995177b5879cb3ddbc4d50177aec2 (patch) | |
| tree | 586acd1e34fa9855cbe336ea70f987bc62e08dc8 /include | |
| parent | 1ff0dc9499b25d016777f9b8d3ee486fd588ba59 (diff) | |
| parent | 327571cb100cad587c9eda351e7a2d182466873b (diff) | |
| download | linux-6093f7570e5995177b5879cb3ddbc4d50177aec2.tar.xz | |
Merge branch 'ipv6-next'
Hannes Frederic Sowa says:
====================
ipv6: cleanup after rt6_genid removal
Leftover patches after rt6_genid removal after 705f1c869d577c ("ipv6:
remove rt6i_genid").
Major two changes are:
* keep fib6_sernum per namespace to reduce number of flushes in case
system has high number of namespaces
* make fn_sernum updates cheaper
v2: Incorporated feedback from Cong Wang, thanks a lot!
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/ip6_fib.h | 20 | ||||
| -rw-r--r-- | include/net/netns/ipv6.h | 2 |
2 files changed, 16 insertions, 6 deletions
diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h index cf485f9aa563..8eea35d32a75 100644 --- a/include/net/ip6_fib.h +++ b/include/net/ip6_fib.h @@ -64,7 +64,7 @@ struct fib6_node { __u16 fn_bit; /* bit key */ __u16 fn_flags; - __u32 fn_sernum; + int fn_sernum; struct rt6_info *rr_ptr; }; @@ -202,15 +202,25 @@ static inline void ip6_rt_put(struct rt6_info *rt) dst_release(&rt->dst); } -struct fib6_walker_t { +enum fib6_walk_state { +#ifdef CONFIG_IPV6_SUBTREES + FWS_S, +#endif + FWS_L, + FWS_R, + FWS_C, + FWS_U +}; + +struct fib6_walker { struct list_head lh; struct fib6_node *root, *node; struct rt6_info *leaf; - unsigned char state; - unsigned char prune; + enum fib6_walk_state state; + bool prune; unsigned int skip; unsigned int count; - int (*func)(struct fib6_walker_t *); + int (*func)(struct fib6_walker *); void *args; }; diff --git a/include/net/netns/ipv6.h b/include/net/netns/ipv6.h index eade27adecf3..69ae41f2098c 100644 --- a/include/net/netns/ipv6.h +++ b/include/net/netns/ipv6.h @@ -76,7 +76,7 @@ struct netns_ipv6 { #endif #endif atomic_t dev_addr_genid; - atomic_t rt_genid; + atomic_t fib6_sernum; }; #if IS_ENABLED(CONFIG_NF_DEFRAG_IPV6) |
