netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] vxlan: Update tx_errors statistics if vxlan_build_skb return err.
@ 2016-09-04 10:52 Haishuang Yan
  2016-09-04 14:12 ` Jiri Benc
  2016-09-06 20:42 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Haishuang Yan @ 2016-09-04 10:52 UTC (permalink / raw)
  To: David S. Miller, Jiri Benc, netdev, linux-kernel; +Cc: Haishuang Yan

If vxlan_build_skb return err < 0, tx_errors should be also increased.

Signed-off-by: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>
---
 drivers/net/vxlan.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index f605a36..2c72dcd 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,
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-09-06 20:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-04 10:52 [PATCH] vxlan: Update tx_errors statistics if vxlan_build_skb return err Haishuang Yan
2016-09-04 14:12 ` Jiri Benc
2016-09-06 20:42 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).