From: netdev-bot+sashiko@kernel.org
To: florian.fainelli@broadcom.com
Cc: netdev@vger.kernel.org, nb@tipi-net.de, opendmb@gmail.com,
bcm-kernel-feedback-list@broadcom.com, andrew+netdev@lunn.ch,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, zakkemble@gmail.com, horms@kernel.org,
ryotkkr98@gmail.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v2 05/10] net: systemport: Fix RUNT MIB counter register offset calculation
Date: Thu, 24 Sep 2026 02:21:24 +0000 [thread overview]
Message-ID: <179021648477.2160803.4907842757640250855@kernel.org> (raw)
In-Reply-To: <20260922232440.598918-6-florian.fainelli@broadcom.com>
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] The commit message for "net: systemport: Fix RUNT MIB counter
register offset calculation" says the old code read all 4 RUNT MIB…
--
net: systemport: Fix RUNT MIB counter register offset calculation
This commit changes bcm_sysport_update_mib_counters() so that RUNT MIB
counters are read with an offset of 2 * UMAC_MIB_STAT_OFFSET. This covers
both the RX-to-TX gap and the TX-to-RUNT gap in the UniMAC MIB block.
> In bcm_sysport_update_mib_counters(), 'offset' was only set to
> UMAC_MIB_STAT_OFFSET (0xC) for all non-RX counters, omitting the second
> 0xC gap for BCM_SYSPORT_STAT_RUNT counters. As a result, all 4 RUNT MIB
> counters were read from unmapped gap register space.
[Severity: Low]
Is "all 4 RUNT MIB counters were read from unmapped gap register space"
accurate?
The loop reaches the RUNT entries in bcm_sysport_gstrings_stats after 29
STAT_MIB_RX and 29 STAT_MIB_TX u32 entries, so j is 0xE8 at that point.
With the old offset of 0xC, the four RUNT reads went to:
UMAC_MIB_START + 0xE8 + 0xC = 0x4F4 rx_runt_pkts
UMAC_MIB_START + 0xEC + 0xC = 0x4F8 rx_runt_valid_fcs
UMAC_MIB_START + 0xF0 + 0xC = 0x4FC rx_runt_inval_fcs_align
UMAC_MIB_START + 0xF4 + 0xC = 0x500 rx_runt_bytes
The TX-to-RUNT gap covers only 0x4F4-0x4FF, so only the first three reads
fell in the gap.
The fourth read, for rx_runt_bytes, went to 0x500. That is the real
rx_runt_pkts register. So before this fix, ethtool -S reported the runt
packet count as rx_runt_bytes, not a gap value.
Could the commit message say that three counters read gap space and
rx_runt_bytes showed the rx_runt_pkts value? The code change itself looks
correct and matches the 2 * BCMGENET_STAT_OFFSET handling in bcmgenet.
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260922232440.598918-1-florian.fainelli%40broadcom.com
next prev parent reply other threads:[~2026-09-24 2:21 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-22 23:24 [PATCH net v2 00/10] net: systemport: Collection of fixes Florian Fainelli
2026-09-22 23:24 ` [PATCH net v2 01/10] net: systemport: Fix buffer overflow in bcm_sysport_get_stats() Florian Fainelli
2026-09-22 23:24 ` [PATCH net v2 02/10] net: systemport: Fix invalid dev_id argument in bcm_sysport_poll_controller() Florian Fainelli
2026-09-24 2:21 ` netdev-bot+sashiko
2026-09-22 23:24 ` [PATCH net v2 03/10] net: systemport: Fix NULL pointer dereference in bcm_sysport_fini_rx_ring() Florian Fainelli
2026-09-22 23:24 ` [PATCH net v2 04/10] net: systemport: Fix Wake-on-LAN RXCHK filter enable loop Florian Fainelli
2026-09-22 23:24 ` [PATCH net v2 05/10] net: systemport: Fix RUNT MIB counter register offset calculation Florian Fainelli
2026-09-24 2:21 ` netdev-bot+sashiko [this message]
2026-09-22 23:24 ` [PATCH net v2 06/10] net: systemport: Fix potential packet length underflow in bcm_sysport_desc_rx() Florian Fainelli
2026-09-24 2:21 ` netdev-bot+sashiko
2026-09-22 23:24 ` [PATCH net v2 07/10] net: systemport: Fix out-of-bounds array accesses in DSA queue mapping Florian Fainelli
2026-09-24 2:21 ` netdev-bot+sashiko
2026-09-22 23:24 ` [PATCH net v2 08/10] net: systemport: Fix inverted error messages in bcm_sysport_stop() Florian Fainelli
2026-09-22 23:24 ` [PATCH net v2 09/10] net: systemport: Fix unbalanced Wake-on-LAN clock disable in resume Florian Fainelli
2026-09-24 2:21 ` netdev-bot+sashiko
2026-09-22 23:24 ` [PATCH net v2 10/10] net: systemport: Update TDMA queue mapping dynamically on changeupper Florian Fainelli
2026-09-24 2:21 ` netdev-bot+sashiko
2026-09-23 0:11 ` [PATCH net v2 00/10] net: systemport: Collection of fixes Jakub Kicinski
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=179021648477.2160803.4907842757640250855@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=florian.fainelli@broadcom.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nb@tipi-net.de \
--cc=netdev@vger.kernel.org \
--cc=opendmb@gmail.com \
--cc=pabeni@redhat.com \
--cc=ryotkkr98@gmail.com \
--cc=zakkemble@gmail.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
all inboxes | Powered by JetHome®