mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 14:11:20 +00:00
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>
This commit is contained in:
parent
d7d3e25f40
commit
039f50629b
12 changed files with 56 additions and 78 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue