From: Jakub Kicinski <kuba@kernel.org>
To: Javen <javen_xu@realsil.com.cn>
Cc: "hkallweit1@gmail.com" <hkallweit1@gmail.com>,
"nic_swsd@realtek.com" <nic_swsd@realtek.com>,
"andrew+netdev@lunn.ch" <andrew+netdev@lunn.ch>,
"davem@davemloft.net" <davem@davemloft.net>,
"edumazet@google.com" <edumazet@google.com>,
"pabeni@redhat.com" <pabeni@redhat.com>,
"horms@kernel.org" <horms@kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [Patch net-next v6 2/7] r8169: add support for multi rx queues
Date: Fri, 29 May 2026 11:07:29 -0700 [thread overview]
Message-ID: <20260529110729.7fb14344@kernel.org> (raw)
In-Reply-To: <fe97b63208af41fc811ad37db94bc705@realsil.com.cn>
On Fri, 29 May 2026 06:47:00 +0000 Javen wrote:
> >> @@ -74,9 +74,13 @@
> >> #define NUM_TX_DESC 256 /* Number of Tx descriptor registers */
> >> #define NUM_RX_DESC 256 /* Number of Rx descriptor registers */
> >> #define R8169_TX_RING_BYTES (NUM_TX_DESC * sizeof(struct TxDesc))
> >> -#define R8169_RX_RING_BYTES (NUM_RX_DESC * sizeof(struct RxDesc))
> >> +#define R8169_RX_RING_BYTES ((NUM_RX_DESC + 1) * sizeof(struct
> >> +RxDesc))
> >
> >AI bots are asking why the "+ 1"?
>
> This + 1 is a workaround for the hardware DMA prefetcher. The H/W might aggressively fetch one more descriptor even after hitting the RingEnd mark. We allocated this extra dummy space as padding to prevent out-of-bounds access and potential IOMMU faults.
Add a brief comment explaining this please
next prev parent reply other threads:[~2026-05-29 18:07 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-26 8:11 [Patch net-next v6 0/7] r8169: add RSS support for RTL8127 javen
2026-05-26 8:11 ` [Patch net-next v6 1/7] r8169: add support for multi irqs javen
2026-05-29 1:00 ` Jakub Kicinski
2026-05-29 5:43 ` Javen
2026-05-29 18:07 ` Jakub Kicinski
2026-05-26 8:11 ` [Patch net-next v6 2/7] r8169: add support for multi rx queues javen
2026-05-29 1:04 ` Jakub Kicinski
2026-05-29 6:47 ` Javen
2026-05-29 18:07 ` Jakub Kicinski [this message]
2026-05-26 8:11 ` [Patch net-next v6 3/7] r8169: add support for new interrupt mapping javen
2026-05-26 8:11 ` [Patch net-next v6 4/7] r8169: enable " javen
2026-05-26 8:11 ` [Patch net-next v6 5/7] r8169: add support and enable rss javen
2026-05-26 8:11 ` [Patch net-next v6 6/7] r8169: move struct ethtool_ops javen
2026-05-26 8:11 ` [Patch net-next v6 7/7] r8169: support setting rx queue numbers via 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=20260529110729.7fb14344@kernel.org \
--to=kuba@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=linux-kernel@vger.kernel.org \
--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