On Wed, 2020-04-15 at 14:14 +0200, Hannes Reinecke wrote: > On 4/12/20 5:32 AM, James Smart wrote: [...] > > +struct sli4_queue { > > + /* Common to all queue types */ > > + struct efc_dma dma; > > + spinlock_t lock; /* protect the queue > > operations */ > > + u32 index; /* current host entry > > index */ > > + u16 size; /* entry size */ > > + u16 length; /* number of entries */ > > + u16 n_posted; /* number entries posted */ > > + u16 id; /* Port assigned xQ_ID */ > > + u16 ulp; /* ULP assigned to this > > queue */ > > + void __iomem *db_regaddr; /* register address > > for the doorbell */ > > + u8 type; /* queue type ie > > EQ, CQ, ... */ > > Alignment? > Having an u8 following a pointer is a guaranteed misalignment for > the remaining entries. Only for a packed structure, which this isn't. In an ordinary structure, everything is padded to the required aligment, so you're going to waste 3 bytes here but it isn't going to be misaligned. James