Thread (74 messages) 74 messages, 5 authors, 2015-02-02

Re: [PATCH RFC v6 08/20] dataplane: allow virtio-1 devices

From: Stefan Hajnoczi <hidden>
Date: 2015-01-20 14:47:06
Also in: qemu-devel

On Tue, Jan 20, 2015 at 12:56 PM, Cornelia Huck
[off-list ref] wrote:
On Tue, 20 Jan 2015 10:43:31 +0000
Stefan Hajnoczi [off-list ref] wrote:
quoted
On Thu, Dec 11, 2014 at 02:25:10PM +0100, Cornelia Huck wrote:
quoted
@@ -154,15 +157,18 @@ bool vring_should_notify(VirtIODevice *vdev, Vring *vring)
 }


-static int get_desc(Vring *vring, VirtQueueElement *elem,
+static int get_desc(VirtIODevice *vdev, Vring *vring, VirtQueueElement *elem,
                     struct vring_desc *desc)
Since we copy in struct vring_desc anyway, it's cleaner to byteswap the
fields once instead of remembering to do it each time we need to access
a field.  The copy_in_vring_desc() function is one thing I prefer I
about my patch.
Agreed, that makes the code cleaner.

I've prepared a version of this patch using copy_in_vring_desc() and
I'll post it when it survives some light testing on my side.
Cool, thanks for doing this!

Stefan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help