RE: [PATCH RFC 1/2] virtio: introduce packed ring defines

From
David Laight <hidden>
Date
2018-02-27 09:26:27
Reply to
Tiwei Bie, 2018-02-23
From: Tiwei Bie
Sent: 23 February 2018 11:18
...
quoted hunk ↗ jump to hunk
+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
Thread (8 messages) 8 messages, 4 authors, last reply 2018-03-16
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help