ip6_vti: simplify stats handling in vti6_xmit
Same as ip_vti, use iptunnel_xmit_stats to updates stats in tunnel xmit code path. Signed-off-by: Haishuang Yan <yanhaishuang@cmss.chinamobile.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
6e3bf9b04f
commit
bb107456ba
@ -503,17 +503,9 @@ vti6_xmit(struct sk_buff *skb, struct net_device *dev, struct flowi *fl)
|
|||||||
skb->dev = skb_dst(skb)->dev;
|
skb->dev = skb_dst(skb)->dev;
|
||||||
|
|
||||||
err = dst_output(t->net, skb->sk, skb);
|
err = dst_output(t->net, skb->sk, skb);
|
||||||
if (net_xmit_eval(err) == 0) {
|
if (net_xmit_eval(err) == 0)
|
||||||
struct pcpu_sw_netstats *tstats = this_cpu_ptr(dev->tstats);
|
err = pkt_len;
|
||||||
|
iptunnel_xmit_stats(dev, err);
|
||||||
u64_stats_update_begin(&tstats->syncp);
|
|
||||||
tstats->tx_bytes += pkt_len;
|
|
||||||
tstats->tx_packets++;
|
|
||||||
u64_stats_update_end(&tstats->syncp);
|
|
||||||
} else {
|
|
||||||
stats->tx_errors++;
|
|
||||||
stats->tx_aborted_errors++;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
tx_err_link_failure:
|
tx_err_link_failure:
|
||||||
|
Loading…
Reference in New Issue
Block a user