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 /drivers/net/vxlan.c | |
parent | d7d3e25f40e950bdcec6d94faf9346b7a7d6e4bb (diff) | |
download | talos-obmc-linux-039f50629b7f860f36644ed1f34b27da9aa62f43.tar.gz talos-obmc-linux-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 'drivers/net/vxlan.c')
-rw-r--r-- | drivers/net/vxlan.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index ba363cedef80..fecf7b6c732e 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c @@ -1841,9 +1841,10 @@ static int vxlan_xmit_skb(struct rtable *rt, struct sock *sk, struct sk_buff *sk skb_set_inner_protocol(skb, htons(ETH_P_TEB)); - return udp_tunnel_xmit_skb(rt, sk, skb, src, dst, tos, - ttl, df, src_port, dst_port, xnet, - !(vxflags & VXLAN_F_UDP_CSUM)); + udp_tunnel_xmit_skb(rt, sk, skb, src, dst, tos, ttl, df, + src_port, dst_port, xnet, + !(vxflags & VXLAN_F_UDP_CSUM)); + return 0; } #if IS_ENABLED(CONFIG_IPV6) @@ -2056,8 +2057,6 @@ static void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev, skb = NULL; goto rt_tx_error; } - - iptunnel_xmit_stats(err, &dev->stats, dev->tstats); #if IS_ENABLED(CONFIG_IPV6) } else { struct dst_entry *ndst; |