diff options
author | Amerigo Wang <amwang@redhat.com> | 2012-11-11 16:52:33 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-11-14 18:49:50 -0500 |
commit | aa0010f880ab542da3ad0e72992f2dc518ac68a0 (patch) | |
tree | fe030d13bb1fcbf6071b268f06c068e2a7a50b0e /net/ipv4/ipip.c | |
parent | bf0098f22ca7b59e8844ac6882bbae230d34b98d (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/ipv4/ipip.c')
-rw-r--r-- | net/ipv4/ipip.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c index 720855e41100..3a4ad7d82f67 100644 --- a/net/ipv4/ipip.c +++ b/net/ipv4/ipip.c | |||
@@ -147,15 +147,6 @@ static struct rtnl_link_ops ipip_link_ops __read_mostly; | |||
147 | #define for_each_ip_tunnel_rcu(start) \ | 147 | #define for_each_ip_tunnel_rcu(start) \ |
148 | for (t = rcu_dereference(start); t; t = rcu_dereference(t->next)) | 148 | for (t = rcu_dereference(start); t; t = rcu_dereference(t->next)) |
149 | 149 | ||
150 | /* often modified stats are per cpu, other are shared (netdev->stats) */ | ||
151 | struct pcpu_tstats { | ||
152 | u64 rx_packets; | ||
153 | u64 rx_bytes; | ||
154 | u64 tx_packets; | ||
155 | u64 tx_bytes; | ||
156 | struct u64_stats_sync syncp; | ||
157 | }; | ||
158 | |||
159 | static struct rtnl_link_stats64 *ipip_get_stats64(struct net_device *dev, | 150 | static struct rtnl_link_stats64 *ipip_get_stats64(struct net_device *dev, |
160 | struct rtnl_link_stats64 *tot) | 151 | struct rtnl_link_stats64 *tot) |
161 | { | 152 | { |
@@ -465,7 +456,6 @@ drop: | |||
465 | static netdev_tx_t ipip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) | 456 | static netdev_tx_t ipip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) |
466 | { | 457 | { |
467 | struct ip_tunnel *tunnel = netdev_priv(dev); | 458 | struct ip_tunnel *tunnel = netdev_priv(dev); |
468 | struct pcpu_tstats *tstats; | ||
469 | const struct iphdr *tiph = &tunnel->parms.iph; | 459 | const struct iphdr *tiph = &tunnel->parms.iph; |
470 | u8 tos = tunnel->parms.iph.tos; | 460 | u8 tos = tunnel->parms.iph.tos; |
471 | __be16 df = tiph->frag_off; | 461 | __be16 df = tiph->frag_off; |
@@ -592,9 +582,7 @@ static netdev_tx_t ipip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) | |||
592 | if ((iph->ttl = tiph->ttl) == 0) | 582 | if ((iph->ttl = tiph->ttl) == 0) |
593 | iph->ttl = old_iph->ttl; | 583 | iph->ttl = old_iph->ttl; |
594 | 584 | ||
595 | nf_reset(skb); | 585 | iptunnel_xmit(skb, dev); |
596 | tstats = this_cpu_ptr(dev->tstats); | ||
597 | __IPTUNNEL_XMIT(tstats, &dev->stats); | ||
598 | return NETDEV_TX_OK; | 586 | return NETDEV_TX_OK; |
599 | 587 | ||
600 | tx_error_icmp: | 588 | tx_error_icmp: |