Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1715282
| From | Stefan Hajnoczi <stefanha@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH net-next 3/3] hv_sock: implements Hyper-V transport for Virtual Sockets (AF_VSOCK) |
| Date | 2017-08-18 18:00 +0200 |
| Message-ID | <ufRQK-5Ky-7@gated-at.bofh.it> (permalink) |
| References | <ufRQK-5Ky-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
On Tue, Aug 15, 2017 at 10:18:41PM +0000, Dexuan Cui wrote:
> +static u32 hvs_get_local_cid(void)
> +{
> + return VMADDR_CID_ANY;
> +}
Interesting concept: the guest never knows its CID. This is nice from a
live migration perspective. Currently VMCI and virtio adjust listen
socket local CIDs after migration.
> +static bool hvs_stream_allow(u32 cid, u32 port)
> +{
> + static const u32 valid_cids[] = {
> + VMADDR_CID_ANY,
Is this for loopback?
> + VMADDR_CID_HOST,
> + };
> + int i;
> +
> + /* The host's port range [MIN_HOST_EPHEMERAL_PORT, 0xFFFFFFFF) is
> + * reserved as ephemeral ports, which are used as the host's ports
> + * when the host initiates connections.
> + */
> + if (port > MAX_HOST_LISTEN_PORT)
> + return false;
Without this if statement the guest will attempt to connect. I guess
there will be no listen sockets above MAX_HOST_LISTEN_PORT, so the
connection attempt will fail.
...but hardcode this knowledge into the guest driver?
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
Re: [PATCH net-next 3/3] hv_sock: implements Hyper-V transport for Virtual Sockets (AF_VSOCK) Stefan Hajnoczi <stefanha@redhat.com> - 2017-08-18 18:00 +0200
Re: [PATCH net-next 3/3] hv_sock: implements Hyper-V transport for Virtual Sockets (AF_VSOCK) Stefan Hajnoczi <stefanha@redhat.com> - 2017-08-22 12:20 +0200
Re: [PATCH net-next 3/3] hv_sock: implements Hyper-V transport for Virtual Sockets (AF_VSOCK) Stefan Hajnoczi <stefanha@redhat.com> - 2017-08-24 18:00 +0200
csiph-web