summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorTom Herbert <therbert@google.com>2014-01-02 23:48:33 +0400
committerDavid S. Miller <davem@davemloft.net>2014-01-04 04:40:57 +0400
commit9a4aa9af447f784f0a47313c8dcb79ac63442cf7 (patch)
treee5e6d38f79704d282679a06d6bf00cf819a85d7a /include/net
parent7d442fab0a6777fd7612cfcada32ea859553d370 (diff)
downloadlinux-9a4aa9af447f784f0a47313c8dcb79ac63442cf7.tar.xz
ipv4: Use percpu Cache route in IP tunnels
percpu route cache eliminates share of dst refcnt between CPUs. Signed-off-by: Tom Herbert <therbert@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/ip_tunnels.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/net/ip_tunnels.h b/include/net/ip_tunnels.h
index bde50fc5b4f0..9e25b1bc31da 100644
--- a/include/net/ip_tunnels.h
+++ b/include/net/ip_tunnels.h
@@ -38,6 +38,11 @@ struct ip_tunnel_prl_entry {
struct rcu_head rcu_head;
};
+struct ip_tunnel_dst {
+ struct dst_entry __rcu *dst;
+ spinlock_t lock;
+};
+
struct ip_tunnel {
struct ip_tunnel __rcu *next;
struct hlist_node hash_node;
@@ -54,8 +59,7 @@ struct ip_tunnel {
int hlen; /* Precalculated header length */
int mlink;
- struct dst_entry __rcu *dst_cache;
- spinlock_t dst_lock;
+ struct ip_tunnel_dst __percpu *dst_cache;
struct ip_tunnel_parm parms;