[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e7a7f045b87a420a8863030b9378cb38@AcuMS.aculab.com>
Date: Tue, 27 Feb 2018 09:26:27 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Tiwei Bie' <tiwei.bie@...el.com>,
"mst@...hat.com" <mst@...hat.com>,
"virtualization@...ts.linux-foundation.org"
<virtualization@...ts.linux-foundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC: "jasowang@...hat.com" <jasowang@...hat.com>,
"wexu@...hat.com" <wexu@...hat.com>,
"jfreimann@...hat.com" <jfreimann@...hat.com>
Subject: RE: [PATCH RFC 1/2] virtio: introduce packed ring defines
From: Tiwei Bie
> Sent: 23 February 2018 11:18
...
> +struct vring_packed_desc_event {
> + /* Descriptor Event Offset */
> + __virtio16 desc_event_off : 15,
> + /* Descriptor Event Wrap Counter */
> + desc_event_wrap : 1;
> + /* Descriptor Event Flags */
> + __virtio16 desc_event_flags : 2;
> +};
This looks like you are assuming that a bit-field has a defined
layout and can be used to map a 'hardware' structure.
The don't, don't use them like that.
David
Powered by blists - more mailing lists