diff options
author | Haishuang Yan <yanhaishuang@cmss.chinamobile.com> | 2016-09-04 12:52:51 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-09-06 22:41:42 +0200 |
commit | 5e1e61a33f987eb5d87c5acb199da99b6a9da93d (patch) | |
tree | 2d37015de6b0fa1d13f4f50b53277959a58204e8 /drivers/net/vxlan.c | |
parent | net/mlx4_en: protect ring->xdp_prog with rcu_read_lock (diff) | |
download | linux-5e1e61a33f987eb5d87c5acb199da99b6a9da93d.tar.xz linux-5e1e61a33f987eb5d87c5acb199da99b6a9da93d.zip |
vxlan: Update tx_errors statistics if vxlan_build_skb return err.
If vxlan_build_skb return err < 0, tx_errors should be also increased.
Signed-off-by: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>
Acked-by: Jiri Benc <jbenc@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/vxlan.c')
-rw-r--r-- | drivers/net/vxlan.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index 9735059dee99..199dec033cf8 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c @@ -2103,6 +2103,7 @@ static void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev, vni, md, flags, udp_sum); if (err < 0) { dst_release(ndst); + dev->stats.tx_errors++; return; } udp_tunnel6_xmit_skb(ndst, sk, skb, dev, |