summaryrefslogtreecommitdiffstats
path: root/include/net/ip6_tunnel.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2015-10-01 16:14:24 +0200
committerThomas Gleixner <tglx@linutronix.de>2015-10-01 16:14:24 +0200
commitbebcb8dab6bac53b6a61a896db03781d1992cadb (patch)
tree4793b0c2e913db8cf573ee52d568471603273af6 /include/net/ip6_tunnel.h
parentirqchip/renesas-intc-irqpin: r8a7778 IRLM setup support (diff)
parentgenirq: Introduce generic irq migration for cpu hotunplug (diff)
downloadlinux-bebcb8dab6bac53b6a61a896db03781d1992cadb.tar.xz
linux-bebcb8dab6bac53b6a61a896db03781d1992cadb.zip
Merge branch 'irq/for-arm' into irq/core
Bring in the change which we offered arm[64] folks to pull into their trees.
Diffstat (limited to 'include/net/ip6_tunnel.h')
-rw-r--r--include/net/ip6_tunnel.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/include/net/ip6_tunnel.h b/include/net/ip6_tunnel.h
index b8529aa1dae7..fa915fa0f703 100644
--- a/include/net/ip6_tunnel.h
+++ b/include/net/ip6_tunnel.h
@@ -32,6 +32,12 @@ struct __ip6_tnl_parm {
__be32 o_key;
};
+struct ip6_tnl_dst {
+ seqlock_t lock;
+ struct dst_entry __rcu *dst;
+ u32 cookie;
+};
+
/* IPv6 tunnel */
struct ip6_tnl {
struct ip6_tnl __rcu *next; /* next tunnel in list */
@@ -39,8 +45,7 @@ struct ip6_tnl {
struct net *net; /* netns for packet i/o */
struct __ip6_tnl_parm parms; /* tunnel configuration parameters */
struct flowi fl; /* flowi template for xmit */
- struct dst_entry *dst_cache; /* cached dst */
- u32 dst_cookie;
+ struct ip6_tnl_dst __percpu *dst_cache; /* cached dst */
int err_count;
unsigned long err_time;
@@ -60,9 +65,11 @@ struct ipv6_tlv_tnl_enc_lim {
__u8 encap_limit; /* tunnel encapsulation limit */
} __packed;
-struct dst_entry *ip6_tnl_dst_check(struct ip6_tnl *t);
+struct dst_entry *ip6_tnl_dst_get(struct ip6_tnl *t);
+int ip6_tnl_dst_init(struct ip6_tnl *t);
+void ip6_tnl_dst_destroy(struct ip6_tnl *t);
void ip6_tnl_dst_reset(struct ip6_tnl *t);
-void ip6_tnl_dst_store(struct ip6_tnl *t, struct dst_entry *dst);
+void ip6_tnl_dst_set(struct ip6_tnl *t, struct dst_entry *dst);
int ip6_tnl_rcv_ctl(struct ip6_tnl *t, const struct in6_addr *laddr,
const struct in6_addr *raddr);
int ip6_tnl_xmit_ctl(struct ip6_tnl *t, const struct in6_addr *laddr,
@@ -79,7 +86,7 @@ static inline void ip6tunnel_xmit(struct sock *sk, struct sk_buff *skb,
struct net_device_stats *stats = &dev->stats;
int pkt_len, err;
- pkt_len = skb->len;
+ pkt_len = skb->len - skb_inner_network_offset(skb);
err = ip6_local_out_sk(sk, skb);
if (net_xmit_eval(err) == 0) {