🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #7104

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

#7104
From: Florian Fainelli
Date: Sat, 24 Oct 2026 18:21
36 lines
12503 bytes
The 88E6171 belongs to the 6351 family and takes 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, 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 the 88E6171 as well.

Use the unshifted snapshot helper for the 88E6171. Tested on an EA4500:
pings through different switch ports now update only the corresponding
port's hardware counters.

Fixes: a605a0fe7115 ("net: dsa: mv88e6xxx: Abstract stats_snapshot into ops 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 7f68a0c55802..67daf3b9cb48 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -4610,7 +4610,7 @@ static const struct mv88e6xxx_ops mv88e6171_ops = {
 	.port_disable_pri_override = mv88e6xxx_port_disable_pri_override,
 	.port_get_cmode = mv88e6352_port_get_cmode,
 	.port_setup_message_port = mv88e6xxx_setup_message_port,
-	.stats_snapshot = mv88e6320_g1_stats_snapshot,
+	.stats_snapshot = mv88e6xxx_g1_stats_snapshot,
 	.stats_set_histogram = mv88e6095_g1_stats_set_histogram,
 	.stats_get_sset_count = mv88e6095_stats_get_sset_count,
 	.stats_get_strings = mv88e6095_stats_get_strings,
-- 
2.53.0
Technical Details
Message-ID: <20261024182124.296988-2-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-351438-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-351438-linux-kernel-netdev=dewy.ru
From: f.fainelli@gmail.com (Florian Fainelli)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net 1/2] net: dsa: mv88e6xxx: fix 88E6171 statistics snapshot
Date: Sat, 24 Oct 2026 11:21:23 -0700
Organization: Usenet Network
Message-ID: <20261024182124.296988-2-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="829234"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:h8XdVGMtdH+F6QJEB0XX4bc0dTY= sha256:NM51S3YNo3wCh70xUrd5wh8UHx1aEz1W1Iejy0STbj8=
	sha1:t6CJz1hSvVpfvyaJJcVdMqNlF6s= sha256:y2KqeRUjKCA68kjMcZm7DYNEcwz91kFLc+O6WEA9hkk=
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 38BC1111698; Sat, 24 Oct 2026 21:22:56 +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 tpEmX6bJqBH9;
	Sat, 24 Oct 2026 21:22:50 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-351438-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 2F4E8111685; Sat, 24 Oct 2026 21:22:42 +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 8601E36CD8; Sat, 24 Oct 2026 18:21:37 +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=1792866091;
	b=msXe4LV+owQsrVdpzyds7o3WKfBNKzwR9OriSmiGi2lqz/u0M1UuI+inSMJlMa54TDxt
	 +juiFjyhxbh4mpAoU5dUI4gwAt1mexKQPWo/FpXvsPz39Fes17/A2K5quNWq5LxQk8d+F
	 ofC3N4G4Ir+eZG/PdCTEnQ+se+RcUE7Xz1nqcfatVL9aQ0/p1AEMmkZzCmR/dV4jCT2vb
	 K7yfTpmI3dzeARCbgYzPLfOV8VuxVjHaxiXMj5WpC6UEXnSixrInacgorxRqL0WKaVPhR
	 7Sn5wDwisklzeSgSdPviq7E/69xVxVW8xandUd7WU9FjWGcUskszbv9/zlicjedzw4w==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792866091;
	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=CrjR2yr02sD1WpQZ29SF1jsEFlUfRLoiaxFwmlPUrwk=;
	b=l3Qgq0Mr+qZxyR9nlg0ZrX77hjeSPB0o3Yn1RHs2lOrPZmj3LKRpY7aEf5BRchzujcbX
	 VpLFKwrddjm+4SNaL3IAYubnDBzjZ9l5eNA0Qr4K+uQ3Vrg5fTmAN9DgTr4jOIiiNwb+o
	 SjwcQ7ar2mxGFOHTMEE6cWxmzupMB+RNI/3h3izMWBMb2o++sIBzm1mt024KZkyTbSuad
	 d1NfTNsF7JvJv1z5qeO3yRxFbOLWSOetktve38nRYC1u4W5dfYznKnn/zP56BPFY6xh6o
	 1AJE4RD7S8T2Tprq0/ZHw2IgetsCrtuhU7o2h8VKzMvac2vYDwFqECKBJEauBbrEwxw==
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=g4URQ+H7;
	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 3F63A606A321;
	Sat, 24 Oct 2026 18:21:31 +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=g4URQ+H7
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.172
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1792866090;
	b=DcnsDLN53eBU5NBNiPJjewnJEL2RBQ1sem5m6iC63xZoyqNLQvnjmjUKh11PKWDgvtR8
	 PhP5T+ogFOA3xm3VWwaW29bOQ0LMGCj3B5KvxIcLv4lpWkoVIFbvNBffLwVeAG7/gL7DG
	 oDiOcZP7OqrlIjklbceficTfJopsNWJBwWGdBkxZ8OXOVD7pHlhk3O3/1GiWEXiFEv7s+
	 IlncEvVW6bowXvg4YlCBeI6YeFJNbQTlvnKxMnsUnk1iqMSJmHWNQNzWhVJwQ3pklJtem
	 EeMdqGIXRo9JHwxH4wTWJz+gj++ht8D0danVftd/wQ5QKnAvc2Mmfoy9o5AbaLanWxg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792866090;
	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=CrjR2yr02sD1WpQZ29SF1jsEFlUfRLoiaxFwmlPUrwk=;
	b=OJ95X9304nTDGe4aizEdl4ENOWfsK9mnU0dR4gG3AAQxl/tE2B/b9SYuxa/UwvlzAS4+
	 8o3vdz4P33g4oJ+ZjlnZ2BE/rgJr7EMeG0wNcWjBixrJ7cMnL/QwLDR6vZX7jf74PB9bs
	 n02un1I1hllVGBUbC6lMd6bR6wIVE6zYZNp5RqB7yyJ7ot+lhkWf+OC/CwskGT+nItew5
	 njaadPoBMqPBVHD5JpICqV2GhIML/260FNOEXFYYdJ80y3lWWVx8aybGqmQM6C/tBCK0N
	 yx2q1ovrC0DYiTFrdR3UvDKRWX/u6DdKIuRmrNI+QxfMZGHwWBWK+hUWf50arLQjk4A==
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=g4URQ+H7;
	arc=none smtp.remote-ip=74.125.82.172
X-Received: from mail-dy1-f172.google.com (mail-dy1-f172.google.com [74.125.82.172])
	(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 0DBCA606A329
	for <netdev@vger.kernel.org>; Sat, 24 Oct 2026 18:21:29 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 0DBCA606A329
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-dy1-f172.google.com with SMTP id 5a478bee46e88-36661f953e4so3353056eec.1
        for <netdev@vger.kernel.org>; Sat, 24 Oct 2026 11:21:29 -0700 (PDT)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20251104; t=1792866089; x=1793470889; 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=CrjR2yr02sD1WpQZ29SF1jsEFlUfRLoiaxFwmlPUrwk=;
        b=g4URQ+H7F+BveIsuaNM4iDRcC4vAOwnINJwL4pvH0DAcYVoSi98Hu+7xvTNk2feTVo
         PEAqLTZgI8BDe+ZBa4cBlHR8Tn9+vdgT7t2QknjAEU2v8fdD6r7t10yUjJlHY/5PNuHl
         kPzDQXAf9pPV6aZEOWx7sj7faBw8wCLTDZ4dghALO+uUepoADfINxZn9o/ixwAdEpMhd
         Wp0cb4kUjPCSG673eIDRr6CAjUTkG+ONJdMjwZEjtC/JezxYBRDtzoex1XRr9qTZ1pm0
         Km/TuN2xOZTdfZnARQdoCP+bvAOcFY5ng4tquD15CRweYtT7LhYMwZqktcA/RshD3dSN
         pnKg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1792866089; x=1793470889;
        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=CrjR2yr02sD1WpQZ29SF1jsEFlUfRLoiaxFwmlPUrwk=;
        b=FI85cK99GX7JZSG2hMy7Ua82SU8gNA79x4oi3kMR46UqJFux4+LhOyPOSFmwdYt9aN
         4sxlHiiA5AYR5YifkGx1s15Q/B4ljluMkHajfV6iszQYmnQyLSakzRktkPSJt9GFdwK0
         irO4ZNR1uCQSZaQxymnTkBKFXuTFDKFL9SLtU0c3twz8MaXyuZEoUc5GrR/BezCiQPnI
         hKRYhyOre0+VOnTapJAJBDr/fTevpEFMC6KKjvtDV7bk2zSrHQ+8sTAEFIexNWzrnfhf
         Iy7x1TyQOJ74+et8StdGO+SNAfdvPRv935X8W7COJP4VcsZmTCw6FMNHhF8k4mmRieEB
         b8og==
X-Gm-Message-State: AFq9FYJHURig6aMfmdqWsJ0CINNmjxKbbP7PCOVkLhwPpkIMQmrzOUOB
	ph7DtHaFhk6KJSZ1UtBCR+rTHiijE3liblO1ZL0yuo4AmXN0M12VMH4xzBq5EWQ7
X-Gm-Gg: AYBFou2IKgmF7deZyl76ylr5gvAfDlqhWou5EEuc76DVeYHV/CzskwgnibW1HW5EDuP
	2mohvr8UZKX3ntTvtvS2Qv4QWtEyJP/U1BZccUo6UPegVYP0R8b0NR6XuuPWXX4wVLTi4DjQZ+v
	QabjmaeYDA8OpJkxtXq6oHzviKB4ydK53u/FR3rfNVrGljdGHMZLpPYw0jfRStx1TTUV4s0Xgyw
	VkIznoB73A9z96OfAUJlS336JO7zkkNbgkb7iXlH3mFVcX7d8ENkgN7bWDeAikCTzMkz9XoyMB6
	D5IcgTswhySswLq13fw3ukF+TP7HfEaZMohHGNm5h+JyJc/LnRyMVtwuIiAHqZEblh3W7HbChIG
	PjR+lUS2AeA2crACnTVuxFIN8hqxt2RKvJXwdfhnD+4h/ZAhldzEeQdKkkw7YUp2gLcAT1Kj5Rb
	/S5nIIsAC6XedGO+pa3io3PaK3zEH/WEBN9xWw1Nr29h1e7w8R+k5Sfau4CXyARmb4cOoiuGPhi
	nxyFGXGiPYUOOIgGV0Z/SWhfy4y5ZpC7FtSV/wKoWzB98XrzC18ceiOOxczL7GbxDuarw0vQ2xp
	i+edVyw=
X-Received: by 2002:a05:7022:2088:b0:148:722b:7cbc with SMTP id a92af1059eb24-1993505df6fmr3235936c88.14.1792866088809;
        Sat, 24 Oct 2026 11:21:28 -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.27
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Sat, 24 Oct 2026 11:21:28 -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