diff mbox series

[net] geneve: change from tx_error to tx_dropped on missing metadata

Message ID 66009f71a08cba878fbdf86ca8dd137cdf19eaac.1591175373.git.jbenc@redhat.com
State Accepted
Delegated to: David Miller
Headers show
Series [net] geneve: change from tx_error to tx_dropped on missing metadata | expand

Commit Message

Jiri Benc June 3, 2020, 9:12 a.m. UTC
If the geneve interface is in collect_md (external) mode, it can't send any
packets submitted directly to its net interface, as such packets won't have
metadata attached. This is expected.

However, the kernel itself sends some packets to the interface, most
notably, IPv6 DAD, IPv6 multicast listener reports, etc. This is not wrong,
as tunnel metadata can be specified in routing table (although technically,
that has never worked for IPv6, but hopefully will be fixed eventually) and
then the interface must correctly participate in IPv6 housekeeping.

The problem is that any such attempt increases the tx_error counter. Just
bringing up a geneve interface with IPv6 enabled is enough to see a number
of tx_errors. That causes confusion among users, prompting them to find
a network error where there is none.

Change the counter used to tx_dropped. That better conveys the meaning
(there's nothing wrong going on, just some packets are getting dropped) and
hopefully will make admins panic less.

Signed-off-by: Jiri Benc <jbenc@redhat.com>
---
 drivers/net/geneve.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Comments

David Miller June 4, 2020, 10:45 p.m. UTC | #1
From: Jiri Benc <jbenc@redhat.com>
Date: Wed,  3 Jun 2020 11:12:14 +0200

> If the geneve interface is in collect_md (external) mode, it can't send any
> packets submitted directly to its net interface, as such packets won't have
> metadata attached. This is expected.
> 
> However, the kernel itself sends some packets to the interface, most
> notably, IPv6 DAD, IPv6 multicast listener reports, etc. This is not wrong,
> as tunnel metadata can be specified in routing table (although technically,
> that has never worked for IPv6, but hopefully will be fixed eventually) and
> then the interface must correctly participate in IPv6 housekeeping.
> 
> The problem is that any such attempt increases the tx_error counter. Just
> bringing up a geneve interface with IPv6 enabled is enough to see a number
> of tx_errors. That causes confusion among users, prompting them to find
> a network error where there is none.
> 
> Change the counter used to tx_dropped. That better conveys the meaning
> (there's nothing wrong going on, just some packets are getting dropped) and
> hopefully will make admins panic less.
> 
> Signed-off-by: Jiri Benc <jbenc@redhat.com>

Seems reasonable, applied, thanks Jiri.
diff mbox series

Patch

diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c
index 6b461be1820b..75266580b586 100644
--- a/drivers/net/geneve.c
+++ b/drivers/net/geneve.c
@@ -987,9 +987,10 @@  static netdev_tx_t geneve_xmit(struct sk_buff *skb, struct net_device *dev)
 	if (geneve->collect_md) {
 		info = skb_tunnel_info(skb);
 		if (unlikely(!info || !(info->mode & IP_TUNNEL_INFO_TX))) {
-			err = -EINVAL;
 			netdev_dbg(dev, "no tunnel metadata\n");
-			goto tx_error;
+			dev_kfree_skb(skb);
+			dev->stats.tx_dropped++;
+			return NETDEV_TX_OK;
 		}
 	} else {
 		info = &geneve->info;
@@ -1006,7 +1007,7 @@  static netdev_tx_t geneve_xmit(struct sk_buff *skb, struct net_device *dev)
 
 	if (likely(!err))
 		return NETDEV_TX_OK;
-tx_error:
+
 	dev_kfree_skb(skb);
 
 	if (err == -ELOOP)