From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DCE7BC33CB6 for ; Wed, 22 Jan 2020 09:36:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B3EBE24680 for ; Wed, 22 Jan 2020 09:36:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579685803; bh=9kg3hd95kbchqpnKiuH5WYSqpajo2NxVMIJ/HmbOcQ0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=FrlPCdy8rJwOACoUvwcVnqMI1S86iA+ryN5nb0o22JkoxiyHFbTKheKs4C3/Sp13Q /MWpX7BVBrzBjyPq60r3OiP4MXH9lHyoHP+gOJfkUkenAxUjjjNunpQa7Zl8I7YCw7 Nd4Y/lUm9ZU1Fbu9OFzceNDdUerN/5uJRvCtl7T8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731193AbgAVJgi (ORCPT ); Wed, 22 Jan 2020 04:36:38 -0500 Received: from mail.kernel.org ([198.145.29.99]:52142 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730654AbgAVJgh (ORCPT ); Wed, 22 Jan 2020 04:36:37 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 81D2B24125; Wed, 22 Jan 2020 09:36:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579685797; bh=9kg3hd95kbchqpnKiuH5WYSqpajo2NxVMIJ/HmbOcQ0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K7ChVpj/4xdDS53ouG8EnlgtXh2t15e9hzfX/sxm5oPouehWWj3dR6apDzZ8ohOeJ hFSkJts5BXzY/vY/ZU/mZbaHK41WANmV/2ry0Vy6kUhYnoVS1vF/hjsmgTIQ+KYBZj nVHN/v7k8Dh3L50DFMIjQfhnMtcJq4vhNB634pUY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andrew Lunn , Alexander Lobakin , Florian Fainelli , "David S. Miller" Subject: [PATCH 4.9 82/97] net: dsa: tag_qca: fix doubled Tx statistics Date: Wed, 22 Jan 2020 10:29:26 +0100 Message-Id: <20200122092809.531667409@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200122092755.678349497@linuxfoundation.org> References: <20200122092755.678349497@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Alexander Lobakin [ Upstream commit bd5874da57edd001b35cf28ae737779498c16a56 ] 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 Signed-off-by: Alexander Lobakin Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/dsa/tag_qca.c | 3 --- 1 file changed, 3 deletions(-) --- a/net/dsa/tag_qca.c +++ b/net/dsa/tag_qca.c @@ -40,9 +40,6 @@ static struct sk_buff *qca_tag_xmit(stru struct dsa_slave_priv *p = netdev_priv(dev); u16 *phdr, hdr; - dev->stats.tx_packets++; - dev->stats.tx_bytes += skb->len; - if (skb_cow_head(skb, 0) < 0) goto out_free;