Article View: linux.kernel.netdev
Article #23266Re: [PATCH net-next v6 1/6] ionic: access the extra_stats counters one at a time
From: netdev-bot+sashiko
Date: Thu, 26 Nov 2026 23:24
Date: Thu, 26 Nov 2026 23:24
60 lines
10469 bytes
10469 bytes
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] Commit "ionic: access the extra_stats counters one at a time"
fixes a user-visible defect but has no Fixes: tag.
--
ionic: access the extra_stats counters one at a time
This commit stops ionic_port_init() from writing the IONIC_STAT_INVALID
markers into port_info->extra_stats with a memset() of the whole block.
It also stops ionic_extra_port_stats_get_count() from taking its snapshot
with a struct copy. Both now walk the block as an array of __le64, using
WRITE_ONCE() and READ_ONCE() on one counter at a time, so ethtool -S
cannot report a torn counter.
> Both run without a common lock: ionic_port_init() is called from the
> firmware recovery work, and an ethtool -S that got past the device
> present check before the netdev was detached can still be running.
> Neither memset() nor a struct copy guarantees the width of its
> accesses, so the snapshot can hold a counter that is neither its old
> value nor the marker, and ethtool -S then reports it. The
> .get_fec_stats handler added later in this series has the same need.
>
> [ ... ]
>
> Signed-off-by: Nikhil P. Rao <nikhil.rao@amd.com>
> Signed-off-by: Eric Joyner <eric.joyner@amd.com>
> Signed-off-by: Brett Creeley <brett.creeley@amd.com>
[Severity: Low]
The commit message describes a bug that users can see: ethtool -S can
report a torn counter. Should this patch carry a Fixes: tag?
The two constructs it replaces both come from the same commit. One is the
memset(&idev->port_info->extra_stats, 0xff, ...) in ionic_port_init(). The
other is the struct copy in ionic_extra_port_stats_get_count():
*pes_cache = idev->port_info->extra_stats;
That commit has already been applied to the net tree:
Fixes: cb683ff6ee07 ("ionic: Report "rx_bits_phy" stat to ethtool")
Other fixes in this series carry Fixes: tags. Examples are "ionic: report
FEC off as a supported link mode", "ionic: report the configured FEC mode
in ethtool_fecparam.fec" and "ionic: report the operational FEC mode from
ethtool --show-fec". That makes the missing tag here look unintentional.
Without the tag, stable and backport tooling will not pick this up for
kernels that contain cb683ff6ee07. If the torn read is not considered
worth backporting, could the commit message say so?
--
Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261125-ionic-get-fec-stats-v6-0-1ab49c729c00%40amd.com
Technical Details
Message-ID:
<179573548295.3135.15579756299984220359@kernel.org>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.endofthelinebbs.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-372383-linux-kernel-netdev=dewy.ruReferences:
<20261125-ionic-get-fec-stats-v6-1-1ab49c729c00@amd.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.endofthelinebbs.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-372383-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next v6 1/6] ionic: access the extra_stats counters one at a time Date: Thu, 26 Nov 2026 23:24:42 +0000 Organization: Usenet Network Message-ID: <179573548295.3135.15579756299984220359@kernel.org> References: <20261125-ionic-get-fec-stats-v6-1-1ab49c729c00@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="592556"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:M95ZIr3pDw2Q+Au+RLDAcepAdV4= sha256:uyQbwh0aGOtbf1p8MPSqVs5b2lT/rT4IzfEbgxGokFw= sha1:mslx2oX3EOTBB93WZiUWweGiqrQ= sha256:53xw5POQb7tQEZYItMUW4mtlv2JO+usm4GmgjCi2KI8= 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 63B49125F0F; Fri, 27 Nov 2026 02:25:01 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.401 X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, 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=kernel.org 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 dJkDdoZBf5BV; Fri, 27 Nov 2026 02:24:57 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-372383-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 95478125F0D; Fri, 27 Nov 2026 02:24:47 +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 9C4732C436; Thu, 26 Nov 2026 23:24:45 +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=1795735485; b=0uTtzD2UPjhni4c6oZrfKvrtFJMUeyQqqBo3/VYLKTPtC1bu5lqZevyn60YPymen/zV6 kxZGCynr7ibPoNpyMgG947d8yp1uxjL2HnQuiVSj1dcCiXrMtag5X1BC+YIFwWAoCKMgH K9ITW6ks7MCs6MndTaimtex+f9Pgh8hjZ8oVEMGtgqsS/qZzwCK2utsvgsLish0wAmc4O s9CfqrIl3QgG068wYhn9/j33EVcK+ohlcYsNqXKnH8G/8naQYz+hsmPBQoPElqreNOjzH rQEdKLOie+4+09rCpYnyW2xAojx56FGoui7Xu1HGcXp5KqIWGkO5vxIH1YugrIJsFhA== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795735485; h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc: Date:Message-ID:In-Reply-To:References:X-sashiko-severity: Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version; bh=W6ONkCMnQ3s+chRJOqhep3MyunxLm38VvQTxz+Ys3C0=; b=PF7iE3LXULunSbk+36YrQZ3oM1kUe6dbMYmge8j4P9w6uANi1KmAmCH8WqC2d18OEFCG KoXVM8zwPxhLrApG7cf4qjcwn37fuBkdYsYQBDPuEotLJNIDkodbhZxIkgjpq1yOmR621 fUgj44amWtqZXlpf6KHKYUkskvFM0rWAWRnfld4rOftVEXLcMDU2VPrxl6oTmJpjH45Qh JBOnFJq81OI8CYJe8/awvdWbXax4RceV0uNjDgsmaTBqqmD5H48YX69+o0J/l1bDlJYPL IzO5ZyUgbVMpG5W4PRaVmW4DJboeteFg9pbXRVw8tkEkqarTRmBoo+kDmUo1Ks6H/XA== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=EPqG8l1y; 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 3B0F4606A323; Thu, 26 Nov 2026 23:24:45 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=EPqG8l1y X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795735484; b=W2vvVXjiBc8RBANB5/m5l+/Yy37xdycwI7MM0qWfTgpsRWmOHP6Cfx2juTcADYoO6T52 oOR2LV16GbngZ2wslKKXp+lHijKL7hSzbCjJpMf2frPhZtVO6QHxSjEPxh8dXF6rAE/KR of0MtT1XW4lmNO1ZvzeADmQWvwn59ihMyviaoWiMmQndqYpaHtbuF5PRdDu2v98m5RR1m eXjbosX9SQfz3ayDvYRwPMO29ZbWJoMgTNU46SRbA3TwJKBbjWOORXdRm69lFAfff5sfi CQxe7oznRCzTybvTgidRH0UnW734jwAJ9yuvUy54RLIV083gxAe7g3T0n84FrWXvYzA== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795735484; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=W6ONkCMnQ3s+chRJOqhep3MyunxLm38VvQTxz+Ys3C0=; b=ymhttRxhfMtVcPyBF1x3/7dmFECFQH6DId4BenjGe56PL6bbWDP7IwRtAtd8asxQlB+F 95j2OT5B2+pGujQ1bygEcGr8zrpq9KHV7vgRnjPdHh0h7Vz4z5i7qD2dAWGo+mGGOAeTK lW+MFHn8QI1Gz4GfmnqmIjr4ywPAxDNy5W+QHED/4K2CbhQEhTlzKTB4nGxS1NHsb0W+5 LMBc/uzQ10Bux7JFwV9DAcZs8gEQ+jNMyOo3fA28GtOJG0sS5hdkydj+epGlZ7cjtJCjC OdLyGGQvO4+Lmb05BZoZT6KWnRZfyIWTF0tBGVBneApqsgSrJwPkMtOH68rewC9OaVw== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=EPqG8l1y; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 564CE606A321 for <netdev@vger.kernel.org>; Thu, 26 Nov 2026 23:24:44 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 687441F00893; Thu, 26 Nov 2026 23:24:43 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795735484; bh=W6ONkCMnQ3s+chRJOqhep3MyunxLm38VvQTxz+Ys3C0=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=EPqG8l1ypLOcyxYX+aD//i0Aj7msb4IZdNuNR7XNEqeds/0ksgC7Y7qqni+lx5q59 PxAJmeMuWv37Ox14kDirqvN3WhzWW9uBlQDcIa1VZyuZoi6PWCTdqunmayZECo0GkR 7oXKyUZAsXu3ouC/lAUPjImZtAYEtVDVK1zSINtXWdDqbjxSlDHxi55MOx1CvOeFOz XXnHViGXEFrdGZ5IPxhzZWqVrPyvVR9VJUPkclfr/8BJoZi5ad21k/mL4UBX0g1ZuU JyhuQRlzr6XJ2lAw4R7xkw7WESigA1D9Gi4Glub1HOQQIuKT7K20pybRiCRVYMwe4N fs0fcfrzDFxlA== X-Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, sln@onemain.com, netdev@vger.kernel.org, horms@kernel.org, vadim.fedorenko@linux.dev, nikhil.rao@amd.com, eric.joyner@amd.com, leitao@debian.org, ArunKumar.Prakash@amd.com X-In-Reply-To: <20261125-ionic-get-fec-stats-v6-1-1ab49c729c00@amd.com> X-sashiko-severity: Low 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