From: Matt Benjamin <mbenjamin@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: virtio-dev@lists.oasis-open.org,
"Michael S. Tsirkin" <mst@redhat.com>,
virtualization@lists.linux-foundation.org,
Christian Borntraeger <borntraeger@de.ibm.com>,
Claudio Imbrenda <imbrenda@linux.vnet.ibm.com>,
Christoffer Dall <christoffer.dall@linaro.org>
Subject: Re: [virtio-dev] virtio-vsock live migration
Date: Wed, 16 Mar 2016 10:58:01 -0400 (EDT) [thread overview]
Message-ID: <1738100539.67547322.1458140281107.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20160316143200.GA689@stefanha-x1.localdomain>
Hi,
----- Original Message -----
> From: "Stefan Hajnoczi" <stefanha@redhat.com>
> To: "Michael S. Tsirkin" <mst@redhat.com>
> > > > I think the right thing to do is just to teach guests
> > > > about 64 bit CIDs.
> > > >
> > > > For now, can we drop guest CID from guest to host communication
> > > > completely,
> > > > making CID only host-visible? Maybe leave the space
> > > > in the packet so we can add CID there later.
> > > > It seems that in theory this will allow changing CID
> > > > during migration, transparently to the guest.
> > > >
> > > > Guest visible CID is required for guest to guest communication -
> > > > but IIUC that is not currently supported.
> > > > Maybe that can be made conditional on 64 bit addressing.
> > > > Alternatively, it seems much easier to accept that these channels get
> > > > broken
> > > > across migration.
> > >
> > > I reached the conclusion that channels break across migration because:
> > >
> > > 1. 32-bit CIDs are in sockaddr_vm and we'd break AF_VSOCK ABI by
> > > changing it to 64-bit. Application code would be specific
> > > virtio-vsock and wouldn't work with other AF_VSOCK transports that
> > > use the 32-bit sockaddr_vm struct.
> >
> > You don't have to repeat the IPv6 mistake. Make all 32 bit CIDs
> > 64 bit CIDs by padding with 0s, then 64 bit apps can use
> > any CID.
> >
> > Old 32 bit CID applications will not be able to use the extended
> > addresses, but hardcoding bugs
> > does not seem sane.
>
> A mixed 32-bit and 64-bit CID world is complex. The host doesn't know
> in advance whether all applications (especially inside the guest) will
> support 64-bit CIDs or not. 32-bit CID applications won't work if a
> 64-bit CID has been assigned.
>
> It also opens up the question how unique CIDs are allocated across
> hosts.
>
> Given that AF_VSOCK in Linux already exists in the 32-bit CID version,
> I'd prefer to make virtio-vsock compatible with that for the time being.
> Extensions can be added in the future but just implementing existing
> AF_VSOCK semantics will already allow the applications to run.
>
> > > 2. Dropping guest CIDs from the protocol breaks network protocols that
> > > send addresses.
> >
> > Stick it in config space if you really have to.
> > But why do you need it on each packet?
>
> If packets are implicitly guest<->host then adding guest<->guest
> communication requires a virtio spec change. If packets contain
> source/destination CIDs then allowing/forbidding guest<->host or
> guest<->guest communication is purely a host policy decision. I think
> it's worth keeping that in from the start.
I'm just the downstream consumer of vsock, but this was my intuition, as well.
Matt
>
> > > NFS and netperf are the first two protocols I looked
> > > at and both transmit address information across the connection...
> >
> >
> Stefan
>
--
Matt Benjamin
Red Hat, Inc.
315 West Huron Street, Suite 140A
Ann Arbor, Michigan 48103
http://www.redhat.com/en/technologies/storage
tel. 734-707-0660
fax. 734-769-8938
cel. 734-216-5309
next prev parent reply other threads:[~2016-03-16 14:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-03 15:37 virtio-vsock live migration Stefan Hajnoczi
2016-03-10 23:56 ` Michael S. Tsirkin
2016-03-14 11:13 ` [virtio-dev] " Michael S. Tsirkin
[not found] ` <20160311014147-mutt-send-email-mst@redhat.com>
2016-03-15 15:10 ` Stefan Hajnoczi
[not found] ` <20160314130150-mutt-send-email-mst@redhat.com>
2016-03-15 15:15 ` [virtio-dev] " Stefan Hajnoczi
[not found] ` <20160315151529.GB26263@stefanha-x1.localdomain>
2016-03-15 16:12 ` Michael S. Tsirkin
[not found] ` <20160315180916-mutt-send-email-mst@redhat.com>
2016-03-16 14:32 ` Stefan Hajnoczi
2016-03-16 14:58 ` Matt Benjamin [this message]
2016-03-16 15:05 ` Michael S. Tsirkin
[not found] ` <20160316163344-mutt-send-email-mst@redhat.com>
2016-04-06 12:55 ` Stefan Hajnoczi
[not found] ` <20160406125550.GB17538@stefanha-x1.localdomain>
2016-04-06 13:17 ` Michael S. Tsirkin
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=1738100539.67547322.1458140281107.JavaMail.zimbra@redhat.com \
--to=mbenjamin@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=christoffer.dall@linaro.org \
--cc=imbrenda@linux.vnet.ibm.com \
--cc=mst@redhat.com \
--cc=stefanha@redhat.com \
--cc=virtio-dev@lists.oasis-open.org \
--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).