diff options
| author | Tom Herbert <therbert@google.com> | 2014-01-02 14:48:33 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2014-01-03 19:40:57 -0500 |
| commit | 9a4aa9af447f784f0a47313c8dcb79ac63442cf7 (patch) | |
| tree | e5e6d38f79704d282679a06d6bf00cf819a85d7a /include/net/ip_tunnels.h | |
| parent | 7d442fab0a6777fd7612cfcada32ea859553d370 (diff) | |
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/ip_tunnels.h')
| -rw-r--r-- | include/net/ip_tunnels.h | 8 |
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 { | |||
| 38 | struct rcu_head rcu_head; | 38 | struct rcu_head rcu_head; |
| 39 | }; | 39 | }; |
| 40 | 40 | ||
| 41 | struct ip_tunnel_dst { | ||
| 42 | struct dst_entry __rcu *dst; | ||
| 43 | spinlock_t lock; | ||
| 44 | }; | ||
| 45 | |||
| 41 | struct ip_tunnel { | 46 | struct ip_tunnel { |
| 42 | struct ip_tunnel __rcu *next; | 47 | struct ip_tunnel __rcu *next; |
| 43 | struct hlist_node hash_node; | 48 | struct hlist_node hash_node; |
| @@ -54,8 +59,7 @@ struct ip_tunnel { | |||
| 54 | int hlen; /* Precalculated header length */ | 59 | int hlen; /* Precalculated header length */ |
| 55 | int mlink; | 60 | int mlink; |
| 56 | 61 | ||
| 57 | struct dst_entry __rcu *dst_cache; | 62 | struct ip_tunnel_dst __percpu *dst_cache; |
| 58 | spinlock_t dst_lock; | ||
| 59 | 63 | ||
| 60 | struct ip_tunnel_parm parms; | 64 | struct ip_tunnel_parm parms; |
| 61 | 65 | ||
