From: Andrew Lunn <andrew@lunn.ch>
To: Paolo Abeni <pabeni@redhat.com>
Cc: Rosen Penev <rosenp@gmail.com>,
netdev@vger.kernel.org, Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next] net: ibm: emac: Clear MAL descriptors without memset
Date: Thu, 21 May 2026 14:06:12 +0200 [thread overview]
Message-ID: <19663d71-94e3-4b6f-ba41-7920ea5935e3@lunn.ch> (raw)
In-Reply-To: <b9a1ce9c-1f5c-485c-8d65-bb00c7850842@redhat.com>
On Thu, May 21, 2026 at 11:45:25AM +0200, Paolo Abeni wrote:
> On 5/17/26 5:36 AM, Rosen Penev wrote:
> > Clear MAL descriptor rings with explicit field stores instead of
> > memset(). The descriptor rings are carved from MAL coherent DMA memory,
> > which may be mapped uncached on 32-bit powerpc. The optimized memset()
> > path can use dcbz there and trigger an alignment warning.
>
> Sashiko noted that the compiler could still optimize the above to a
> memset(). Perhaps a barrier() is needed here?
Maybe my understanding is wrong, but the compiler should have the
knowledge about if the addresses are aligned or not, and so if it can
call the optimised memset, or needs to keep with individual byte
accesses?
Has this patch been in user for a while, a port from downstream
OpenWRT or something?
Andrew
next prev parent reply other threads:[~2026-05-21 12:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-17 3:36 Rosen Penev
2026-05-21 9:45 ` Paolo Abeni
2026-05-21 12:06 ` Andrew Lunn [this message]
2026-05-21 19:02 ` Rosen Penev
2026-05-21 19:01 ` Rosen Penev
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=19663d71-94e3-4b6f-ba41-7920ea5935e3@lunn.ch \
--to=andrew@lunn.ch \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rosenp@gmail.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
all inboxes | Powered by JetHome®