🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #7105

[PATCH net 2/2] net: dsa: mv88e6xxx: fix 88E6171 statistics type

#7105
From: Florian Fainelli
Date: Sat, 24 Oct 2026 18:21
38 lines
12451 bytes
The 88E6171 uses the 6095 statistics operations, which advertise and name
BANK0 and PORT counters. Its stats_type bitmap instead selects BANK0 and
BANK1. Since statistics collection started using that bitmap, it has
written a different set of counters from the one advertised to ethtool.

For this chip, get_sset_count() accounts for 30 BANK0 counters, three
PORT counters and five ATU/VTU counters. Collection instead writes 30
BANK0 counters, 26 BANK1 counters and five ATU/VTU counters: 61 entries
rather than the advertised 38. This mislabels the tail of the returned
statistics and writes past the advertised statistics buffer.

Select BANK0 and PORT counters to match the chip's statistics operations
and restore the filter used before the bitmap was introduced. Tested on
an EA4500, where the two-bridge forwarding and multicast snooping tests
now pass their hardware counter checks.

Fixes: 5595e3613ea7 ("dsa: mv88e6xxx: Move available stats into info structure")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 drivers/net/dsa/mv88e6xxx/chip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index 67daf3b9cb48..ebd9f69a7ed7 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -5960,7 +5960,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
 		.age_time_coeff = 15000,
 		.g1_irqs = 9,
 		.g2_irqs = 10,
-		.stats_type = STATS_TYPE_BANK0 | STATS_TYPE_BANK1,
+		.stats_type = STATS_TYPE_BANK0 | STATS_TYPE_PORT,
 		.atu_move_port_mask = 0xf,
 		.pvt = true,
 		.multi_chip = true,
-- 
2.53.0
Technical Details
Message-ID: <20261024182124.296988-3-f.fainelli@gmail.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-351439-linux-kernel-netdev=dewy.ru
References: <20261024182124.296988-1-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-351439-linux-kernel-netdev=dewy.ru
From: f.fainelli@gmail.com (Florian Fainelli)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net 2/2] net: dsa: mv88e6xxx: fix 88E6171 statistics type
Date: Sat, 24 Oct 2026 11:21:24 -0700
Organization: Usenet Network
Message-ID: <20261024182124.296988-3-f.fainelli@gmail.com>
References: <20261024182124.296988-1-f.fainelli@gmail.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="829357"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:g9d/Fp24UOStVRB8pJTOjYzp4oo= sha256:yJOg0CPAKgl2pk8sW9YvgSarmiLV4+hVbYXdZPnC8Q0=
	sha1:BLBWyaNUTsUjE+ZIjtlRjvivZYY= sha256:dM1smhk9ntlMyFpQfJigkmKoXEBHOCIbXVTMDAjZR9U=
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 6A4DC111699; Sat, 24 Oct 2026 21:23:09 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.048
X-Spam-Status: No, score=-3.048 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, FREEMAIL_FORGED_FROMDOMAIN=0.001,
	FREEMAIL_FROM=0.001, 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] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=gmail.com
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 H6PqCPn7bMKY;
	Sat, 24 Oct 2026 21:23:04 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-351439-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 7A939111685; Sat, 24 Oct 2026 21:22:56 +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 83B4037334; Sat, 24 Oct 2026 18:21:47 +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=1792866107;
	b=OqyFvpzZUSniFPSPj501661WZ3L4u8SI1N0Jr2Jo+vLrpFkOauSkVVRa96zILhARh0t0
	 /oJqBNZMxIb2CmCjmbWxgr/Mxytmj0CNTwoUXFS7NliOgKOzn66awg56xHP/ZbeqUrS0J
	 o58Mk/zEBXvT7xvJ+XPpXkL3RCx+oir/siF90gyIvBNII9/hAr7PGnkWTk8iHc27K9Y1v
	 fvtZYyfITMubz/FdxblDVe49U6iDuAKC3h6JwarP8iG6KS5EKGI/YNhTmOM4KdL4F29Yh
	 tHA0yo9B9koyZXv13Okqv9jw+aV2zw5i9GSZRhimHrsZUUvQ6W/UVmYEmQoJPTman2Q==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792866107;
	h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
	 X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-Received:
	 Received:From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:
	 References:X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:
	 Content-Transfer-Encoding;
	bh=sE9T+23rqSR/uL0cEE3JGokRaJALUOJfvl8GLVOXXYw=;
	b=HfaRI2RizB4HhLgBHN9kRlnIIpUwNeQEUqgOXjVmwckXvl9YZ/fPa2ZqT7pyGnIzxUew
	 fxKNOSRKilc5gZDX4j/IYJ8tgEedOnqOEM69UnPNTFax/TYtGNSKNtvWBlXNnhALOhAPH
	 yTvnXFLdEGtyeiTRKC1cOn4YFwqTQdrBs5cqk9jBlLgdNAxQVc4xTJ3mSIg2HXlVs9ltS
	 8yXMcZGnufmPuHEf/XMlHycwTgErTtN0BZP+dLcExkEyt3o0oxovIj17xQeK6rnedVild
	 7dNtiRVxUfUujYA5zKyf1wvFDseirQ45YghG+R2kYh9wksx/x38HXrwwpZlGHMDwXxw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=pRKIBgID;
	dmarc=pass header.from=gmail.com;
	spf=pass smtp.mailfrom=gmail.com;
	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 5859D606A31F;
	Sat, 24 Oct 2026 18:21:47 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=pRKIBgID
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.45
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1792866091;
	b=rubADA0cq66X6gJ3xA4oSk1z9fAz9g+tKLcI3TV5Q0cOP+mVbgLIXb7ZZ2K2o2OMVVvq
	 LsKhYQ3JXUF+IezFAOPhkgeP84+Qvjyc0T27t/qnvH9UkQ51Qv7rbu+VzJM9lvxASNe4e
	 ITMi05gxT9cEsNnznXtmuCN7y0wYbp51I8vkFCuZJW1ku4Wb4CoEFiZUoAgbItP1vm3rX
	 c4llwPcCW/EZuv2dFpO6yvqxJQRCtslXlJ/pST6CzVlBy6u6I54HtAesno0onOaLwjW3C
	 /bIPnds91AMEgyGYJvRWV1s2YurO2wM2vwLlwg2ojHizjdC7NXLeLjkKePE7ODbeSyg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792866091;
	h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
	 X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject:
	 Date:Message-ID:X-Mailer:In-Reply-To:References:MIME-Version:
	 Content-Transfer-Encoding;
	bh=sE9T+23rqSR/uL0cEE3JGokRaJALUOJfvl8GLVOXXYw=;
	b=TKiFn7WALuaY/1s8SY9LdzEUJc/6eFRMS6LYvbm/EW/0hxhlks5SuvjfSiuktDCcZwSG
	 qs576frZK1SHNJZr4ENTln723M+HWAPtRd93CbQkyMPwYIT2XtGE0Z86crPqQnvRggI/P
	 BIy2aRjcNYkd64C+AKYCpbURp0qeCsNbBI10i3lGoTs5I0DG8fPpNvBbCgUbj4iIKsjgD
	 curpxinXQj9B8kW5Qu1IycwUlUziJ8021T2o78yE5mH5AfGhKL7syo+PdqCYzMt3ooJUx
	 H5MTlohRB1v93mYWoeebXO70sLhzdtOjK/KRdAPvygewVtySzkLuoRV1GrZENBKl+yQ==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=gmail.com;
	spf=pass smtp.mailfrom=gmail.com;
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=pRKIBgID;
	arc=none smtp.remote-ip=74.125.82.45
X-Received: from mail-dl1-f45.google.com (mail-dl1-f45.google.com [74.125.82.45])
	(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 44F5A606A322
	for <netdev@vger.kernel.org>; Sat, 24 Oct 2026 18:21:31 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 44F5A606A322
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-dl1-f45.google.com with SMTP id a92af1059eb24-18cdcfc05ffso2202954c88.1
        for <netdev@vger.kernel.org>; Sat, 24 Oct 2026 11:21:31 -0700 (PDT)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20251104; t=1792866090; x=1793470890; darn=vger.kernel.org;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:from:to:cc:subject:date
         :message-id:reply-to:content-type;
        bh=sE9T+23rqSR/uL0cEE3JGokRaJALUOJfvl8GLVOXXYw=;
        b=pRKIBgIDrstUhL2irTAdk1XZ5sW3G/0L1k8cyVk1GlrZC3Z4nxj6eQoSmc5ZQEaeK9
         TnY8VMIcqWFwyyCdLo85K/Em3hr0oje8RwiWImT2jOB2szuJoNl3n/stfbd4SE071sQJ
         xBUYdcH3dUSv+U2t92V7EejJeMsXT86D+5jFY1T6GtmxTmpq3SXq/tA5IJhuYqXW5Mev
         wOBzuMT3i2kKdeX8IJIxno7IJl3KE5uUilD+Eue10XRVA6BcwoaBUlZ17cxNgr3r2CD8
         ei/IMt4+P9CoR+qniSjvDOmmcrWVp2SDIsoq5038BjLdjZNa2Cm4VmbY5XDrQ/w9LDwE
         53rQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1792866090; x=1793470890;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from
         :to:cc:subject:date:message-id:reply-to:content-type;
        bh=sE9T+23rqSR/uL0cEE3JGokRaJALUOJfvl8GLVOXXYw=;
        b=omVkHgKc1s1ji8yoiGGY+5y9Bf+uoQoQY9/j8gbVx8utFoQd0SFd235PLoN69nmTdK
         gukN/zxNLXoRel9twmPwDhdyzzIuv4LNg+2OxuclN5a0Of905vTLki2mEbU/65JbVp9i
         rfi9qNnDMBhD6+V9RQv/eeEfNuF+G3I4FTqe26GYqJl/tHTFL0GG4BZNRFy1LQaaFqjQ
         MA4lnlzNwS8Bcfku4Gs1eJheWWD+M8cUYEo3F3XqK7psJALc/SoNmasdBb6df0zIXqiD
         XlcfuFNtLhuXZuarngctCBl1V+6reb30CE2tYkf2LVTb28Sriv+LJ1ACR8f4GI6+b/g7
         BHCA==
X-Gm-Message-State: AFq9FYLXJzhV80y+hHAKodXzPfv3TVMiVqzXZ69KYB65gLXDHJAzLORb
	EEQzjUUHs1ZUdxdyHOqIr4Vx58vxakssOyUVXruboQFswF216akJy2QoqAZGIidr
X-Gm-Gg: AYBFou3nekZ1HI6MSJs4VqcUOJK8aMRukd7xh57UmYKC+UxBO8QLn/rbAL0c+TrsO8o
	okn9ZwVb8C0DMRumclag+wBiFMoTg/fOCKsbJdJ0cGTtCYJj915w0fEPsRu8TLX9tC1z8usXBCI
	UVbzHYxik01TIvvKXQw//moXiB8w7a0bughhkZc29aBZ0WfWKl+DM9JivGS1y1rCtTbC+/Lbuyx
	8qfpbtzi8ig7sX1g54jfAHbbVV2X9MxQEtI47EhCYzo0rQ8Gn6YbppCkbkJ2LuO7P22A7WFZsf0
	Ci9+29Oi4kRRtxG0M/zhSmbbfMomXK5Kx46Q/7JCQwzqCd6N/9yAfXVW/0JWGYN7GOai+Agz/8j
	+8RtPaV0Gx10i0OZfrMWvMRw5KTCGJNZpLXPePBxO7SEEjzB5aoiI9x5Gt/pRAsNYg9heV7Lpc6
	ocWV2m3BGqAJgWLehNKf+jA8rTWzvSUZj0GaxV2eXiSXVjJZcy/LKbjbU2O0XR0SNa47M4tiCFK
	faSZI06XPXsfdST2hyoJxMUxVLNehK98LZaZysk+D3c303aPV8eWws8GdQjmIBjtGRfdA05X4Qn
	75kpEA==
X-Received: by 2002:a05:7022:ea45:b0:19b:7b7a:a61e with SMTP id a92af1059eb24-19b7b7aa68emr1432682c88.26.1792866090404;
        Sat, 24 Oct 2026 11:21:30 -0700 (PDT)
X-Received: from eldorado (ip70-187-214-22.oc.oc.cox.net. [70.187.214.22])
        by smtp.gmail.com with ESMTPSA id a92af1059eb24-198a2e32479sm8174893c88.21.2026.10.24.11.21.29
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Sat, 24 Oct 2026 11:21:29 -0700 (PDT)
X-Cc: Florian Fainelli <f.fainelli@gmail.com>,
	Andrew Lunn <andrew@lunn.ch>,
	Vladimir Oltean <olteanv@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>,
	linux-kernel@vger.kernel.org (open list)
X-Mailer: git-send-email 2.53.0
X-In-Reply-To: <20261024182124.296988-1-f.fainelli@gmail.com>
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