diff options
author | Pravin B Shelar <pshelar@nicira.com> | 2015-12-24 14:34:54 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-12-25 23:32:23 -0500 |
commit | 039f50629b7f860f36644ed1f34b27da9aa62f43 (patch) | |
tree | a5c6ba5107e86018462af57a3ea9a29e82bd8033 /net/ipv4/ip_tunnel.c | |
parent | d7d3e25f40e950bdcec6d94faf9346b7a7d6e4bb (diff) | |
download | lwn-039f50629b7f860f36644ed1f34b27da9aa62f43.tar.gz lwn-039f50629b7f860f36644ed1f34b27da9aa62f43.zip |
ip_tunnel: Move stats update to iptunnel_xmit()
By moving stats update into iptunnel_xmit(), we can simplify
iptunnel_xmit() usage. With this change there is no need to
call another function (iptunnel_xmit_stats()) to update stats
in tunnel xmit code path.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ip_tunnel.c')
-rw-r--r-- | net/ipv4/ip_tunnel.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/net/ipv4/ip_tunnel.c b/net/ipv4/ip_tunnel.c index 0f6e9ee031c4..c7bd72e9b544 100644 --- a/net/ipv4/ip_tunnel.c +++ b/net/ipv4/ip_tunnel.c @@ -656,7 +656,6 @@ void ip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev, struct rtable *rt; /* Route to the other host */ unsigned int max_headroom; /* The extra header space needed */ __be32 dst; - int err; bool connected; inner_iph = (const struct iphdr *)skb_inner_network_header(skb); @@ -794,10 +793,8 @@ void ip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev, return; } - err = iptunnel_xmit(NULL, rt, skb, fl4.saddr, fl4.daddr, protocol, - tos, ttl, df, !net_eq(tunnel->net, dev_net(dev))); - iptunnel_xmit_stats(err, &dev->stats, dev->tstats); - + iptunnel_xmit(NULL, rt, skb, fl4.saddr, fl4.daddr, protocol, tos, ttl, + df, !net_eq(tunnel->net, dev_net(dev))); return; #if IS_ENABLED(CONFIG_IPV6) |