On Tue, Jan 20, 2015 at 12:56 PM, Cornelia Huck
<cornelia.h...@de.ibm.com> wrote:
> On Tue, 20 Jan 2015 10:43:31 +0000
> Stefan Hajnoczi <stefa...@gmail.com> wrote:
>> On Thu, Dec 11, 2014 at 02:25:10PM +0100, Cornelia Huck wrote:
>> > @@ -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
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Reply via email to