Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp790434rdb; Sat, 6 Jan 2024 09:07:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IEk0EOjcO7bW+5WXCzMkbVTqmRwCWejpFzhAG63mHKP1gsEemUaBC7grO9GW/KgCiaGmuHv X-Received: by 2002:a05:6e02:1b89:b0:35f:dea6:529 with SMTP id h9-20020a056e021b8900b0035fdea60529mr2040119ili.87.1704560855624; Sat, 06 Jan 2024 09:07:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704560855; cv=none; d=google.com; s=arc-20160816; b=e8NJ06SBXCKtsMV+jFpqKXlVbIpDFbXISPFDJLoBEJ6IEzBD0c9L7U+XqfFoKB12z3 x5qrgvdc7JoCKkUrgzLBb5PbZtEIFESYsjxw55wAvPquq1/HbGs7nLsxk50Z1S7I9kYe HcEmWAc57tjejg8mFAWT3XJIb7jvPO4eT7rFrUgLEYjhbXoghWEarWPC5SGc1qs21fjK 25wMlzufpRMurAx5rkug38cKHgkAcPBz6inSPzZt83wiZ0DmXu+PQhLQJNCJQdTVgXJ2 uTm5nLgaOSmd4QxvykGtGi20Oj9Sc9wLh8dvMeFOWueWcJEHKZZc8MYqEDwkLZ1ZjMd7 Hn+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=dPhfKVwequCMnYA34M18ravxgkggHOtfFd2lzVGsLBI=; fh=uCERt37ErLSOJt3msNzIiPpcncpiBx3mxWhyzY3J9eM=; b=Fq7d6T8D9ubN0Q151uXuvHqlXjUm8HBGTP+aP5/ClEPTLR5TefF7hPJOm2ZulDuBT9 KspDJA4rIy0EoMA45vsQKi8ZlZraHbohTG+yLrJGMw4IB2Ywvs2YErrylUsjSm4OBcOR zuDqW3z3fsYjYKOgq9P2HRM1EhhZ3ZaROFtCfRdXLZK41/Q3scbbW1ZGw5CKBNArX6J2 39i5D358ebLmqhjkgyI4PHNVMkcAu4uKjt30NlhRIZvW8Dzjfg8zdz+DTJ+xoF1uHzxm eAtgQM9Ddbz4fQb8JxGahChlW137cZlFZIPXp8qpszGbKHUSuFNuxaiaX0fvJT4Wz1dt rfig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=QA7wa8jY; spf=pass (google.com: domain of linux-kernel+bounces-18673-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18673-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id y3-20020a62b503000000b006dab980126dsi3257225pfe.227.2024.01.06.09.07.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Jan 2024 09:07:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-18673-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=QA7wa8jY; spf=pass (google.com: domain of linux-kernel+bounces-18673-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18673-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 3F16E28346E for ; Sat, 6 Jan 2024 17:07:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AEF6CC2CD; Sat, 6 Jan 2024 17:07:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="QA7wa8jY" X-Original-To: linux-kernel@vger.kernel.org Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3A065883B; Sat, 6 Jan 2024 17:07:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=dPhfKVwequCMnYA34M18ravxgkggHOtfFd2lzVGsLBI=; b=QA7wa8jYyoMtu+bjotQg0Zsdsm IKilQpNxkJwQhZO8USBTx/egJpLnmfubJlWXjMK5ICvLiO8y4nEawNSVeT/O1LxJqEaUIHBMJDXMb MUEgkF3u55xxBtZweGb2ZnJ9OW/+1pW+n9fUj/+6fzFKJbiz+osQOH79C9OOgkXZ3LBs=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1rMA8V-004X2M-8v; Sat, 06 Jan 2024 18:07:03 +0100 Date: Sat, 6 Jan 2024 18:07:03 +0100 From: Andrew Lunn To: Petr Tesarik Cc: Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Jisheng Zhang , "open list:STMMAC ETHERNET DRIVER" , "moderated list:ARM/STM32 ARCHITECTURE" , "moderated list:ARM/STM32 ARCHITECTURE" , open list , stable@vger.kernel.org Subject: Re: [PATCH net] net: stmmac: fix ethtool per-queue statistics Message-ID: <878c4ac5-66fa-4ddc-95af-ad40fab11c9c@lunn.ch> References: <20240105201642.30904-1-petr@tesarici.cz> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240105201642.30904-1-petr@tesarici.cz> On Fri, Jan 05, 2024 at 09:16:42PM +0100, Petr Tesarik wrote: > Fix per-queue statistics for devices with more than one queue. > > The output data pointer is currently reset in each loop iteration, > effectively summing all queue statistics in the first four u64 values. > > The summary values are not even labeled correctly. For example, if eth0 has > 2 queues, ethtool -S eth0 shows: > > q0_tx_pkt_n: 374 (actually tx_pkt_n over all queues) > q0_tx_irq_n: 23 (actually tx_normal_irq_n over all queues) > q1_tx_pkt_n: 462 (actually rx_pkt_n over all queues) > q1_tx_irq_n: 446 (actually rx_normal_irq_n over all queues) > q0_rx_pkt_n: 0 > q0_rx_irq_n: 0 > q1_rx_pkt_n: 0 > q1_rx_irq_n: 0 > > Fixes: 133466c3bbe1 ("net: stmmac: use per-queue 64 bit statistics where necessary") > Cc: stable@vger.kernel.org > Signed-off-by: Petr Tesarik Reviewed-by: Andrew Lunn Andrew