aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/ipip.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/ipip.h')
-rw-r--r--include/net/ipip.h25
1 files changed, 18 insertions, 7 deletions
diff --git a/include/net/ipip.h b/include/net/ipip.h
index 87acf8f3a155..11e8513d2d07 100644
--- a/include/net/ipip.h
+++ b/include/net/ipip.h
@@ -7,8 +7,15 @@
7/* Keep error state on tunnel for 30 sec */ 7/* Keep error state on tunnel for 30 sec */
8#define IPTUNNEL_ERR_TIMEO (30*HZ) 8#define IPTUNNEL_ERR_TIMEO (30*HZ)
9 9
10struct ip_tunnel 10/* 6rd prefix/relay information */
11{ 11struct ip_tunnel_6rd_parm {
12 struct in6_addr prefix;
13 __be32 relay_prefix;
14 u16 prefixlen;
15 u16 relay_prefixlen;
16};
17
18struct ip_tunnel {
12 struct ip_tunnel *next; 19 struct ip_tunnel *next;
13 struct net_device *dev; 20 struct net_device *dev;
14 21
@@ -23,15 +30,19 @@ struct ip_tunnel
23 30
24 struct ip_tunnel_parm parms; 31 struct ip_tunnel_parm parms;
25 32
33 /* for SIT */
34#ifdef CONFIG_IPV6_SIT_6RD
35 struct ip_tunnel_6rd_parm ip6rd;
36#endif
26 struct ip_tunnel_prl_entry *prl; /* potential router list */ 37 struct ip_tunnel_prl_entry *prl; /* potential router list */
27 unsigned int prl_count; /* # of entries in PRL */ 38 unsigned int prl_count; /* # of entries in PRL */
28}; 39};
29 40
30struct ip_tunnel_prl_entry 41struct ip_tunnel_prl_entry {
31{
32 struct ip_tunnel_prl_entry *next; 42 struct ip_tunnel_prl_entry *next;
33 __be32 addr; 43 __be32 addr;
34 u16 flags; 44 u16 flags;
45 struct rcu_head rcu_head;
35}; 46};
36 47
37#define IPTUNNEL_XMIT() do { \ 48#define IPTUNNEL_XMIT() do { \
@@ -42,9 +53,9 @@ struct ip_tunnel_prl_entry
42 ip_select_ident(iph, &rt->u.dst, NULL); \ 53 ip_select_ident(iph, &rt->u.dst, NULL); \
43 \ 54 \
44 err = ip_local_out(skb); \ 55 err = ip_local_out(skb); \
45 if (net_xmit_eval(err) == 0) { \ 56 if (likely(net_xmit_eval(err) == 0)) { \
46 stats->tx_bytes += pkt_len; \ 57 txq->tx_bytes += pkt_len; \
47 stats->tx_packets++; \ 58 txq->tx_packets++; \
48 } else { \ 59 } else { \
49 stats->tx_errors++; \ 60 stats->tx_errors++; \
50 stats->tx_aborted_errors++; \ 61 stats->tx_aborted_errors++; \