netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: Andy King <acking@vmware.com>
Cc: pv-drivers@vmware.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	virtualization@lists.linux-foundation.org,
	gregkh@linuxfoundation.org, davem@davemloft.net
Subject: Re: [PATCH 1/1] VSOCK: Introduce VM Sockets
Date: Fri, 01 Feb 2013 09:12:22 +0100	[thread overview]
Message-ID: <510B78E6.3000602@redhat.com> (raw)
In-Reply-To: <140410652.5634760.1359669990735.JavaMail.root@vmware.com>

  Hi,

>> Likewise, I expect with the final version vmci_transport is a
>> separate module (or moves into the vmci driver), correct?
> 
> When you say final, do you mean something that we have to do before
> acceptance into mainline or something we can refine over time?

IMHO refining in-tree is fine.
This is the purpose of staging after all.

>From my side the minimum requirement is to have
vsock_(un)register_transport calls available, so it is possible to write
a virtio transport module without having to patch vsock code to hook it
up.  Having the vsock bits in staging would actually make it a bit
easier to add virtio.

In the end it is Greg's / Dave's call though as those have to ack &
merge the bits.

>>> +	case IOCTL_VMCI_SOCKETS_GET_LOCAL_CID:
>>> +		if (put_user(vmci_get_context_id(), p) != 0)
>>> +			retval = -EFAULT;
>>
>> What is this?
> 
> A CID, or "context ID" is how we identify a VM.  It's also in
> the address structure (svm_cid).  If you look at vm_sockets.h,
> you'll see that we have definitions for various endpoints (the
> host, anonymous and so forth).  It's sometimes useful for VMs
> to be able to query their own ID, for example, to be able to
> pass it out-of-band via INET to a peer.  So we'd like to keep
> this, although I guess it should be transport-defined, i.e.,
> we should ask the transport for this value.

Yes, should be transport specific (and optional).  virtio will (at least
initially) support guest <=> host only, so we don't need a context id.

>>> +	struct {
>>> +		/* For DGRAMs. */
>>> +		struct vmci_handle dg_handle;
>>
>> Yep, should be a pointer where transports can hook in their private
>> data.
> 
> I'm fixing this.

Yes, please, that is needed too to get started with virtio support.

>> Where is recv_dgram?
> 
> The transport just enqueues sk_buffs in the socket's buffer, so the
> core socket code can just pull them off.  So there's no explicit
> recv_dgram.

Ok.

>> Also why bind_dgram?  I guess binding stream sockets doesn't make
>> sense for the vsock family?
> 
> Ah, for our transport, there's nothing special involved in binding a
> STREAM, everything is handled by the core socket code.  So I didn't
> add a transport callback.  This is something we can add when it
> becomes necessary, if that's okay?

Sure.  Was just wondering.  TCP can bind stream sockets to interfaces to
listen -- for example -- on loopback only.  I can't see something
simliar which makes sense for vsock.

cheers,
  Gerd

  reply	other threads:[~2013-02-01  8:12 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-25 17:37 [PATCH 0/1] VM Sockets for Linux upstreaming acking
2013-01-25 17:37 ` [PATCH 1/1] VSOCK: Introduce VM Sockets acking
2013-01-25 23:59   ` Neil Horman
2013-01-26  0:15     ` [Pv-drivers] " Dmitry Torokhov
2013-01-26  0:22       ` Greg KH
2013-01-26 18:41       ` Neil Horman
2013-01-28 12:25   ` Gerd Hoffmann
2013-01-31 22:06     ` Andy King
2013-02-01  8:12       ` Gerd Hoffmann [this message]
2013-02-04 23:41         ` Andy King
  -- strict thread matches above, loose matches on Subject: below --
2013-02-04 23:26 [PATCH 0/1] VM Sockets for Linux upstreaming Andy King
2013-02-04 23:26 ` [PATCH 1/1] VSOCK: Introduce VM Sockets Andy King
2013-02-07  0:23 [PATCH 0/1] VM Sockets for Linux upstreaming Andy King
2013-02-07  0:23 ` [PATCH 1/1] VSOCK: Introduce VM Sockets Andy King
2013-02-11 14:22   ` Gerd Hoffmann
2013-02-12 15:21     ` Andy King
2013-02-13 11:06       ` Gerd Hoffmann
2013-02-14  3:20         ` Andy King
2013-02-14  9:28           ` Gerd Hoffmann
2013-02-12 10:58   ` Gerd Hoffmann
2013-02-13  3:23     ` Andy King
2013-02-13 12:44   ` Gerd Hoffmann
2013-02-14  3:07     ` Andy King
2013-02-18 16:56     ` Andy King
2013-02-14 11:05   ` Gerd Hoffmann
2013-02-18 17:07     ` Andy King
2013-02-19  8:45       ` Gerd Hoffmann
2013-02-14 20:18   ` Sasha Levin
2013-02-18 17:09     ` Andy King
2013-02-15 10:32   ` Gerd Hoffmann

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=510B78E6.3000602@redhat.com \
    --to=kraxel@redhat.com \
    --cc=acking@vmware.com \
    --cc=davem@davemloft.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pv-drivers@vmware.com \
    --cc=virtualization@lists.linux-foundation.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 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).