Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4822593ybl; Wed, 22 Jan 2020 05:24:55 -0800 (PST) X-Google-Smtp-Source: APXvYqxhhoEndxFnzbCmex9k1HLVMlhmQrnqXtna+BTYrX6gEm92OU0iLEYiTPNza7B6X6T+hs9v X-Received: by 2002:aca:b808:: with SMTP id i8mr6540842oif.66.1579699495544; Wed, 22 Jan 2020 05:24:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579699495; cv=none; d=google.com; s=arc-20160816; b=VOVgct0tl0xC6UHgnZAD4JoWobHdMHAQaf/ybj5ajNOsRfp/asgnuq1RMGOtHpoMWZ jHLKajf+I742gle5XzjTUw2YS8uCqeBHaAF/UCY75iepzxBrfFtwIZCM7IwQwX/q9eNQ d5U0wPr9uHEvGTk6f4P4doM44xL8iwUFRDlLuUNGlhFbFgPEkjfMHMY+QGtZB8PbtZTp t/RDdGgmr0JI8e1ObfzeajWiHvs3xVaqNQe2SEvv6k+pfCNoI5AiAbdqttl1z4hEXcPK B1NxE8I5rTAha2UAr/hlKgMaw3t0LP1wn8xU7+ExUQwOoJ8Qqvhzixuhn7Do8eRPECOK bK9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=dVcMQhrfvr57qzho5rW/rb8si7/NbUE4PFH1bs1AdoE=; b=eqUnWQbVHiR/NgH0NMwh0tyHefQYcqCE3jxMjRYXonVL3m6QtVPUD5wKd8v09pMpPn NBq2yNFa+OfeG6yvjAdHwoCLmtNsB1uSFVwMdJLn/B3JdbWuAofN+Da61ruZmCOO0CXN KaKgngajsn56NOUztLX1o1hgfnwcDHLTtLJne73yNrlylfkunrSKXE10BLuxSgFWuHgL wLcLm4qSCHPWs98S5ud3vS75yTu4TDqwoYV476RB1bEy8XWmkdaF3hU7TN75RvBHVvW6 VY+ybDOU3SE/9/gnOz9r3aFr+x+pE6zYKYTjRrdCZ1ED77XSArY7cBwC176ctMwQI1rX hXEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mVqcjz2C; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f21si23482274otp.56.2020.01.22.05.24.43; Wed, 22 Jan 2020 05:24:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mVqcjz2C; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730546AbgAVNXt (ORCPT + 99 others); Wed, 22 Jan 2020 08:23:49 -0500 Received: from mail.kernel.org ([198.145.29.99]:42144 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730350AbgAVNXo (ORCPT ); Wed, 22 Jan 2020 08:23:44 -0500 Received: from localhost (unknown [84.241.205.26]) (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 44EFB2467B; Wed, 22 Jan 2020 13:23:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579699423; bh=Bw8ZGxJXZ1WFo1MtttC8xFlL7eSGqbHYNSdsB62/luU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mVqcjz2CoOwW0aSDzWo3tBqNH9vEeUE4sG8fGxixm08+mVFbeEhYOIgDm8Q8JKj2e oVMoZ18E3mHBNpMsR4Lnmu+q6mN105+iQXF2hEqfWDDfz9npybnQuvBbWdbE65sojR 63l5cpsMZnOQssTN6DLyt4j4YKOeAM33HkCvJDII= 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 5.4 139/222] net: dsa: tag_qca: fix doubled Tx statistics Date: Wed, 22 Jan 2020 10:28:45 +0100 Message-Id: <20200122092843.689580438@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200122092833.339495161@linuxfoundation.org> References: <20200122092833.339495161@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 @@ -33,9 +33,6 @@ static struct sk_buff *qca_tag_xmit(stru 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;