OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

virtio-dev message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [virtio-dev] Re: [RESEND Patch v1 00/37] Implementation of vhost-pci for inter-vm commucation


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


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]