summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-01-03 19:41:39 -0500
committerDavid S. Miller <davem@davemloft.net>2014-01-03 19:41:39 -0500
commite9bf3b075384b3b400ab4689a2014860704164b7 (patch)
treee5e6d38f79704d282679a06d6bf00cf819a85d7a /include
parentf916ec9608af017dda3e0fa7b5c6a344fc05285e (diff)
parent9a4aa9af447f784f0a47313c8dcb79ac63442cf7 (diff)
Merge branch 'tunnel_dst_caching'
Tom Herbert says: ==================== ipv4: Cache dst in tunnels Version 3 of caching routes in tunnels. Addressed some comments from Eric in this series. There are two patches (variants) in the series: 1) One dst cached for each tunnel. 2) Percpu dst cache per tunnel to avoid false sharing Testing with GRE tunnels on a 32 CPU host with bnx2x (RSS support for GRE) shows a modest improvement in CPU utilization with these patches running 200 TCP_RR netperf clients. Without patches 71.22% CPU utilization 138/180/244 90/95/99% latencies 1.30465e+06 CPU/tps 18318 CPU/tps With patches 69.84% 142/186/249 90/95/99% latencies 1.30827e+06 18732 CPU/tps ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/ip_tunnels.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/net/ip_tunnels.h b/include/net/ip_tunnels.h
index 732f8c6ae975..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,6 +59,8 @@ struct ip_tunnel {
int hlen; /* Precalculated header length */
int mlink;
+ struct ip_tunnel_dst __percpu *dst_cache;
+
struct ip_tunnel_parm parms;
/* for SIT */