Discussion of the VIRTIO specification
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Stefano Garzarella <sgarzare@redhat.com>
Cc: virtio-comment@lists.oasis-open.org, jiang.wang@bytedance.com,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Arseniy Krasnov <AVKrasnov@sberdevices.ru>,
	bobby.eshleman@bytedance.com, Cornelia Huck <cohuck@redhat.com>
Subject: Re: [PATCH v2] virtio-vsock: add VIRTIO_VSOCK_F_NO_IMPLIED_STREAM feature bit
Date: Mon, 25 Jul 2022 07:44:10 -0400	[thread overview]
Message-ID: <20220725074404-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20220718142653.42310-1-sgarzare@redhat.com>

On Mon, Jul 18, 2022 at 04:26:53PM +0200, Stefano Garzarella wrote:
> Initially virtio-vsock only supported the stream type, which is why
> there was no feature. Later we added the seqpacket type and in the future
> we may have other types (e.g. datagram).
> 
> seqpacket is an extension of stream, so it might be implied that if
> seqpacket is supported, stream is too, but this might not be true for
> other types.
> 
> As we discussed here [1] should be better to add a new
> VIRTIO_VSOCK_F_NO_IMPLIED_STREAM feature bit to avoid this implication.
> 
> Let's also add normative sections to better define the behavior when
> VIRTIO_VSOCK_F_NO_IMPLIED_STREAM is negotiated or not.
> 
> [1] http://markmail.org/message/2s3qd74drgjxkvte
> 
> Suggested-by: Michael S. Tsirkin <mst@redhat.com>
> Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>

Acked-by: Michael S. Tsirkin <mst@redhat.com>

> ---
> v2:
> - rewrote better normative statements [Cornelia]
> - updated conformance.tex with the new sections [Cornelia]
> 
> v1: https://markmail.org/message/ybtl4trifrhjnkfe
> ---
>  conformance.tex  |  2 ++
>  virtio-vsock.tex | 28 ++++++++++++++++++++++++----
>  2 files changed, 26 insertions(+), 4 deletions(-)
> 
> diff --git a/conformance.tex b/conformance.tex
> index 663e7c3..98626ba 100644
> --- a/conformance.tex
> +++ b/conformance.tex
> @@ -229,6 +229,7 @@ \section{Conformance Targets}\label{sec:Conformance / Conformance Targets}
>  A socket driver MUST conform to the following normative statements:
>  
>  \begin{itemize}
> +\item \ref{drivernormative:Device Types / Socket Device / Feature bits}
>  \item \ref{drivernormative:Device Types / Socket Device / Device Operation / Buffer Space Management}
>  \item \ref{drivernormative:Device Types / Socket Device / Device Operation / Receive and Transmit}
>  \item \ref{drivernormative:Device Types / Socket Device / Device Operation / Device Events}
> @@ -500,6 +501,7 @@ \section{Conformance Targets}\label{sec:Conformance / Conformance Targets}
>  A socket device MUST conform to the following normative statements:
>  
>  \begin{itemize}
> +\item \ref{devicenormative:Device Types / Socket Device / Feature bits}
>  \item \ref{devicenormative:Device Types / Socket Device / Device Operation / Buffer Space Management}
>  \item \ref{devicenormative:Device Types / Socket Device / Device Operation / Receive and Transmit}
>  \end{itemize}
> diff --git a/virtio-vsock.tex b/virtio-vsock.tex
> index d79984d..b3ff45a 100644
> --- a/virtio-vsock.tex
> +++ b/virtio-vsock.tex
> @@ -16,15 +16,35 @@ \subsection{Virtqueues}\label{sec:Device Types / Socket Device / Virtqueues}
>  
>  \subsection{Feature bits}\label{sec:Device Types / Socket Device / Feature bits}
>  
> -If no feature bit is set, only stream socket type is supported.
> -If VIRTIO_VSOCK_F_SEQPACKET has been negotiated, the device MAY act
> -as if VIRTIO_VSOCK_F_STREAM has also been negotiated.
> -
>  \begin{description}
>  \item[VIRTIO_VSOCK_F_STREAM (0)] stream socket type is supported.
>  \item[VIRTIO_VSOCK_F_SEQPACKET (1)] seqpacket socket type is supported.
> +\item[VIRTIO_VSOCK_F_NO_IMPLIED_STREAM (2)] stream socket type is not implied.
>  \end{description}
>  
> +\drivernormative{\subsubsection}{Feature bits}{Device Types / Socket Device / Feature bits}
> +
> +The driver SHOULD accept the VIRTIO_VSOCK_F_NO_IMPLIED_STREAM feature if
> +offered by the device.
> +
> +If no feature bit has been negotiated, the driver SHOULD act as if
> +VIRTIO_VSOCK_F_STREAM has been negotiated.
> +
> +If VIRTIO_VSOCK_F_SEQPACKET has been negotiated, but not
> +VIRTIO_VSOCK_F_NO_IMPLIED_STREAM, the driver MAY act as if
> +VIRTIO_VSOCK_F_STREAM has also been negotiated.
> +
> +\devicenormative{\subsubsection}{Feature bits}{Device Types / Socket Device / Feature bits}
> +
> +The device SHOULD offer the VIRTIO_VSOCK_F_NO_IMPLIED_STREAM feature.
> +
> +If no feature bit has been negotiated, the device SHOULD act as if
> +VIRTIO_VSOCK_F_STREAM has been negotiated.
> +
> +If VIRTIO_VSOCK_F_SEQPACKET has been negotiated, but not
> +VIRTIO_VSOCK_F_NO_IMPLIED_STREAM, the device MAY act as if
> +VIRTIO_VSOCK_F_STREAM has also been negotiated.
> +
>  \subsection{Device configuration layout}\label{sec:Device Types / Socket Device / Device configuration layout}
>  
>  Socket device configuration uses the following layout structure:
> -- 
> 2.36.1


      parent reply	other threads:[~2022-07-25 11:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-18 14:26 [PATCH v2] virtio-vsock: add VIRTIO_VSOCK_F_NO_IMPLIED_STREAM feature bit Stefano Garzarella
2022-07-18 17:14 ` [virtio-comment] " Cornelia Huck
2022-07-18 18:17 ` [External] " Bobby Eshleman
2022-07-19  8:04   ` Stefano Garzarella
2022-08-01 21:53     ` Bobby Eshleman
2022-07-25 11:14 ` Stefano Garzarella
2022-07-25 11:44 ` Michael S. Tsirkin [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=20220725074404-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=AVKrasnov@sberdevices.ru \
    --cc=bobby.eshleman@bytedance.com \
    --cc=cohuck@redhat.com \
    --cc=jiang.wang@bytedance.com \
    --cc=sgarzare@redhat.com \
    --cc=stefanha@redhat.com \
    --cc=virtio-comment@lists.oasis-open.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