All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bobby Eshleman <beshleman.devbox@gmail.com>
To: Stefano Garzarella <sgarzare@redhat.com>
Cc: mst@redhat.com, cohuck@redhat.com,
	virtio-comment@lists.oasis-open.org, cong.wang@bytedance.com,
	duanxiongchun@bytedance.com, jiang.wang@bytedance.com,
	virtualization@lists.linux-foundation.org,
	xieyongji@bytedance.com, chaiwen.cc@bytedance.com,
	stefanha@redhat.com, asias@redhat.com,
	arseny.krasnov@kaspersky.com, jhansen@vmware.com,
	bobby.eshleman@bytedance.com
Subject: Re: [virtio-comment] [PATCH v5 1/2] virtio-vsock: add description for datagram type
Date: Sat, 5 Mar 2022 01:25:57 +0000	[thread overview]
Message-ID: <20220305012042.f7hyhjjdy563mcn2@ip-10-100-118-60.ec2.internal> (raw)
In-Reply-To: <20220303102339.gd4yverxjb5mt3fb@sgarzare-redhat>

On Thu, Mar 03, 2022 at 11:23:39AM +0100, Stefano Garzarella wrote:
> On Thu, Mar 03, 2022 at 03:29:31AM +0000, Bobby Eshleman wrote:
> > 
> > > > \drivernormative{\paragraph}{Device Operation: Receive and Transmit}{Device Types / Socket Device / Device Operation / Receive and Transmit}
> > > >
> > > > The \field{guest_cid} configuration field MUST be used as the source CID when
> > > > @@ -274,6 +309,14 @@ \subsubsection{Seqpacket Sockets}\label{sec:Device Types / Socket Device / Devic
> > > > #define VIRTIO_VSOCK_SEQ_EOR (1 << 1)
> > > > \end{lstlisting}
> > > >
> > > > +\subsubsection{Datagram Sockets}\label{sec:Device Types / Socket Device / Device Operation / Datagram Sockets}
> > > > +
> > > > +Datagram (dgram) sockets are connectionless and unreliable. The sender just sends
> > > > +a message to the peer and hopes it will be delivered. A VIRTIO_VSOCK_OP_RST reply is sent if
> > > > +a receiving socket does not exist on the destination.
> > > > +If the transmission or receiving buffers are full, the packets
> > > > +are dropped.
> > > > +
> > > 
> > > I'm not sure we should respond with RST if there's no socket bind on
> > > the port.
> > > 
> > > What happens with UDP if we do a sendto to a closed port?
> > > 
> > > Thanks,
> > > Stefano
> > > 
> > 
> > With UDP this results in an ICMP Destination Unreachable message, which
> > is explicitly not UDP but is experienced by the application nonetheless.
> > There was some discussion from v1, and the design choice essentially
> > came down to "how much do we want to be emulating of ICMP inside
> > vsock?"
> 
> Okay, I see, but how this is propagate to the userspace?
> 
> IIUC for UDP the user should open a RAW socket with IPPROTO_ICMP and wait
> for an error message.
> 

I'll write a sample test for this and get back to you, just to be certain.

... snip ...

> Have you taken a look at a possible implementation with AF_VSOCK yet?
> 
> In any case if it can be useful we could include it in the spec and then
> implement it later in Linux.

I have not yet, and from my reading of the code it was not in Jiang's Linux
series yet.

Although I understand the logic behind it, I can't say I'm totally confident in
this yet. It is carry over from v4 and has roots in a discussion between
stefanha and cong.wong in the RFC thread "[RFC PATCH] virtio-vsock: add
description for datagram type" (sorry I don't have the Message-Id, it was just
forwarded to me, and it is missing from lore.kernel.org for some reason).

I'll look into it more deeply in terms of a potential AF_VSOCK implementation
and build a stronger case for/against in the next rev.

Thanks,
Bobby


  reply	other threads:[~2022-03-05  1:25 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-28  4:01 [RFC v4] virtio-vsock: add description for datagram type Jiang Wang
2021-05-28  4:01 ` [virtio-comment] " Jiang Wang
2021-06-07 18:45 ` Jiang Wang .
2021-06-07 18:45   ` [virtio-comment] " Jiang Wang .
2021-06-08 13:46 ` Stefano Garzarella
2021-06-08 13:46   ` [virtio-comment] " Stefano Garzarella
2021-06-09  4:22   ` [External] " Jiang Wang .
2021-06-09  4:22     ` [virtio-comment] " Jiang Wang .
2021-06-09  7:17     ` Stefano Garzarella
2021-06-09  7:17       ` [virtio-comment] " Stefano Garzarella
2021-06-10  3:31       ` Jiang Wang .
2021-06-10  3:31         ` [virtio-comment] " Jiang Wang .
2021-06-10  6:56         ` Stefano Garzarella
2021-06-10  6:56           ` [virtio-comment] " Stefano Garzarella
2022-02-24 21:57 ` [PATCH v5 0/2] Support vsock datagram and mergeable buffers beshleman.devbox
2022-02-24 21:57   ` [PATCH v5 1/2] virtio-vsock: add description for datagram type beshleman.devbox
2022-02-24 21:57   ` [PATCH v5 2/2] virtio-vsock: add mergeable buffer feature bit beshleman.devbox
2022-02-24 22:15 ` [PATCH v5 0/2] Support vsock datagram and mergeable buffers beshleman.devbox
2022-02-24 22:15   ` [PATCH v5 1/2] virtio-vsock: add description for datagram type beshleman.devbox
2022-03-02 16:09     ` [virtio-comment] " Stefano Garzarella
2022-03-02 16:09       ` Stefano Garzarella
2022-03-03  3:29       ` Bobby Eshleman
2022-03-03  7:15         ` Michael S. Tsirkin
2022-03-03  7:15           ` Michael S. Tsirkin
2022-03-05  1:25           ` Bobby Eshleman
2022-03-06 10:17             ` Michael S. Tsirkin
2022-03-06 10:17               ` Michael S. Tsirkin
2022-03-03 10:23         ` Stefano Garzarella
2022-03-03 10:23           ` Stefano Garzarella
2022-03-05  1:25           ` Bobby Eshleman [this message]
2022-03-03 11:41         ` Michael S. Tsirkin
2022-03-03 11:41           ` Michael S. Tsirkin
2022-03-07 17:41           ` Bobby Eshleman
2022-02-24 22:15   ` [PATCH v5 2/2] virtio-vsock: add mergeable buffer feature bit beshleman.devbox
2022-03-02 16:19     ` [virtio-comment] " Stefano Garzarella
2022-03-02 16:19       ` 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=20220305012042.f7hyhjjdy563mcn2@ip-10-100-118-60.ec2.internal \
    --to=beshleman.devbox@gmail.com \
    --cc=arseny.krasnov@kaspersky.com \
    --cc=asias@redhat.com \
    --cc=bobby.eshleman@bytedance.com \
    --cc=chaiwen.cc@bytedance.com \
    --cc=cohuck@redhat.com \
    --cc=cong.wang@bytedance.com \
    --cc=duanxiongchun@bytedance.com \
    --cc=jhansen@vmware.com \
    --cc=jiang.wang@bytedance.com \
    --cc=mst@redhat.com \
    --cc=sgarzare@redhat.com \
    --cc=stefanha@redhat.com \
    --cc=virtio-comment@lists.oasis-open.org \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=xieyongji@bytedance.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.