netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* issue about virtio-net driver to suppoprt vhost mergeable buffer with zero-copy to support PS mode
@ 2010-05-27  1:21 Xin, Xiaohui
  2010-05-27  8:20 ` Michael S. Tsirkin
  0 siblings, 1 reply; 3+ messages in thread
From: Xin, Xiaohui @ 2010-05-27  1:21 UTC (permalink / raw)
  To: mst@redhat.com
  Cc: netdev@vger.kernel.org, kvm@vger.kernel.org,
	linux-kernel@vger.kernel.org, Herbert Xu

Michael,
I'm now looking into the vhost mergeable buffer, and I tried to use it to support PS mode with zero-copy. And I found an issue there that I have to modify the guest virito-net driver.

When guest virtio-net driver submits mergeable buffers, it submits multiple pages outside. In zero-copy case, vhost cannot know which page is used to put header, and which page is used to put payload. Then vhost can only reserves 12 bytes for each page. That means, the page_offset of the payload DMAed into the guest buffer is always 12 bytes. But guest virtio-net driver always use offset 0 to put the data (See receive_mergeable()). That's where the zero-copy use mergeable buffer must modify.

Have I missed something here? And how do you think about it?

Thanks 
Xiaohui 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-05-28  1:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-27  1:21 issue about virtio-net driver to suppoprt vhost mergeable buffer with zero-copy to support PS mode Xin, Xiaohui
2010-05-27  8:20 ` Michael S. Tsirkin
2010-05-28  1:13   ` Xin, Xiaohui

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).