From: Joe Damato <jdamato@fastly.com>
To: Stefan Roese <sr@denx.de>
Cc: Elad Yifee <eladwf@gmail.com>, Felix Fietkau <nbd@nbd.name>,
Sean Wang <sean.wang@mediatek.com>,
Mark Lee <Mark-MC.Lee@mediatek.com>,
Lorenzo Bianconi <lorenzo@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org,
Daniel Golle <daniel@makrotopia.org>
Subject: Re: [PATCH net-next v2 1/2] net: ethernet: mtk_eth_soc: use prefetch methods
Date: Thu, 1 Aug 2024 14:14:06 +0100 [thread overview]
Message-ID: <ZquKHioPb6SMpztT@LQ3V64L9R2> (raw)
In-Reply-To: <17deb48c-6148-4e3d-aa0b-6c840f55302d@denx.de>
On Thu, Aug 01, 2024 at 09:09:27AM +0200, Stefan Roese wrote:
> On 7/30/24 20:35, Elad Yifee wrote:
> > On Tue, Jul 30, 2024 at 11:59 AM Joe Damato <jdamato@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)
>
> Sorry, I can't answer this w/o digging deeper into this driver and
> SoC again. And I didn't use it for a few years now. It might be a
> mistake.
I asked about it because it was added in v2 of the patch, see the
changelog from the patch:
- use eth->ip_align instead of NET_IP_ALIGN as it could be 0,
depending on the platform
It seemed like from the changelog some one decided adding that made
sense and I was just confirming the reasoning above.
next prev parent reply other threads:[~2024-08-01 14:31 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-29 18:29 [PATCH net-next v2 0/2] net: ethernet: mtk_eth_soc: improve RX performance Elad Yifee
2024-07-29 18:29 ` [PATCH net-next v2 1/2] net: ethernet: mtk_eth_soc: use prefetch methods Elad Yifee
2024-07-30 8:59 ` Joe Damato
2024-07-30 18:35 ` Elad Yifee
2024-08-01 7:09 ` Stefan Roese
2024-08-01 13:14 ` Joe Damato [this message]
2025-01-06 14:28 ` Shengyu Qu
2025-01-21 23:50 ` Andrew Lunn
2024-07-29 18:29 ` [PATCH net-next v2 2/2] net: ethernet: mtk_eth_soc: use PP exclusively for XDP programs Elad Yifee
2024-07-29 19:10 ` [PATCH net-next v2 0/2] net: ethernet: mtk_eth_soc: improve RX performance Lorenzo Bianconi
2024-07-30 5:29 ` Elad Yifee
2024-08-01 1:37 ` Jakub Kicinski
2024-08-01 3:53 ` Elad Yifee
2024-08-01 7:30 ` Lorenzo Bianconi
2024-08-01 8:01 ` Elad Yifee
2024-08-01 8:15 ` Lorenzo Bianconi
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=ZquKHioPb6SMpztT@LQ3V64L9R2 \
--to=jdamato@fastly.com \
--cc=Mark-MC.Lee@mediatek.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=daniel@makrotopia.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=eladwf@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=lorenzo@kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=nbd@nbd.name \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sean.wang@mediatek.com \
--cc=sr@denx.de \
/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