OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

virtio-comment message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [virtio-comment] [PATCH v5 1/2] virtio-vsock: add description for datagram type


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


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]