diff options
author | Daniel Lezcano <dlezcano@fr.ibm.com> | 2008-03-04 08:28:58 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-03-04 08:28:58 +0100 |
commit | 5b7c931dff03621ae7ac524c4fa280d4e5f187a4 (patch) | |
tree | 9b3eda8e34816c0ac45cff8ce73d19f6bd11b4dd /include/net/ip6_fib.h | |
parent | [NETNS][IPV6] ip6_fib - fib6_clean_all handle several network namespaces (diff) | |
download | linux-5b7c931dff03621ae7ac524c4fa280d4e5f187a4.tar.xz linux-5b7c931dff03621ae7ac524c4fa280d4e5f187a4.zip |
[NETNS][IPV6] ip6_fib - add net to gc timer parameter
The fib tables are now relative to the network namespace. When the
garbage collector timer expires, we must have a network namespace
parameter in order to retrieve the tables. For now this is the
init_net, but we should be able to have a timer per namespace and use
the timer callback parameter to pass the network namespace from the
expired timer.
The timer callback, fib6_run_gc, is actually used to be called
synchronously by some functions and asynchronously when the timer
expires.
When the timer expires, the delay specified for fib6_run_gc parameter
is always zero. So, I changed fib6_run_gc to not be a timer callback
but a function called by the timer callback and I added a timer
callback where its work is just to retrieve from the data arg of the
timer the network namespace and call fib6_run_gc with zero expiring
time and the network namespace parameters. That makes the code cleaner
for the fib6_run_gc callers.
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/ip6_fib.h')
-rw-r--r-- | include/net/ip6_fib.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h index e54075d902db..fae267f65341 100644 --- a/include/net/ip6_fib.h +++ b/include/net/ip6_fib.h @@ -209,7 +209,8 @@ extern int fib6_del(struct rt6_info *rt, extern void inet6_rt_notify(int event, struct rt6_info *rt, struct nl_info *info); -extern void fib6_run_gc(unsigned long dummy); +extern void fib6_run_gc(unsigned long expires, + struct net *net); extern void fib6_gc_cleanup(void); |