qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 3/6] virtio for QEMU


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH 3/6] virtio for QEMU
Date: Fri, 04 Apr 2008 22:09:28 -0500
User-agent: Thunderbird 2.0.0.12 (X11/20080227)

Dor Laor wrote:

+static uint32_t vring_desc_len(VirtQueue *vq, unsigned int i)
+{

Below there were place you did use offsetof(vq->vring.desc[i], len) so
we better be consistent + its nicer

+ return ldl_phys(vq->vring.desc + i * sizeof(VRingDesc) + + offsetof(VRingDesc, len));
+}
+

Oh, this bit is different because you need to do offsetof(Type, member) and vq->vring.desc[i] is not a type. It only works when you're doing an array with member[X].

Regards,

Anthony Liguori




reply via email to

[Prev in Thread] Current Thread [Next in Thread]