diff options
Diffstat (limited to 'include/net/ipip.h')
| -rw-r--r-- | include/net/ipip.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/include/net/ipip.h b/include/net/ipip.h index 65caea8b414f..a32654d52730 100644 --- a/include/net/ipip.h +++ b/include/net/ipip.h | |||
| @@ -16,7 +16,7 @@ struct ip_tunnel_6rd_parm { | |||
| 16 | }; | 16 | }; |
| 17 | 17 | ||
| 18 | struct ip_tunnel { | 18 | struct ip_tunnel { |
| 19 | struct ip_tunnel *next; | 19 | struct ip_tunnel __rcu *next; |
| 20 | struct net_device *dev; | 20 | struct net_device *dev; |
| 21 | 21 | ||
| 22 | int err_count; /* Number of arrived ICMP errors */ | 22 | int err_count; /* Number of arrived ICMP errors */ |
| @@ -34,18 +34,18 @@ struct ip_tunnel { | |||
| 34 | #ifdef CONFIG_IPV6_SIT_6RD | 34 | #ifdef CONFIG_IPV6_SIT_6RD |
| 35 | struct ip_tunnel_6rd_parm ip6rd; | 35 | struct ip_tunnel_6rd_parm ip6rd; |
| 36 | #endif | 36 | #endif |
| 37 | struct ip_tunnel_prl_entry *prl; /* potential router list */ | 37 | struct ip_tunnel_prl_entry __rcu *prl; /* potential router list */ |
| 38 | unsigned int prl_count; /* # of entries in PRL */ | 38 | unsigned int prl_count; /* # of entries in PRL */ |
| 39 | }; | 39 | }; |
| 40 | 40 | ||
| 41 | struct ip_tunnel_prl_entry { | 41 | struct ip_tunnel_prl_entry { |
| 42 | struct ip_tunnel_prl_entry *next; | 42 | struct ip_tunnel_prl_entry __rcu *next; |
| 43 | __be32 addr; | 43 | __be32 addr; |
| 44 | u16 flags; | 44 | u16 flags; |
| 45 | struct rcu_head rcu_head; | 45 | struct rcu_head rcu_head; |
| 46 | }; | 46 | }; |
| 47 | 47 | ||
| 48 | #define IPTUNNEL_XMIT() do { \ | 48 | #define __IPTUNNEL_XMIT(stats1, stats2) do { \ |
| 49 | int err; \ | 49 | int err; \ |
| 50 | int pkt_len = skb->len - skb_transport_offset(skb); \ | 50 | int pkt_len = skb->len - skb_transport_offset(skb); \ |
| 51 | \ | 51 | \ |
| @@ -54,12 +54,14 @@ struct ip_tunnel_prl_entry { | |||
| 54 | \ | 54 | \ |
| 55 | err = ip_local_out(skb); \ | 55 | err = ip_local_out(skb); \ |
| 56 | if (likely(net_xmit_eval(err) == 0)) { \ | 56 | if (likely(net_xmit_eval(err) == 0)) { \ |
| 57 | txq->tx_bytes += pkt_len; \ | 57 | (stats1)->tx_bytes += pkt_len; \ |
| 58 | txq->tx_packets++; \ | 58 | (stats1)->tx_packets++; \ |
| 59 | } else { \ | 59 | } else { \ |
| 60 | stats->tx_errors++; \ | 60 | (stats2)->tx_errors++; \ |
| 61 | stats->tx_aborted_errors++; \ | 61 | (stats2)->tx_aborted_errors++; \ |
| 62 | } \ | 62 | } \ |
| 63 | } while (0) | 63 | } while (0) |
| 64 | 64 | ||
| 65 | #define IPTUNNEL_XMIT() __IPTUNNEL_XMIT(txq, stats) | ||
| 66 | |||
| 65 | #endif | 67 | #endif |
