Subject: Re: [PATCH net v3] net: airoha: Add missing filed to ppe_mbox_data struct

From: Jakub Kicinski <[email-masked]>
Date: Thu, 24 Apr 2025 17:09:29 -0700

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