[PATCH net-next v2 1/2] net: ethernet: mtk_eth_soc: use prefetch methods
Elad Yifee
eladwf at gmail.com
Tue Jul 30 11:35:08 PDT 2024
On Tue, Jul 30, 2024 at 11:59 AM Joe Damato <jdamato at fastly.com> wrote:
>
> Based on the code in mtk_probe, I am guessing that only
> MTK_SOC_MT7628 can DMA to unaligned addresses, because for
> everything else eth->ip_align would be 0.
>
> Is that right?
>
> I am asking because the documentation in
> Documentation/core-api/unaligned-memory-access.rst refers to the
> case you mention, NET_IP_ALIGN = 0, suggesting that this is
> intentional for performance reasons on powerpc:
>
> One notable exception here is powerpc which defines NET_IP_ALIGN to
> 0 because DMA to unaligned addresses can be very expensive and dwarf
> the cost of unaligned loads.
>
> It goes on to explain that some devices cannot DMA to unaligned
> addresses and I assume that for your driver that is everything which
> is not MTK_SOC_MT7628 ?
I have no explanation for this partial use of 'eth->ip_align', it
could be a mistake
or maybe I'm missing something.
Perhaps Stefan Roese, who wrote this part, has an explanation.
(adding Stefan to CC)
More information about the linux-arm-kernel
mailing list