From: Or Gerlitz <ogerlitz@voltaire.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: David Miller <davem@davemloft.net>,
netdev@vger.kernel.org, herbert@gondor.apana.org.au
Subject: Re: [PATCH RFC] tun: export underlying socket
Date: Mon, 14 Sep 2009 17:06:52 +0300 [thread overview]
Message-ID: <4AAE4DFC.9080500@voltaire.com> (raw)
In-Reply-To: <20090914101012.GA14176@redhat.com>
Michael S. Tsirkin wrote:
>> how would the use case with vhost will look like?
> - Configure bridge and tun using existing scripts
> - pass tun fd to vhost via an ioctl
> - vhost calls tun_get_socket
> - from this point, guest networking just goes faster
let me see I am with you:
1. vhost gets from user space through ioctl packet socket fd OR tun fd -
but never both
2. for packet socket fd
VM.TX is translated by vhost to sendmsg which goes through the NIC
NIC RX makes the fd poll to signal and then recvmsg is called on the
fd, then vhost places the packet in a virtq
3. for tun fd
VM.TX is translated by vhost to sendmsg which is translated by tun to
netif_rx which is then handled by the bridge
NIC RX goes to the bridge which xmits the packet a tun interface, now
what makes tun provide this packet to vhost and how it is done?
> A lot of people have asked for tun support in vhost, because qemu currently uses tun. With this scheme existing code and scripts can be used to configure both tun and bridge. You also can utilize virtualization-specific features in tun.
Tun has code to support some virtualization-specific features, however,
it has also some inherent problems, I think, for example, you don't know
over which NIC eventually a packet will be sent and as such, the feature
advertising to the guest (virtio-net) NIC is problematic, for example,
TSO. With vhost, since you are directly attached to a NIC and assuming
its a PF or VF NIC and not something like macvlan/veth you can actually
know what features are supported by this NIC.
Or.
next prev parent reply other threads:[~2009-09-14 14:06 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-10 12:59 [PATCH RFC] tun: export underlying socket Michael S. Tsirkin
2009-09-10 13:19 ` Eric Dumazet
2009-09-10 13:27 ` Michael S. Tsirkin
2009-09-11 4:17 ` Paul Moore
2009-09-11 4:59 ` Michael S. Tsirkin
2009-09-11 5:36 ` Michael S. Tsirkin
2009-09-11 6:10 ` Eric Dumazet
2009-09-11 9:44 ` Michael S. Tsirkin
2009-09-14 8:01 ` Or Gerlitz
2009-09-14 8:07 ` Or Gerlitz
2009-09-14 8:09 ` Michael S. Tsirkin
2009-09-14 8:17 ` Or Gerlitz
2009-09-14 9:11 ` Michael S. Tsirkin
2009-09-14 9:43 ` Or Gerlitz
2009-09-14 10:10 ` Michael S. Tsirkin
2009-09-14 14:06 ` Or Gerlitz [this message]
2009-09-14 15:03 ` Herbert Xu
2009-09-15 13:02 ` Or Gerlitz
2009-09-15 13:31 ` Herbert Xu
2009-09-14 15:40 ` Michael S. Tsirkin
2009-09-15 13:11 ` Or Gerlitz
2009-09-15 13:18 ` Michael S. Tsirkin
2009-11-02 17:20 ` [PATCHv2] " Michael S. Tsirkin
2009-11-03 15:10 ` Herbert Xu
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=4AAE4DFC.9080500@voltaire.com \
--to=ogerlitz@voltaire.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.