All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] net: dsa: tag_qca: fix doubled Tx statistics
@ 2020-01-15  8:56 Alexander Lobakin
  2020-01-15 17:23 ` Florian Fainelli
  2020-01-16 13:00 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Alexander Lobakin @ 2020-01-15  8:56 UTC (permalink / raw)
  To: David S. Miller
  Cc: Andrew Lunn, Vivien Didelot, Florian Fainelli, John Crispin,
	netdev, linux-kernel, Alexander Lobakin

DSA subsystem takes care of netdev statistics since commit 4ed70ce9f01c
("net: dsa: Refactor transmit path to eliminate duplication"), so
any accounting inside tagger callbacks is redundant and can lead to
messing up the stats.
This bug is present in Qualcomm tagger since day 0.

Fixes: cafdc45c949b ("net-next: dsa: add Qualcomm tag RX/TX handler")
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Alexander Lobakin <alobakin@dlink.ru>
---
 net/dsa/tag_qca.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/net/dsa/tag_qca.c b/net/dsa/tag_qca.c
index c95885215525..c8a128c9e5e0 100644
--- a/net/dsa/tag_qca.c
+++ b/net/dsa/tag_qca.c
@@ -33,9 +33,6 @@ static struct sk_buff *qca_tag_xmit(struct sk_buff *skb, struct net_device *dev)
 	struct dsa_port *dp = dsa_slave_to_port(dev);
 	u16 *phdr, hdr;
 
-	dev->stats.tx_packets++;
-	dev->stats.tx_bytes += skb->len;
-
 	if (skb_cow_head(skb, 0) < 0)
 		return NULL;
 
-- 
2.25.0


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

* Re: [PATCH net] net: dsa: tag_qca: fix doubled Tx statistics
  2020-01-15  8:56 [PATCH net] net: dsa: tag_qca: fix doubled Tx statistics Alexander Lobakin
@ 2020-01-15 17:23 ` Florian Fainelli
  2020-01-16 13:00 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Florian Fainelli @ 2020-01-15 17:23 UTC (permalink / raw)
  To: Alexander Lobakin, David S. Miller
  Cc: Andrew Lunn, Vivien Didelot, John Crispin, netdev, linux-kernel

On 1/15/20 12:56 AM, Alexander Lobakin wrote:
> DSA subsystem takes care of netdev statistics since commit 4ed70ce9f01c
> ("net: dsa: Refactor transmit path to eliminate duplication"), so
> any accounting inside tagger callbacks is redundant and can lead to
> messing up the stats.
> This bug is present in Qualcomm tagger since day 0.
> 
> Fixes: cafdc45c949b ("net-next: dsa: add Qualcomm tag RX/TX handler")
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
> Signed-off-by: Alexander Lobakin <alobakin@dlink.ru>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

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

* Re: [PATCH net] net: dsa: tag_qca: fix doubled Tx statistics
  2020-01-15  8:56 [PATCH net] net: dsa: tag_qca: fix doubled Tx statistics Alexander Lobakin
  2020-01-15 17:23 ` Florian Fainelli
@ 2020-01-16 13:00 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2020-01-16 13:00 UTC (permalink / raw)
  To: alobakin; +Cc: andrew, vivien.didelot, f.fainelli, john, netdev, linux-kernel

From: Alexander Lobakin <alobakin@dlink.ru>
Date: Wed, 15 Jan 2020 11:56:52 +0300

> DSA subsystem takes care of netdev statistics since commit 4ed70ce9f01c
> ("net: dsa: Refactor transmit path to eliminate duplication"), so
> any accounting inside tagger callbacks is redundant and can lead to
> messing up the stats.
> This bug is present in Qualcomm tagger since day 0.
> 
> Fixes: cafdc45c949b ("net-next: dsa: add Qualcomm tag RX/TX handler")
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
> Signed-off-by: Alexander Lobakin <alobakin@dlink.ru>

Applied and queued up for -stable.

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

end of thread, other threads:[~2020-01-16 13:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-15  8:56 [PATCH net] net: dsa: tag_qca: fix doubled Tx statistics Alexander Lobakin
2020-01-15 17:23 ` Florian Fainelli
2020-01-16 13:00 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.