diff options
author | Pravin B Shelar <pshelar@nicira.com> | 2015-12-24 17:34:54 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-12-25 23:32:23 -0500 |
commit | 039f50629b7f860f36644ed1f34b27da9aa62f43 (patch) | |
tree | a5c6ba5107e86018462af57a3ea9a29e82bd8033 /net/tipc | |
parent | d7d3e25f40e950bdcec6d94faf9346b7a7d6e4bb (diff) |
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.c | 12 |
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, | |||
182 | goto tx_error; | 182 | goto tx_error; |
183 | } | 183 | } |
184 | ttl = ip4_dst_hoplimit(&rt->dst); | 184 | ttl = ip4_dst_hoplimit(&rt->dst); |
185 | err = udp_tunnel_xmit_skb(rt, ub->ubsock->sk, skb, | 185 | udp_tunnel_xmit_skb(rt, ub->ubsock->sk, skb, src->ipv4.s_addr, |
186 | src->ipv4.s_addr, | 186 | dst->ipv4.s_addr, 0, ttl, 0, src->udp_port, |
187 | dst->ipv4.s_addr, 0, ttl, 0, | 187 | dst->udp_port, false, true); |
188 | src->udp_port, dst->udp_port, | ||
189 | false, true); | ||
190 | if (err < 0) { | ||
191 | ip_rt_put(rt); | ||
192 | goto tx_error; | ||
193 | } | ||
194 | #if IS_ENABLED(CONFIG_IPV6) | 188 | #if IS_ENABLED(CONFIG_IPV6) |
195 | } else { | 189 | } else { |
196 | struct dst_entry *ndst; | 190 | struct dst_entry *ndst; |