summaryrefslogtreecommitdiff
path: root/net/tipc
diff options
context:
space:
mode:
authorPravin B Shelar <pshelar@nicira.com>2015-12-25 01:34:54 +0300
committerDavid S. Miller <davem@davemloft.net>2015-12-26 07:32:23 +0300
commit039f50629b7f860f36644ed1f34b27da9aa62f43 (patch)
treea5c6ba5107e86018462af57a3ea9a29e82bd8033 /net/tipc
parentd7d3e25f40e950bdcec6d94faf9346b7a7d6e4bb (diff)
downloadlinux-039f50629b7f860f36644ed1f34b27da9aa62f43.tar.xz
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/tipc')
-rw-r--r--net/tipc/udp_media.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/net/tipc/udp_media.c b/net/tipc/udp_media.c
index 6af78c6276b4..d63a911e7fe2 100644
--- a/net/tipc/udp_media.c
+++ b/net/tipc/udp_media.c
@@ -182,15 +182,9 @@ static int tipc_udp_send_msg(struct net *net, struct sk_buff *skb,
goto tx_error;
}
ttl = ip4_dst_hoplimit(&rt->dst);
- err = udp_tunnel_xmit_skb(rt, ub->ubsock->sk, skb,
- src->ipv4.s_addr,
- dst->ipv4.s_addr, 0, ttl, 0,
- src->udp_port, dst->udp_port,
- false, true);
- if (err < 0) {
- ip_rt_put(rt);
- goto tx_error;
- }
+ udp_tunnel_xmit_skb(rt, ub->ubsock->sk, skb, src->ipv4.s_addr,
+ dst->ipv4.s_addr, 0, ttl, 0, src->udp_port,
+ dst->udp_port, false, true);
#if IS_ENABLED(CONFIG_IPV6)
} else {
struct dst_entry *ndst;