Netdev List
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: javen_xu@realsil.com.cn
Cc: hkallweit1@gmail.com, nic_swsd@realtek.com,
	andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux@armlinux.org.uk
Subject: Re: [PATCH net-next v16 4/7] r8169: prepare for new interrupt mapping
Date: Mon, 12 Oct 2026 07:41:27 +0000	[thread overview]
Message-ID: <179179088719.434549.13908904367971772664@kernel.org> (raw)
In-Reply-To: <20261008065722.1026-5-javen_xu@realsil.com.cn>

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 understates what the patch changes.

--

r8169: prepare for new interrupt mapping

This patch adds rtl8169_hw_enable_vec_mapping() and calls it from
rtl_hw_start_8125_common() when more than one IRQ vector is in use. It
also moves the RX counters in rtl_rx() and rtl8169_check_rx_desc_error()
from dev->stats into new per-ring u64_stats_sync protected counters in
struct rtl8169_rx_ring, and rtl8169_get_stats64() now sums them.

> r8169: prepare for new interrupt mapping
>
> This patch enables new interrupt mapping for RTL8127 and add error pkts
> counter per ring.

[Severity: Low]

This isn't a bug, but could the subject and body describe the stats
change more precisely?

The subject only mentions interrupt mapping. The patch also moves every
RX counter in rtl_rx() and rtl8169_check_rx_desc_error() out of
dev->stats and into ring->stats. Those counters are rx_errors,
rx_dropped, rx_length_errors, rx_crc_errors and multicast.

The phrase "add error pkts counter per ring" suggests new counters, but
these are existing counters being moved. Also, multicast is not an error
counter:

drivers/net/ethernet/realtek/r8169_main.c:rtl_rx() {
    ...
		if (skb->pkt_type == PACKET_MULTICAST) {
			u64_stats_update_begin(&ring->stats.syncp);
			ring->stats.multicast++;
			u64_stats_update_end(&ring->stats.syncp);
		}
    ...
}

The stats change takes effect right away on every chip the driver
supports. The vector mapping only runs when tp->irq_nvecs is greater
than 1:

drivers/net/ethernet/realtek/r8169_main.c:rtl_hw_start_8125_common() {
    ...
	if (tp->irq_nvecs > 1)
		rtl8169_hw_enable_vec_mapping(tp);
    ...
}

That can't happen until a later patch, because rtl_alloc_irq() still
requests only one vector.

With num_rx_rings == 1, the values reported by rtl8169_get_stats64()
seem unchanged. The only problem is that the description does not match
the diff.

Would it make sense to put the stats conversion in its own patch? If
not, could the subject and body say that RX statistics accounting
changes for all r8169 chips?

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261008065722.1026-1-javen_xu%40realsil.com.cn

  reply	other threads:[~2026-10-12  7:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-08  6:57 [PATCH net-next v16 0/7] r8169: add RSS support for RTL8127 javen
2026-10-08  6:57 ` [PATCH net-next v16 1/7] r8169: prepare for multi irqs and napi javen
2026-10-08  6:57 ` [PATCH net-next v16 2/7] r8169: refactor RX path to prepare for multi-queue javen
2026-10-08  6:57 ` [PATCH net-next v16 3/7] r8169: add support for new interrupt mapping javen
2026-10-12  7:41   ` netdev-bot+sashiko
2026-10-08  6:57 ` [PATCH net-next v16 4/7] r8169: prepare " javen
2026-10-12  7:41   ` netdev-bot+sashiko [this message]
2026-10-08  6:57 ` [PATCH net-next v16 5/7] r8169: add support and enable rss javen
2026-10-12  7:41   ` netdev-bot+sashiko
2026-10-08  6:57 ` [PATCH net-next v16 6/7] r8169: move struct ethtool_ops javen
2026-10-08  6:57 ` [PATCH net-next v16 7/7] r8169: add get_channel support for ethtool javen

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=179179088719.434549.13908904367971772664@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=horms@kernel.org \
    --cc=javen_xu@realsil.com.cn \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=nic_swsd@realtek.com \
    --cc=pabeni@redhat.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