Re: [PATCH RFC] tun: export underlying socket

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Or Gerlitz
Date: Monday, September 14, 2009 - 7:06 am

Michael S. Tsirkin wrote:

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?


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.



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH RFC] tun: export underlying socket, Michael S. Tsirkin, (Thu Sep 10, 5:59 am)
Re: [PATCH RFC] tun: export underlying socket, Eric Dumazet, (Thu Sep 10, 6:19 am)
Re: [PATCH RFC] tun: export underlying socket, Michael S. Tsirkin, (Thu Sep 10, 6:27 am)
Re: [PATCH RFC] tun: export underlying socket, Paul Moore, (Thu Sep 10, 9:17 pm)
Re: [PATCH RFC] tun: export underlying socket, Michael S. Tsirkin, (Thu Sep 10, 9:59 pm)
Re: [PATCH RFC] tun: export underlying socket, Michael S. Tsirkin, (Thu Sep 10, 10:36 pm)
Re: [PATCH RFC] tun: export underlying socket, Eric Dumazet, (Thu Sep 10, 11:10 pm)
Re: [PATCH RFC] tun: export underlying socket, Michael S. Tsirkin, (Fri Sep 11, 2:44 am)
Re: [PATCH RFC] tun: export underlying socket, Or Gerlitz, (Mon Sep 14, 1:01 am)
Re: [PATCH RFC] tun: export underlying socket, Or Gerlitz, (Mon Sep 14, 1:07 am)
Re: [PATCH RFC] tun: export underlying socket, Michael S. Tsirkin, (Mon Sep 14, 1:09 am)
Re: [PATCH RFC] tun: export underlying socket, Or Gerlitz, (Mon Sep 14, 1:17 am)
Re: [PATCH RFC] tun: export underlying socket, Michael S. Tsirkin, (Mon Sep 14, 2:11 am)
Re: [PATCH RFC] tun: export underlying socket, Or Gerlitz, (Mon Sep 14, 2:43 am)
Re: [PATCH RFC] tun: export underlying socket, Michael S. Tsirkin, (Mon Sep 14, 3:10 am)
Re: [PATCH RFC] tun: export underlying socket, Or Gerlitz, (Mon Sep 14, 7:06 am)
Re: [PATCH RFC] tun: export underlying socket, Herbert Xu, (Mon Sep 14, 8:03 am)
Re: [PATCH RFC] tun: export underlying socket, Michael S. Tsirkin, (Mon Sep 14, 8:40 am)
Re: [PATCH RFC] tun: export underlying socket, Or Gerlitz, (Tue Sep 15, 6:02 am)
Re: [PATCH RFC] tun: export underlying socket, Or Gerlitz, (Tue Sep 15, 6:11 am)
Re: [PATCH RFC] tun: export underlying socket, Michael S. Tsirkin, (Tue Sep 15, 6:18 am)
Re: [PATCH RFC] tun: export underlying socket, Herbert Xu, (Tue Sep 15, 6:31 am)
[PATCHv2] tun: export underlying socket, Michael S. Tsirkin, (Mon Nov 2, 10:20 am)
Re: [PATCHv2] tun: export underlying socket, Herbert Xu, (Tue Nov 3, 8:10 am)