qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [virtio-dev] Re: [RESEND Patch v1 00/37] Implementation


From: Wei Wang
Subject: Re: [Qemu-devel] [virtio-dev] Re: [RESEND Patch v1 00/37] Implementation of vhost-pci for inter-vm commucation
Date: Tue, 20 Dec 2016 15:22:22 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131028 Thunderbird/17.0.10

On 12/20/2016 12:32 PM, Wei Wang wrote:
Hi Marc-André, thanks for the comments.

On 12/20/2016 12:43 AM, Marc-André Lureau wrote:

Another question, what are vpnet->rqs used for?

This should be redundant, I will remove it.

I think I should explain more about this: the rqs field is redundant in the vpnet structure. But the rq is needed for the datapath.

The vhost-pci driver works like this (taking the single queue case as an example): It has three queues, mirrored tq, mirrored rq (shared from virtio-net, buffers inside them are memory from the master guest) and the rq (buffers inside it are memory allocated by the slave guest itself). The packets grabbed from the mirrored rq, are copied to the buf got from the slave's own rq, and then delivered to the slave network stack. We need the rq because: 1) the buffers from the mirrored rq are from the master guest, so the slave network stack, by default, will free the skb buf that was not allocated; 2) the buffer fetched from the mirrored rq "avail" needs be returned to "used", it causes a problem if the buffer has been freed by the master and re-assigned to other code to use while it hasn't been handled by slave side network stack? 3) Interrupt support: we will need the rq interrupt, so that virtio-net can notify vhost-pci-net to grab packets.

Best,
Wei



reply via email to

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