🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #7603

Re: [PATCH net v2 1/2] net: dsa: mv88e6xxx: fix 6351 family statistics snapshot

#7603
From: Andrew Lunn
Date: Mon, 26 Oct 2026 18:26
29 lines
9693 bytes
On Mon, Oct 26, 2026 at 09:47:32AM -0700, Florian Fainelli wrote:
> The 88E6171, 88E6175, 88E6350 and 88E6351 take the port number in the
> low bits of the statistics operation register. The 6320 snapshot helper
> instead encodes the port as (port + 1) << 5. On an EA4500 with an
> 88E6171, this causes ethtool -S to return physical port 0's MIB counters
> for every user port. Traffic on other ports does not update their
> reported hardware counters.
> 
> Before the snapshot operation was moved into the chip operations, only
> the 6320 and 6352 families used the shifted encoding. The refactoring
> incorrectly assigned that encoding to all four 6351 family chips.
> 
> Use the unshifted snapshot helper for the entire 6351 family. This
> matches the Marvell DSDT statsCapture() implementation, which uses the
> raw port number for chips outside DEV_RMON_PORT_BITS, including these
> four chips.
> 
> The original 88E6171 change was tested on an EA4500: pings through
> different switch ports updated only the corresponding port's hardware
> counters. The other three chips have not been hardware tested.
> 
> Fixes: a605a0fe7115 ("net: dsa: mv88e6xxx: Abstract stats_snapshot into ops structure")
> Link: https://lore.kernel.org/all/404d5f2d-24a5-4edc-897b-b1b3c54a20e1@lunn.ch/
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew
Technical Details
Message-ID: <6cc08ebc-e387-469c-a339-6a9588fefbe7@lunn.ch>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-352037-linux-kernel-netdev=dewy.ru
References: <20261026164733.737299-1-f.fainelli@gmail.com> <20261026164733.737299-2-f.fainelli@gmail.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-352037-linux-kernel-netdev=dewy.ru
From: andrew@lunn.ch (Andrew Lunn)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net v2 1/2] net: dsa: mv88e6xxx: fix 6351 family
 statistics snapshot
Date: Mon, 26 Oct 2026 19:26:25 +0100
Organization: Usenet Network
Message-ID: <6cc08ebc-e387-469c-a339-6a9588fefbe7@lunn.ch>
References: <20261026164733.737299-1-f.fainelli@gmail.com>
 <20261026164733.737299-2-f.fainelli@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: usenet.network;
	logging-data="1369813"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:myZ39RljgaJ7+S345QAL5W2qWZw= sha256:uIeUXbF20Lpmb7Nze+lNTjqMKBiIxGBj+PRXrIA9bdY=
	sha1:XhxF7QezR2MrDCSnoNA1RUF2Kpk= sha256:6VTBvKujYspNaJJAm5yKaQWOua7YV1TyC5E5YIlrKs0=
Content-Disposition: inline
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id A4692125BB1; Mon, 26 Oct 2026 21:28:15 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.049
X-Spam-Status: No, score=-3.049 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key)
	header.d=lunn.ch
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id D-a5pqty6_12;
	Mon, 26 Oct 2026 21:28:11 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-352037-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=lunn.ch
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 9504A125BB0; Mon, 26 Oct 2026 21:28:01 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id BDD7A2A2DD; Mon, 26 Oct 2026 18:26:39 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1793039199;
	b=01aCjWJNa1Gpgg/6bsZqE9Les0gxXnwgogowEpuDy0Z3nF5zKIS9Iwa4Ilam2AwHjm78
	 yIaZi9G5Ob9uAd5yOk5knMj5+Dtd7rwpprHXA2gviXNKH/TI6p+g2fGY5cT9uikxDklh4
	 NqyaTpUgn07c9EKZP6jILgcxlhrb6eU2TyIi0kNF264hvTTEqeUQQYqgDcoNxm5jBqk8R
	 3jJfEyYhYtcKfHpKL/cJt8+4wiLdCkb/27wUJ/2I4WJwtd6cgKAncCAyy5VfRzS4UuwV4
	 MTuMxtsoCx+ph/iKENULYVQVIZe4ZulnjTADn2oxrW4ytSmHu1SxUmECw4AB4BS1Fwg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793039199;
	h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:Date:
	 From:To:Cc:Subject:Message-ID:References:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version:Content-Type:Content-Disposition:In-Reply-To;
	bh=MY5qsu8gr2cqs6WuOlJtmdylKYo+MyPPG4aE+mmr2F4=;
	b=SJHakINarBCa6jSJax3avyDtR6USL58f3uGBMUL1ekF1WV0PsFMZWc9CRMj85Kx1HMpR
	 0fhn5CWjNzul1qW/z2TVMMT2X5Og3VCGa/WeCJxyq5aMgHvyASfmn3NktY/MXMJwWNK+V
	 77Z+oj7woT1b4bGNFgsDOxRw1xwqHfcpuUcHdRtP2uroF6tyztOz/H0e71jUp+/imN9Ov
	 6Q6xW0LvlHyW1pSCIzQo7jPyHQKL80rDQeu3LYMcxoN8s0fG8lR8dt4Ylw+HmIybdo4zs
	 MflhGqBS/CfwAK9hrzCkbQTNCQSu97FrF+70f0+PeNqJIA/CxhZz7aqpcm6+H3SS4LA==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=xx0pVhX6;
	dmarc=pass header.from=lunn.ch;
	spf=pass smtp.mailfrom=lunn.ch;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 95276606A327;
	Mon, 26 Oct 2026 18:26:39 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key, unprotected) header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=xx0pVhX6
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=156.67.10.101
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1793039193;
	b=1+iKLhWmvVGQXbvrYLoWsP/+4nBNY/DcV5w1Eh/4kN5hqPkyYqyYXNSRZ1RvXaehJ9p2
	 xpFSPThDD/Iu7B1FJXNJO//HcRv9UWJsVz2jRWmvh6DEjLFrr2Ym+zJymWBLbX3An8x7K
	 T9cn9+5f4npUPOAcB8YVwR35V8ZigXoaxwOKCMVoYaMcjMCIxiFKmPTw+9tmvrtOPwl9L
	 knO1yGdzLpexF96iBjPh3hH8iTJiMK1JNbgJKFUj3W7qvnI4Gz6IjgIX4b0mtK5eckMsw
	 NKOTm3pVFdrbQcsAbvtyUt1q54yZA3OusRJpspmo0v317qNzPR/aODO+2/X+AbX7Lag==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793039193;
	h=DMARC-Filter:DKIM-Signature:Received:Date:From:To:Cc:Subject:
	 Message-ID:References:MIME-Version:Content-Type:Content-Disposition:
	 In-Reply-To;
	bh=MY5qsu8gr2cqs6WuOlJtmdylKYo+MyPPG4aE+mmr2F4=;
	b=34BD6aMWV/WQgq6veiWhgmgdcmquzAnX5kCfje8cwKUOP2kS8QZKVPHdiDtOFPveaoGU
	 BYDesUf/8SNUHcsNRTPMSpqZyNQpVNDGUwoB90IrgqXMvIuBGJExGOSSdrE2RTo46EiXD
	 ew0il773+E1OKBg5GK9VK0CQZwmsSivJqYbI5D1eMJT4L4Gqe+hwFjOqSLCDfVR8lJHKj
	 6O2i2XSdJXtpbaEaPNJyv9OBql6cGyNpRF1DBV9AoL6X+9BAVErQGVuOkl8NXImhP+LNS
	 /pyQIwgp+FEaBBbKJ74jzxfY+GTQCxVqNgDgnaR7sMWDqmEwd8i57qRX4EDUbreMBMA==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=lunn.ch;
	spf=pass smtp.mailfrom=lunn.ch;
	dkim=pass header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=xx0pVhX6;
	arc=none smtp.remote-ip=156.67.10.101
X-Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange ECDHE (prime256v1) server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4D7BD606A31A;
	Mon, 26 Oct 2026 18:26:33 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 4D7BD606A31A
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch
X-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=MY5qsu8gr2cqs6WuOlJtmdylKYo+MyPPG4aE+mmr2F4=; b=xx0pVhX6f4SvjX1Q1hdyoR3/La
	1J1rGjO9RFCnkN8RI3uNIkKJMcGNYaIwKb3gWUavgAJg3tu+8k1sJAeREJKCal0GnNtLaVhFrCEGi
	WETbXWGCbJ2cQ+T0R9G+ee0NyqDxI0tUDy3Bg0XUOYsxFoi2Yv90Lj2/3Gy062LB5osw=;
X-Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2)
	(envelope-from <andrew@lunn.ch>)
	id 1xLPOr-00CpWB-2S; Mon, 26 Oct 2026 19:26:25 +0100
X-Cc: netdev@vger.kernel.org, Vladimir Oltean <olteanv@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>,
	open list <linux-kernel@vger.kernel.org>
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-In-Reply-To: <20261026164733.737299-2-f.fainelli@gmail.com>