[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <DBWASGS8U4LN.1GMHL8A61VWU8@bootlin.com>
Date: Thu, 07 Aug 2025 17:24:13 +0200
From: Théo Lebrun <theo.lebrun@...tlin.com>
To: "Sean Anderson" <sean.anderson@...ux.dev>, "Andrew Lunn"
<andrew+netdev@...n.ch>, "David S. Miller" <davem@...emloft.net>, "Eric
Dumazet" <edumazet@...gle.com>, "Jakub Kicinski" <kuba@...nel.org>, "Paolo
Abeni" <pabeni@...hat.com>, "Rob Herring" <robh@...nel.org>, "Krzysztof
Kozlowski" <krzk+dt@...nel.org>, "Conor Dooley" <conor+dt@...nel.org>,
"Nicolas Ferre" <nicolas.ferre@...rochip.com>, "Claudiu Beznea"
<claudiu.beznea@...on.dev>, "Paul Walmsley" <paul.walmsley@...ive.com>,
"Palmer Dabbelt" <palmer@...belt.com>, "Albert Ou" <aou@...s.berkeley.edu>,
"Alexandre Ghiti" <alex@...ti.fr>, "Samuel Holland"
<samuel.holland@...ive.com>, "Richard Cochran" <richardcochran@...il.com>,
"Russell King" <linux@...linux.org.uk>, "Thomas Bogendoerfer"
<tsbogend@...ha.franken.de>, "Vladimir Kondratiev"
<vladimir.kondratiev@...ileye.com>, "Gregory CLEMENT"
<gregory.clement@...tlin.com>, "Cyrille Pitchen"
<cyrille.pitchen@...el.com>, "Harini Katakam" <harini.katakam@...inx.com>,
"Rafal Ozieblo" <rafalo@...ence.com>, "Haavard Skinnemoen"
<hskinnemoen@...el.com>
Cc: <netdev@...r.kernel.org>, <devicetree@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <linux-riscv@...ts.infradead.org>,
<linux-mips@...r.kernel.org>, "Thomas Petazzoni"
<thomas.petazzoni@...tlin.com>, "Tawfik Bayouk"
<tawfik.bayouk@...ileye.com>
Subject: Re: [PATCH net-next v2 12/18] net: macb: match skb_reserve(skb,
NET_IP_ALIGN) with HW alignment
On Tue Jul 1, 2025 at 6:40 PM CEST, Sean Anderson wrote:
> On 6/27/25 05:08, Théo Lebrun wrote:
>> If HW is RSC capable, it cannot add dummy bytes at the start of IP
>
> Receive-side coalescing? Can you add a brief description of this
> feature to your commit message?
Yes that is Receive Side Coalescing. Clearly it needs to be mentioned
out loud, and briefly described.
>> packets. Alignment (ie number of dummy bytes) is configured using the
>> RBOF field inside the NCFGR register.
>>
>> On the software side, the skb_reserve(skb, NET_IP_ALIGN) call must only
>> be done if those dummy bytes are added by the hardware; notice the
>> skb_reserve() is done AFTER writing the address to the device.
>>
>> We cannot do the skb_reserve() call BEFORE writing the address because
>> the address field ignores the low 2/3 bits. Conclusion: in some cases,
>> we risk not being able to respect the NET_IP_ALIGN value (which is
>> picked based on unaligned CPU access performance).
>>
>> Fixes: 4df95131ea80 ("net/macb: change RX path for GEM")
>
> Do any existing MACBs support RSC? Is this a fix?
I have no idea. If any MACB supports RSC, it must be those running with
NET_IP_ALIGN=0, so arm64/powerpc/x86.
Is it a fix? We can guess that all boards fall in either category:
- Don't support RSC (=> RBOF works fine).
- Support RSC (=> RBOF not working) AND NET_IP_ALIGN=0.
Both of those are not impacted, so we technically don't fix anything for
current users.
Regards,
--
Théo Lebrun, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Powered by blists - more mailing lists