Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp349716rdb; Fri, 5 Jan 2024 11:54:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IHbFLQOGKGe2ZC2N6ZqV8/Z7zk2iPox3+odYob10ZS1QNfqLMrqDH0Y56UVafZ24uXTNVrq X-Received: by 2002:a17:902:ef85:b0:1d4:9ac9:eab4 with SMTP id iz5-20020a170902ef8500b001d49ac9eab4mr2131711plb.95.1704484471245; Fri, 05 Jan 2024 11:54:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704484471; cv=none; d=google.com; s=arc-20160816; b=sgKGatFaaD1/OdOcBOoEZc6Kz0ah7givIFvDmkeMOWnSIwqqZfVFtFjDnPA2QXWND9 dR3sqkrxCghEte2PuBJJG+c/54gFy3QtQcMZSu9hcZkixsAJiW/W/YcNdlgsqrTvzXCa KK9u6Me3Uj5+V9r9a3gN/NhjTC1WzR2xya/tskNHRQuzP/7Wzzcm1g389CTtaxZWTBLo 9D063T7SMqYHw9uUo9yJ25OVcp42Ay/LFKbIRLubOtsO3uYpmnN0GYDXEvL1sJZZqAcT EeDI4Z8AGD9lRC28SCknlcAqhx6X4zLflcNMaQ6lO1DDttb4nsryhLf8PvHKa4onQn4h F/pw== 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=Eyi451cj+KaNnkxMkyMiaR+M6T5nRPxn2ux4L1vEcqQ=; fh=1G1r3qUtsxn6XlZ3ybqIplzGYz5iJgqnvvgrPFUjnI0=; b=SmDn2povITTjt3fOJD9NkwDJxdMrhpmRPXziarxhsSj91LfwOAm2ic+3zkx9oW9Z+K gOgOdE9Mj4fQ++o7cQPHy7dmnAstxB2p+w0p6Z3AFWpCNgLC5ClPrrsfQZ2kp5ahakZm s1ffRE3LdCgZDTjBSAzS9K8AXxrA3B6w3cv62Q4FWGlJLQ3Efg/ievqnGi4pfvhbEKpE ax6eqHVX4eP6Wqk6V4pn1irOUyaoXTPtsfyzoDI2Cd/emg5+VSWGFxPpCNU2ZEyYpSV6 qXLvPQ/Ng3j7JGTPlJJx+6GJqcjjo+S8KXc1QcfdrnuVC06IKznFIHHj2Imi5W2JgG8q vHVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=pqJnL2U6; spf=pass (google.com: domain of linux-kernel+bounces-18309-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18309-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. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id u2-20020a170902a60200b001d4910ff862si1671315plq.309.2024.01.05.11.54.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jan 2024 11:54:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-18309-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=pqJnL2U6; spf=pass (google.com: domain of linux-kernel+bounces-18309-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18309-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 D9DD9285CE2 for ; Fri, 5 Jan 2024 19:54:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 98EC836087; Fri, 5 Jan 2024 19:54:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="pqJnL2U6" 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 1E47F35F0E; Fri, 5 Jan 2024 19:54:19 +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=Eyi451cj+KaNnkxMkyMiaR+M6T5nRPxn2ux4L1vEcqQ=; b=pqJnL2U69d2M5nR7iyo1cEWugG HTgEtks88S8iqKm5VsYDazfaXSUUmepFnchhboGdy6nqkNcROKYo9Gw5Aku9MZmhfyWVP9iM+moBU 5dngObrnZSCqqorkTvC0QLvj12y6iwt5lkncRkbvJ53QMplkeIQphalKI9MXPO1zOwoU=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1rLqGX-004UBZ-7Q; Fri, 05 Jan 2024 20:54:01 +0100 Date: Fri, 5 Jan 2024 20:54:01 +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 Subject: Re: [PATCH] net: stmmac: fix ethtool per-queue statistics Message-ID: <14d3ba8c-c01f-42d2-9f5a-d681d9ce3a55@lunn.ch> References: <20240105181024.14418-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: <20240105181024.14418-1-petr@tesarici.cz> On Fri, Jan 05, 2024 at 07:10:24PM +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 > > While touching this code, change the pointer type to u64 and get rid of the > weird pointer arithmetic. > > Signed-off-by: Petr Tesarik > Fixes: 133466c3bbe1 ("net: stmmac: use per-queue 64 bit statistics where necessary") Hi Petr There are a few process things you are missing. Please take a look at https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html You need to indicate which tree this is for. Additionally, your Signed-off-by comes last. Patches for stable should ideally be minimal. And obviously correct. See: https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html So the bits about changing the pointer type and removing the weird arithmetic might be better suited for net-next, not net. Andrew