qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Pierre Morel <pmorel@linux.vnet.ibm.com>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: cornelia.huck@de.ibm.com, mst@redhat.com, qemu-devel@nongnu.org,
	gkurz@linux.vnet.ibm.com
Subject: Re: [Qemu-devel] [PATCH v4] virtio dataplane: adapt dataplane for virtio Version 1
Date: Mon, 07 Sep 2015 12:38:36 +0200	[thread overview]
Message-ID: <55ED692C.4040203@linux.vnet.ibm.com> (raw)
In-Reply-To: <20150907102007.GA9593@stefanha-thinkpad.redhat.com>



On 09/07/2015 12:20 PM, Stefan Hajnoczi wrote:
> On Wed, Sep 02, 2015 at 06:53:44PM +0200, Pierre Morel wrote:
>> +    addr = virtio_queue_get_desc_addr(vdev, n);
>> +    size = virtio_queue_get_desc_size(vdev, n);
>> +    ptr = vring_map(&vring->mr_desc, addr, size, true);
>> +    if (!ptr) {
>> +        error_report("Failed to map 0x%16lx byte for vring desc at %16lx",
>> +                      size, addr);
>> +        goto out_err_desc;
>>       }
>> -
>> -    vring_init(&vring->vr, virtio_queue_get_num(vdev, n), vring_ptr, 4096);
>> +    vr->desc = ptr;
>> +
>> +    addr = virtio_queue_get_avail_addr(vdev, n);
>> +    size = virtio_queue_get_avail_size(vdev, n);
>> +    size += sizeof(__virtio16);
> Please add a comment explaining what these 2 bytes are for.

ok, I send an v5 with this and including the remarks from Greg on 
read/write access

>
>> +    ptr = vring_map(&vring->mr_avail, addr, size, true);
>> +    if (!ptr) {
>> +        error_report("Failed to map 0x%16lx byte for vring avail at %16lx",
>> +                      size, addr);
>> +        goto out_err_avail;
>> +    }
>> +    vr->avail = ptr;
>> +
>> +    addr = virtio_queue_get_used_addr(vdev, n);
>> +    size = virtio_queue_get_used_size(vdev, n);
>> +    size += sizeof(__virtio16);
> Here too.
>
Here too too

      reply	other threads:[~2015-09-07 10:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-02 16:53 [Qemu-devel] [PATCH v4] virtio dataplane: adapt dataplane for virtio Version 1 Pierre Morel
2015-09-03  8:44 ` Greg Kurz
2015-09-03 14:59 ` Greg Kurz
2015-09-07 10:20 ` Stefan Hajnoczi
2015-09-07 10:38   ` Pierre Morel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55ED692C.4040203@linux.vnet.ibm.com \
    --to=pmorel@linux.vnet.ibm.com \
    --cc=cornelia.huck@de.ibm.com \
    --cc=gkurz@linux.vnet.ibm.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).