summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMartin KaFai Lau <kafai@fb.com>2015-05-22 20:56:06 -0700
committerDavid S. Miller <davem@davemloft.net>2015-05-25 13:25:35 -0400
commitd52d3997f843ffefaa8d8462790ffcaca6c74192 (patch)
treee7ad34bdd077c3af7d75acb6b6de7199c9672091 /include
parent83a09abd1a8badbbb715f928d07c65ac47709c47 (diff)
downloadlinux-d52d3997f843ffefaa8d8462790ffcaca6c74192.tar.bz2
ipv6: Create percpu rt6_info
After the patch 'ipv6: Only create RTF_CACHE routes after encountering pmtu exception', we need to compensate the performance hit (bouncing dst->__refcnt). Signed-off-by: Martin KaFai Lau <kafai@fb.com> Cc: Hannes Frederic Sowa <hannes@stressinduktion.org> Cc: Steffen Klassert <steffen.klassert@secunet.com> Cc: Julian Anastasov <ja@ssi.bg> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/ip6_fib.h3
-rw-r--r--include/uapi/linux/ipv6_route.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h
index cc8f03c10c43..3b76849c190f 100644
--- a/include/net/ip6_fib.h
+++ b/include/net/ip6_fib.h
@@ -124,6 +124,7 @@ struct rt6_info {
struct uncached_list *rt6i_uncached_list;
struct inet6_dev *rt6i_idev;
+ struct rt6_info * __percpu *rt6i_pcpu;
u32 rt6i_metric;
u32 rt6i_pmtu;
@@ -164,7 +165,7 @@ static inline void rt6_update_expires(struct rt6_info *rt0, int timeout)
static inline u32 rt6_get_cookie(const struct rt6_info *rt)
{
- if (unlikely(rt->dst.flags & DST_NOCACHE))
+ if (rt->rt6i_flags & RTF_PCPU || unlikely(rt->dst.flags & DST_NOCACHE))
rt = (struct rt6_info *)(rt->dst.from);
return rt->rt6i_node ? rt->rt6i_node->fn_sernum : 0;
diff --git a/include/uapi/linux/ipv6_route.h b/include/uapi/linux/ipv6_route.h
index 2be7bd174751..f6598d1c886e 100644
--- a/include/uapi/linux/ipv6_route.h
+++ b/include/uapi/linux/ipv6_route.h
@@ -34,6 +34,7 @@
#define RTF_PREF(pref) ((pref) << 27)
#define RTF_PREF_MASK 0x18000000
+#define RTF_PCPU 0x40000000
#define RTF_LOCAL 0x80000000