aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/ip6_gre.c9
-rw-r--r--net/ipv6/ip6_tunnel.c8
-rw-r--r--net/ipv6/sit.c14
3 files changed, 1 insertions, 30 deletions
diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
index 12aa473e9793..672101db71ee 100644
--- a/net/ipv6/ip6_gre.c
+++ b/net/ipv6/ip6_gre.c
@@ -116,15 +116,6 @@ static u32 HASH_ADDR(const struct in6_addr *addr)
116#define for_each_ip_tunnel_rcu(start) \ 116#define for_each_ip_tunnel_rcu(start) \
117 for (t = rcu_dereference(start); t; t = rcu_dereference(t->next)) 117 for (t = rcu_dereference(start); t; t = rcu_dereference(t->next))
118 118
119/* often modified stats are per cpu, other are shared (netdev->stats) */
120struct pcpu_tstats {
121 u64 rx_packets;
122 u64 rx_bytes;
123 u64 tx_packets;
124 u64 tx_bytes;
125 struct u64_stats_sync syncp;
126};
127
128static struct rtnl_link_stats64 *ip6gre_get_stats64(struct net_device *dev, 119static struct rtnl_link_stats64 *ip6gre_get_stats64(struct net_device *dev,
129 struct rtnl_link_stats64 *tot) 120 struct rtnl_link_stats64 *tot)
130{ 121{
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
index 424ed45ef122..8db4d9b7ab14 100644
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -95,14 +95,6 @@ struct ip6_tnl_net {
95 struct ip6_tnl __rcu **tnls[2]; 95 struct ip6_tnl __rcu **tnls[2];
96}; 96};
97 97
98/* often modified stats are per cpu, other are shared (netdev->stats) */
99struct pcpu_tstats {
100 unsigned long rx_packets;
101 unsigned long rx_bytes;
102 unsigned long tx_packets;
103 unsigned long tx_bytes;
104} __attribute__((aligned(4*sizeof(unsigned long))));
105
106static struct net_device_stats *ip6_get_stats(struct net_device *dev) 98static struct net_device_stats *ip6_get_stats(struct net_device *dev)
107{ 99{
108 struct pcpu_tstats sum = { 0 }; 100 struct pcpu_tstats sum = { 0 };
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index b543c56cad28..ffe83ef70cf7 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -88,15 +88,6 @@ struct sit_net {
88#define for_each_ip_tunnel_rcu(start) \ 88#define for_each_ip_tunnel_rcu(start) \
89 for (t = rcu_dereference(start); t; t = rcu_dereference(t->next)) 89 for (t = rcu_dereference(start); t; t = rcu_dereference(t->next))
90 90
91/* often modified stats are per cpu, other are shared (netdev->stats) */
92struct pcpu_tstats {
93 u64 rx_packets;
94 u64 rx_bytes;
95 u64 tx_packets;
96 u64 tx_bytes;
97 struct u64_stats_sync syncp;
98};
99
100static struct rtnl_link_stats64 *ipip6_get_stats64(struct net_device *dev, 91static struct rtnl_link_stats64 *ipip6_get_stats64(struct net_device *dev,
101 struct rtnl_link_stats64 *tot) 92 struct rtnl_link_stats64 *tot)
102{ 93{
@@ -685,7 +676,6 @@ static netdev_tx_t ipip6_tunnel_xmit(struct sk_buff *skb,
685 struct net_device *dev) 676 struct net_device *dev)
686{ 677{
687 struct ip_tunnel *tunnel = netdev_priv(dev); 678 struct ip_tunnel *tunnel = netdev_priv(dev);
688 struct pcpu_tstats *tstats;
689 const struct iphdr *tiph = &tunnel->parms.iph; 679 const struct iphdr *tiph = &tunnel->parms.iph;
690 const struct ipv6hdr *iph6 = ipv6_hdr(skb); 680 const struct ipv6hdr *iph6 = ipv6_hdr(skb);
691 u8 tos = tunnel->parms.iph.tos; 681 u8 tos = tunnel->parms.iph.tos;
@@ -866,9 +856,7 @@ static netdev_tx_t ipip6_tunnel_xmit(struct sk_buff *skb,
866 if ((iph->ttl = tiph->ttl) == 0) 856 if ((iph->ttl = tiph->ttl) == 0)
867 iph->ttl = iph6->hop_limit; 857 iph->ttl = iph6->hop_limit;
868 858
869 nf_reset(skb); 859 iptunnel_xmit(skb, dev);
870 tstats = this_cpu_ptr(dev->tstats);
871 __IPTUNNEL_XMIT(tstats, &dev->stats);
872 return NETDEV_TX_OK; 860 return NETDEV_TX_OK;
873 861
874tx_error_icmp: 862tx_error_icmp: