diff options
author | Sachin Saxena <sachin.saxena@freescale.com> | 2013-03-04 10:24:19 (GMT) |
---|---|---|
committer | Fleming Andrew-AFLEMING <AFLEMING@freescale.com> | 2013-04-03 21:28:15 (GMT) |
commit | b5a03e1244be91b05209d4a53973393f021dd999 (patch) | |
tree | a64a1975ef7ebd6412cb34ab44258970dea30331 /net/ipv4 | |
parent | 9cbcdc5041a6bee7959865bdfd31c807662d1d0e (diff) | |
download | linux-fsl-qoriq-b5a03e1244be91b05209d4a53973393f021dd999.tar.xz |
net/ipv4: IPv4 Route Flush callback added.
Signed-off-by: Sachin Saxena <sachin.saxena@freescale.com>
Change-Id: Ia9cc025e36b67beedad57f7fff5a4846be39ad10
Reviewed-on: http://git.am.freescale.net:8181/875
Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/route.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index a0fcc47..63354f5 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -199,6 +199,10 @@ const __u8 ip_tos2prio[16] = { }; EXPORT_SYMBOL(ip_tos2prio); +#ifdef CONFIG_AS_FASTPATH +static route_flush_hook *route_flush_fn; +#endif + static DEFINE_PER_CPU(struct rt_cache_stat, rt_cache_stat); #define RT_CACHE_STAT_INC(field) __this_cpu_inc(rt_cache_stat.field) @@ -445,6 +449,10 @@ static inline bool rt_is_expired(const struct rtable *rth) void rt_cache_flush(struct net *net) { rt_genid_bump(net); +#ifdef CONFIG_AS_FASTPATH + if (route_flush_fn) + route_flush_fn(); +#endif } static struct neighbour *ipv4_neigh_lookup(const struct dst_entry *dst, @@ -2111,6 +2119,14 @@ out: } EXPORT_SYMBOL_GPL(__ip_route_output_key); +#ifdef CONFIG_AS_FASTPATH +void route_hook_fn_register(route_flush_hook *flush) +{ + route_flush_fn = flush; +} +EXPORT_SYMBOL(route_hook_fn_register); +#endif + static struct dst_entry *ipv4_blackhole_dst_check(struct dst_entry *dst, u32 cookie) { return NULL; |