ipv6: prepare fib6_age() for exception table
If all dst cache entries are stored in the exception table under the main route, we have to go through them during fib6_age() when doing garbage collecting. Introduce a new function rt6_age_exception() which goes through all dst entries in the exception table and remove those entries that are expired. This function is called in fib6_age() so that all dst caches are also garbage collected. Signed-off-by: Wei Wang <weiwan@google.com> Signed-off-by: Martin KaFai Lau <kafai@fb.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
b16cb459d7
commit
c757faa8bf
@@ -29,6 +29,14 @@
|
||||
#define FIB6_TABLE_HASHSZ 1
|
||||
#endif
|
||||
|
||||
#define RT6_DEBUG 2
|
||||
|
||||
#if RT6_DEBUG >= 3
|
||||
#define RT6_TRACE(x...) pr_debug(x)
|
||||
#else
|
||||
#define RT6_TRACE(x...) do { ; } while (0)
|
||||
#endif
|
||||
|
||||
struct rt6_info;
|
||||
|
||||
struct fib6_config {
|
||||
@@ -75,6 +83,11 @@ struct fib6_node {
|
||||
struct rcu_head rcu;
|
||||
};
|
||||
|
||||
struct fib6_gc_args {
|
||||
int timeout;
|
||||
int more;
|
||||
};
|
||||
|
||||
#ifndef CONFIG_IPV6_SUBTREES
|
||||
#define FIB6_SUBTREE(fn) NULL
|
||||
#else
|
||||
|
||||
@@ -97,6 +97,8 @@ int ip6_del_rt(struct rt6_info *);
|
||||
|
||||
void rt6_flush_exceptions(struct rt6_info *rt);
|
||||
int rt6_remove_exception_rt(struct rt6_info *rt);
|
||||
void rt6_age_exceptions(struct rt6_info *rt, struct fib6_gc_args *gc_args,
|
||||
unsigned long now);
|
||||
|
||||
static inline int ip6_route_get_saddr(struct net *net, struct rt6_info *rt,
|
||||
const struct in6_addr *daddr,
|
||||
|
||||
Reference in New Issue
Block a user