From: Jakub Kicinski <kuba@kernel.org>
To: Jacob Keller <jacob.e.keller@intel.com>
Cc: Lorenzo Bianconi <lorenzo@kernel.org>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
<linux-arm-kernel@lists.infradead.org>,
<linux-mediatek@lists.infradead.org>, <netdev@vger.kernel.org>,
Simon Horman <horms@kernel.org>
Subject: Re: [PATCH net v3] net: airoha: Add missing filed to ppe_mbox_data struct
Date: Thu, 24 Apr 2025 17:09:29 -0700 [thread overview]
Message-ID: <20250424170929.3fb25bb8@kernel.org> (raw)
In-Reply-To: <b3ad22c0-bc58-41e5-8d62-a3bc8d7dccbe@intel.com>
On Wed, 23 Apr 2025 09:34:49 -0700 Jacob Keller wrote:
> >> One oddity here is that the structure is not marked __packed. This
> >> addition of a u8 means there will be a 3-byte gap on platforms which
> >> have a 4-byte integer... It feels very weird these are ints and not s32
> >> or something to fully clarify the sizes.
> >
> > yes, you are right. Let's hold on for a while with this patch and let me ask
> > Airoha folks if we can "pack" the struct in the NPU firmware binary so we can use
> > __packed attribute here. In any case I will use "u32" instead of "int" in the next
> > version.
>
> Sure. Also, if firmware already has this layout fixed, you could add the
> 3 padding bytes marked as reserved to make it more obvious they exist
> without needing to remember the rules for how the members will align.
+1 FWIW, mark the padding explicitly is good, but don't make everything
misaligned with __packed
prev parent reply other threads:[~2025-04-25 0:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-22 15:59 [PATCH net v3] net: airoha: Add missing filed to ppe_mbox_data struct Lorenzo Bianconi
2025-04-22 22:29 ` Jacob Keller
2025-04-23 11:20 ` Lorenzo Bianconi
2025-04-23 16:34 ` Jacob Keller
2025-04-25 0:09 ` Jakub Kicinski [this message]
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=20250424170929.3fb25bb8@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jacob.e.keller@intel.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=lorenzo@kernel.org \
--cc=netdev@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).