From: David Vrabel <david.vrabel@citrix.com>
To: Xen-devel@lists.xen.org
Cc: Philip Tricca <philip.tricca@citrix.com>,
Vincent Hanquez <vincent.hanquez@citrix.com>,
Ross Philipson <Ross.Philipson@citrix.com>
Subject: Re: Inter-domain Communication using Virtual Sockets (high-level design)
Date: Wed, 30 Oct 2013 14:51:32 +0000 [thread overview]
Message-ID: <52711CF4.2010808@citrix.com> (raw)
In-Reply-To: <51B76754.7040800@citrix.com>
On 11/06/13 19:07, David Vrabel wrote:
> All,
>
> This is a high-level design document for an inter-domain communication
> system under the virtual sockets API (AF_VSOCK) recently added to Linux.
>
> Two low-level transports are discussed: a shared ring based one
> requiring no additional hypervisor support and v4v.
>
> The PDF (including the diagrams) is available here:
>
> http://xenbits.xen.org/people/dvrabel/inter-domain-comms-C.pdf
This design was mentioned in a Xen Dev. Summit presentation and I was
reminded of the prototype I wrote a while back. I haven't yet had the
time to update the design document to reflect the outcome of the prototype.
The prototype is available in this git repo:
git://xenbits.xen.org/people/dvrabel/idc-prototype.git
The prototype is entirely in userspace. A daemon (one per domain) takes
the role of the kernel, providing a system call like interface to other
programs (via XML-RPC).
The calls provided (and their POSIX equivalents are):
idc_connect() (socket + bind + connect)
idc_disconnect() (close/shutdown)
idc_listen() (socket + bind + listen)
idc_accept() (accept)
idc_unlisten() (close)
idc_send() (send)
idc_recv() (recv)
All connections between two domains are multiplex over the same link.
The setup of the link is done via Xenstore (see link_mgr.c for the
sequence of operations) and connections are then requested using a
CONNECT_req/CONNECT_rsp pair over this link. The data link itself uses
libxenvchan.
Data is encapulated in DATA_ind messages.
Connections are disconnected with a DISCONNECT_ind message. If a link as
no further connections using it, it is disconnected. Disconnecting a
link requires no co-operation from the other peer (the DISCONNECT_ind is
advisory and has no response), so links can disconnected at any time if
the remote end is misbehaving.
The prototype has some key shortcomings:
It uses grant map/unmap and not grant copies. A replacement link
layer using only grant copies should just be a drop in replacement for
the existing use of libvchan.
The way the XML-RPC library was uses means it serializes all RPCs.
Simultaneous send/recv/accept/etc. is not possible as these calls may
block. This is only a limitation of the RPC implementation.
To run the demo/test programs:
Install libxenctrl, libxenstore, libxenvchan into each domain (DUT).
Run ./idc-setup domid... with all DUTs. This will setup the xenstore
keys to allows these domains to connect to each other.
Run ./link_mgr in each DUT.
In one domain run ./test_accept 80 to listen for a connection on
port 80.
In another domain run ./test_conn domid to connect.
David
prev parent reply other threads:[~2013-10-30 14:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-11 18:07 Inter-domain Communication using Virtual Sockets (high-level design) David Vrabel
2013-06-11 18:54 ` Andrew Cooper
2013-06-13 16:27 ` Tim Deegan
2013-06-17 16:19 ` David Vrabel
2013-06-20 11:15 ` Tim Deegan
2013-06-17 18:28 ` Ross Philipson
2013-06-20 11:05 ` David Vrabel
2013-06-20 11:30 ` Tim Deegan
2013-06-20 14:11 ` Ross Philipson
2013-10-30 14:51 ` David Vrabel [this message]
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=52711CF4.2010808@citrix.com \
--to=david.vrabel@citrix.com \
--cc=Ross.Philipson@citrix.com \
--cc=Xen-devel@lists.xen.org \
--cc=philip.tricca@citrix.com \
--cc=vincent.hanquez@citrix.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;
as well as URLs for NNTP newsgroup(s).