From: Alexander Lobakin Date: Wed, 15 Jan 2020 08:56:52 +0000 (+0300) Subject: net: dsa: tag_qca: fix doubled Tx statistics X-Git-Tag: baikal/mips/sdk5.9~14532^2~13 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=a95a1cb30f94aab6bc3d8232570f49ad309445a9;p=kernel.git net: dsa: tag_qca: fix doubled Tx statistics DSA subsystem takes care of netdev statistics since commit 18c7187d1027 ("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: 5de8724f3d13 ("net-next: dsa: add Qualcomm tag RX/TX handler") Reviewed-by: Andrew Lunn Signed-off-by: Alexander Lobakin Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller --- diff --git a/net/dsa/tag_qca.c b/net/dsa/tag_qca.c index c958852155251..c8a128c9e5e0f 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;