Re: [kvm-devel] [PATCH] virtio_ring: make structure defines packed

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

 



On Sunday 10 February 2008, you wrote:
> Christian Borntraeger wrote:
> >  struct vring_used
> >  {
> >       __u16 flags;
> >       __u16 idx;
> > +     __u32 padding;
> >       struct vring_used_elem ring[];
> > -};
> > +} __attribute__ ((packed));
> >   
> 
> This padding that you've put in is not something that would normally 
> occur on x86.  I've checked with GCC on 32-bit and 64-bit and neither 
> would include that padding.  Is that padding included on s390?

No, it is not included on any architecture that is supported by Linux.
The only tricky case to watch out is if vring_used_elem contained
a __u64 member. In that case, the alignment would be 32 bits on x86 and
64 bits on s390, powerpc, mips and parisc.

	Arnd <><

_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/virtualization

[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux