Re: [PATCH v3 02/31] elx: libefc_sli: SLI Descriptors and Queue entries

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux