From: Jorgen Hansen <jhansen@vmware.com>
To: Stefano Garzarella <sgarzare@redhat.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Dexuan Cui <decui@microsoft.com>,
"David S. Miller" <davem@davemloft.net>,
Vishnu DASA <vdasa@vmware.com>,
"K. Y. Srinivasan" <kys@microsoft.com>,
Haiyang Zhang <haiyangz@microsoft.com>,
Stephen Hemminger <sthemmin@microsoft.com>,
Sasha Levin <sashal@kernel.org>
Subject: Re: [RFC] vsock: proposal to support multiple transports at runtime
Date: Fri, 31 May 2019 09:24:49 +0000 [thread overview]
Message-ID: <3B468856-C98D-4AFD-9369-24D39D77277F@vmware.com> (raw)
In-Reply-To: <20190530111935.ldcgif6kmyxelaag@steredhat.homenet.telecomitalia.it>
On 30 May 2019, at 13:19, Stefano Garzarella <sgarzare@redhat.com> wrote:
>
> On Tue, May 28, 2019 at 04:01:00PM +0000, Jorgen Hansen wrote:
>>> On Thu, May 23, 2019 at 04:37:03PM +0100, Stefan Hajnoczi wrote:
>>>> On Tue, May 14, 2019 at 10:15:43AM +0200, Stefano Garzarella wrote:
>
>>>>>
>>>>>
>>>>> 2. listen() / recvfrom()
>>>>>
>>>>> a. use the 'host side transport', if the socket is bound to
>>>>> VMADDR_CID_HOST, or it is bound to VMADDR_CID_ANY and there is no
>>>>> guest transport.
>>>>> We could also define a new VMADDR_CID_LISTEN_FROM_GUEST in order to
>>>>> address this case.
>>>>> If we want to support multiple 'host side transport' running at the
>>>>> same time, we should find a way to allow an application to bound a
>>>>> specific host transport (e.g. adding new VMADDR_CID_LISTEN_FROM_KVM,
>>>>> VMADDR_CID_LISTEN_FROM_VMWARE, VMADDR_CID_LISTEN_FROM_HYPERV)
>>>>
>>>> Hmm...VMADDR_CID_LISTEN_FROM_KVM, VMADDR_CID_LISTEN_FROM_VMWARE,
>>>> VMADDR_CID_LISTEN_FROM_HYPERV isn't very flexible. What if my service
>>>> should only be available to a subset of VMware VMs?
>>>
>>> You're right, it is not very flexible.
>>
>> When I was last looking at this, I was considering a proposal where
>> the incoming traffic would determine which transport to use for
>> CID_ANY in the case of multiple transports. For stream sockets, we
>> already have a shared port space, so if we receive a connection
>> request for < port N, CID_ANY>, that connection would use the
>> transport of the incoming request. The transport could either be a
>> host->guest transport or the guest->host transport. This is a bit
>> harder to do for datagrams since the VSOCK port is decided by the
>> transport itself today. For VMCI, a VMCI datagram handler is allocated
>> for each datagram socket, and the ID of that handler is used as the
>> port. So we would potentially have to register the same datagram port
>> with all transports.
>
> So, do you think we should implement a shared port space also for
> datagram sockets?
Yes, having the two socket types work the same way seems cleaner to me. We should at least cover it in the design.
> For now only the VMWare implementation supports the datagram sockets,
> but in the future we could support it also on KVM and HyperV, so I think
> we should consider it in this proposal.
So for now, it sounds like we could make the VMCI transport the default transport for any host side datagram socket, then.
>>
>> The use of network namespaces would be complimentary to this, and
>> could be used to partition VMs between hypervisors or at a finer
>> granularity. This could also be used to isolate host applications from
>> guest applications using the same ports with CID_ANY if necessary.
>>
>
> Another point to the netns support, I'll put it in the proposal (or it
> could go in parallel with the multi-transport support).
>
It should be fine to put in the proposal that we rely on namespaces to provide this support, but pursue namespaces as a separate project.
Thanks,
Jorgen
next prev parent reply other threads:[~2019-05-31 9:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-14 8:15 [RFC] vsock: proposal to support multiple transports at runtime Stefano Garzarella
2019-05-16 21:48 ` Dexuan Cui
2019-05-20 14:44 ` Stefano Garzarella
2019-05-23 15:37 ` Stefan Hajnoczi
2019-05-27 10:44 ` Stefano Garzarella
2019-05-28 16:01 ` Jorgen Hansen
2019-05-30 11:19 ` Stefano Garzarella
2019-05-31 9:24 ` Jorgen Hansen [this message]
2019-06-03 10:49 ` Stefano Garzarella
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=3B468856-C98D-4AFD-9369-24D39D77277F@vmware.com \
--to=jhansen@vmware.com \
--cc=davem@davemloft.net \
--cc=decui@microsoft.com \
--cc=haiyangz@microsoft.com \
--cc=kys@microsoft.com \
--cc=netdev@vger.kernel.org \
--cc=sashal@kernel.org \
--cc=sgarzare@redhat.com \
--cc=stefanha@redhat.com \
--cc=sthemmin@microsoft.com \
--cc=vdasa@vmware.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox