diff options
author | Tom Herbert <therbert@google.com> | 2014-01-02 14:48:26 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-01-03 19:38:45 -0500 |
commit | 7d442fab0a6777fd7612cfcada32ea859553d370 (patch) | |
tree | 3d5282fdd3007f33565e482e2dffbdd55dab7703 /include/net/ip_tunnels.h | |
parent | f916ec9608af017dda3e0fa7b5c6a344fc05285e (diff) |
ipv4: Cache dst in tunnels
Avoid doing a route lookup on every packet being tunneled.
In ip_tunnel.c cache the route returned from ip_route_output if
the tunnel is "connected" so that all the rouitng parameters are
taken from tunnel parms for a packet. Specifically, not NBMA tunnel
and tos is from tunnel parms (not inner packet).
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 | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/ip_tunnels.h b/include/net/ip_tunnels.h index 732f8c6ae975..bde50fc5b4f0 100644 --- a/include/net/ip_tunnels.h +++ b/include/net/ip_tunnels.h | |||
@@ -54,6 +54,9 @@ struct ip_tunnel { | |||
54 | int hlen; /* Precalculated header length */ | 54 | int hlen; /* Precalculated header length */ |
55 | int mlink; | 55 | int mlink; |
56 | 56 | ||
57 | struct dst_entry __rcu *dst_cache; | ||
58 | spinlock_t dst_lock; | ||
59 | |||
57 | struct ip_tunnel_parm parms; | 60 | struct ip_tunnel_parm parms; |
58 | 61 | ||
59 | /* for SIT */ | 62 | /* for SIT */ |