[PATCH] vxlan: Update tx_errors statistics if vxlan_build_skb return err.

Subsystems: networking drivers, the rest

STALE3692d

3 messages, 3 authors, 2016-09-06 · open the first message on its own page

[PATCH] vxlan: Update tx_errors statistics if vxlan_build_skb return err.

From: Haishuang Yan <hidden>
Date: 2016-09-04 10:59:12

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

Signed-off-by: Haishuang Yan <redacted>
---
 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

Re: [PATCH] vxlan: Update tx_errors statistics if vxlan_build_skb return err.

From: Jiri Benc <hidden>
Date: 2016-09-04 14:12:39

On Sun,  4 Sep 2016 18:52:51 +0800, Haishuang Yan wrote:
quoted hunk
If vxlan_build_skb return err < 0, tx_errors should be also increased.

Signed-off-by: Haishuang Yan <redacted>
---
 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,
Acked-by: Jiri Benc <redacted>

The error path in vxlan_xmit_one deserves complete rework, though.

 Jiri

Re: [PATCH] vxlan: Update tx_errors statistics if vxlan_build_skb return err.

From: David Miller <davem@davemloft.net>
Date: 2016-09-06 20:42:25

From: Haishuang Yan <redacted>
Date: Sun,  4 Sep 2016 18:52:51 +0800
If vxlan_build_skb return err < 0, tx_errors should be also increased.

Signed-off-by: Haishuang Yan <redacted>
Applied to net-next.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help