[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [Qemu-block] [PATCH 1/2] dataplane: simplify indirect d
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [Qemu-block] [PATCH 1/2] dataplane: simplify indirect descriptor read |
Date: |
Fri, 30 Oct 2015 16:59:17 +0000 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
On Thu, Oct 29, 2015 at 11:28:05AM +0100, Igor Mammedov wrote:
> On Wed, 28 Oct 2015 17:48:02 +0200
> "Michael S. Tsirkin" <address@hidden> wrote:
> > - struct vring_desc *desc_ptr;
> > - MemoryRegion *mr;
> > -
> > /* Translate indirect descriptor */
> > - desc_ptr = vring_map(&mr,
> > - indirect->addr + found * sizeof(desc),
> Is it correct to use 'found' as iterator here vs using desc.next
> as is done when translating direct descriptors?
That is how Linux drivers/vhost/vhost.c:get_indirect() does it.
QEMU hw/virtio/virtio.c honors desc.next.
The VIRTIO 1.0 specification says:
The first indirect descriptor is located at start of the indirect
descriptor table (index 0), additional indirect descriptors are
chained by next field.
I think vhost and dataplane do not follow the specification here.
Fixing it is for a separate patch series.
Stefan
signature.asc
Description: PGP signature