aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/sit.c
diff options
context:
space:
mode:
authorAmerigo Wang <amwang@redhat.com>2012-11-11 16:52:33 -0500
committerDavid S. Miller <davem@davemloft.net>2012-11-14 18:49:50 -0500
commitaa0010f880ab542da3ad0e72992f2dc518ac68a0 (patch)
treefe030d13bb1fcbf6071b268f06c068e2a7a50b0e /net/ipv6/sit.c
parentbf0098f22ca7b59e8844ac6882bbae230d34b98d (diff)
net: convert __IPTUNNEL_XMIT() to an inline function
__IPTUNNEL_XMIT() is an ugly macro, convert it to a static inline function, so make it more readable. IPTUNNEL_XMIT() is unused, just remove it. Cc: David S. Miller <davem@davemloft.net> Signed-off-by: Cong Wang <amwang@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/sit.c')
-rw-r--r--net/ipv6/sit.c14
1 files changed, 1 insertions, 13 deletions
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: