From: netdev-bot+sashiko@kernel.org
To: linusw@kernel.org
Cc: ulli.kroll@googlemail.com, andrew+netdev@lunn.ch,
davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
mirq-linux@rere.qmqm.pl, mhun512@gmail.com, edumazet@kernel.org,
netdev@vger.kernel.org
Subject: Re: [PATCH net-next v8 19/19] net: ethernet: cortina: Fix ethtool statistics reads
Date: Mon, 16 Nov 2026 14:45:51 +0000 [thread overview]
Message-ID: <179484035158.3136.6315312321959459543@kernel.org> (raw)
In-Reply-To: <20261112-gemini-ethernet-fixes-3-v8-19-f55bd43e02d3@kernel.org>
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] In gmac_get_ethtool_stats()
(drivers/net/ethernet/cortina/gemini.c), the patch adds `tx_hw_csummed…
--
net: ethernet: cortina: Fix ethtool statistics reads
This fixes the TX statistics retry loop in gmac_get_ethtool_stats(). The
loop wrote through values instead of p, so a seqcount retry could write
past the end of the ethtool stats array. It also stops clearing
tx_frag_stats[] from the reader, and now snapshots tx_hw_csummed under
ir_stats_syncp to match its writer.
> diff --git a/drivers/net/ethernet/cortina/gemini.c b/drivers/net/ethernet/cortina/gemini.c
> index 899d96420b1b8..d4aa283ccb7b7 100644
> --- a/drivers/net/ethernet/cortina/gemini.c
> +++ b/drivers/net/ethernet/cortina/gemini.c
[ ... ]
> @@ -2532,6 +2533,7 @@ static void gmac_get_ethtool_stats(struct net_device *netdev,
>
> for (i = 0; i < RX_STATS_NUM; i++)
> *p++ = port->hw_stats[i];
> + tx_hw_csummed = port->tx_hw_csummed;
>
> } while (u64_stats_fetch_retry(&port->ir_stats_syncp, start));
> values = p;
[Severity: Low]
This isn't a bug, but should the comment above this loop be updated as
well? It still says only:
/* Racing with MIB interrupt */
do {
p = values;
start = u64_stats_fetch_begin(&port->ir_stats_syncp);
The MIB path, gmac_update_hw_stats(), never writes tx_hw_csummed. The
only writer is gmac_clean_txq(), which is reached from gmac_start_xmit()
and gmac_cleanup_txqs():
drivers/net/ethernet/cortina/gemini.c:gmac_clean_txq() {
...
spin_lock_irqsave(&geth->irq_lock, flags);
u64_stats_update_begin(&port->ir_stats_syncp);
...
port->tx_hw_csummed += hwchksum;
u64_stats_update_end(&port->ir_stats_syncp);
...
}
Before this patch the loop only read hw_stats[], so the comment was
accurate. The other ir_stats_syncp reader, gmac_get_stats64(), already
lists both writers:
/* Racing with MIB and TX completion interrupts */
Could this loop's comment name the TX completion writer too, so the two
readers describe the same seqcount the same way?
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261112-gemini-ethernet-fixes-3-v8-0-f55bd43e02d3%40kernel.org
prev parent reply other threads:[~2026-11-16 14:45 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 13:30 [PATCH net-next v8 00/19] net: ethernet: cortina: Fix Gemini RX/TX buffer management Linus Walleij
2026-11-12 13:30 ` [PATCH net-next v8 01/19] net: ethernet: cortina: Keep shared free queue parent-owned Linus Walleij
2026-11-12 13:30 ` [PATCH net-next v8 02/19] net: ethernet: cortina: Keep ports bound for shared IRQ Linus Walleij
2026-11-16 14:45 ` netdev-bot+sashiko
2026-11-12 13:30 ` [PATCH net-next v8 03/19] net: ethernet: cortina: Drain free queue IRQ before resize Linus Walleij
2026-11-12 13:30 ` [PATCH net-next v8 04/19] net: ethernet: cortina: Normalize free queue pointers on rebuild Linus Walleij
2026-11-12 13:30 ` [PATCH net-next v8 05/19] net: ethernet: cortina: Correct free queue DMA mappings Linus Walleij
2026-11-12 13:30 ` [PATCH net-next v8 06/19] net: ethernet: cortina: Index free queue fragments with XArray Linus Walleij
2026-11-16 14:45 ` netdev-bot+sashiko
2026-11-12 13:30 ` [PATCH net-next v8 07/19] net: ethernet: cortina: Preserve in-flight free queue pages Linus Walleij
2026-11-16 14:45 ` netdev-bot+sashiko
2026-11-12 13:30 ` [PATCH net-next v8 08/19] net: ethernet: cortina: Rotate free queue page allocation Linus Walleij
2026-11-12 13:30 ` [PATCH net-next v8 09/19] net: ethernet: cortina: Recycle claimed free queue pages Linus Walleij
2026-11-12 13:30 ` [PATCH net-next v8 10/19] net: ethernet: cortina: Separate RX buffer capacity from free queue size Linus Walleij
2026-11-16 14:45 ` netdev-bot+sashiko
2026-11-12 13:30 ` [PATCH net-next v8 11/19] net: ethernet: cortina: Validate RX fragment lengths Linus Walleij
2026-11-16 14:45 ` netdev-bot+sashiko
2026-11-12 13:30 ` [PATCH net-next v8 12/19] net: ethernet: cortina: Account RX buffer size in truesize Linus Walleij
2026-11-12 13:30 ` [PATCH net-next v8 13/19] net: ethernet: cortina: Release partial RX frames on stop Linus Walleij
2026-11-12 13:30 ` [PATCH net-next v8 14/19] net: ethernet: cortina: Scale Gemini RX queues to system memory Linus Walleij
2026-11-12 13:30 ` [PATCH net-next v8 15/19] net: ethernet: cortina: Serialize TX completion statistics Linus Walleij
2026-11-16 14:45 ` netdev-bot+sashiko
2026-11-12 13:30 ` [PATCH net-next v8 16/19] net: ethernet: cortina: Scope RX statistics updates Linus Walleij
2026-11-12 13:30 ` [PATCH net-next v8 17/19] net: ethernet: cortina: Drain RX coalescing timer on stop Linus Walleij
2026-11-12 13:30 ` [PATCH net-next v8 18/19] net: ethernet: cortina: Reject TX rings smaller than retained pointers Linus Walleij
2026-11-12 13:30 ` [PATCH net-next v8 19/19] net: ethernet: cortina: Fix ethtool statistics reads Linus Walleij
2026-11-16 14:45 ` netdev-bot+sashiko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179484035158.3136.6315312321959459543@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=kuba@kernel.org \
--cc=linusw@kernel.org \
--cc=mhun512@gmail.com \
--cc=mirq-linux@rere.qmqm.pl \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=ulli.kroll@googlemail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox