From: Arseny Krasnov <arseny.krasnov@kaspersky.com>
To: cohuck@redhat.com, virtio-comment@lists.oasis-open.org,
Stefan Hajnoczi <stefanha@redhat.com>,
Stefano Garzarella <sgarzare@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Jason Wang <jasowang@redhat.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Arseny Krasnov <arseny.krasnov@kaspersky.com>,
Jorgen Hansen <jhansen@vmware.com>,
Norbert Slusarek <nslusarek@gmx.net>,
Andra Paraschiv <andraprs@amazon.com>,
Colin Ian King <colin.king@canonical.com>
Cc: virtualization@lists.linux-foundation.org, oxffffaa@gmail.com
Subject: [virtio-comment] [PATCH v6 2/2] virtio-vsock: SOCK_SEQPACKET description
Date: Mon, 24 May 2021 21:34:15 +0300 [thread overview]
Message-ID: <20210524183420.2514296-1-arseny.krasnov@kaspersky.com> (raw)
In-Reply-To: <20210524183232.2513690-1-arseny.krasnov@kaspersky.com>
This adds description of SOCK_SEQPACKET socket type
support for virtio-vsock.
Signed-off-by: Arseny Krasnov <arseny.krasnov@kaspersky.com>
---
virtio-vsock.tex | 26 +++++++++++++++++++++-----
1 file changed, 21 insertions(+), 5 deletions(-)
diff --git a/virtio-vsock.tex b/virtio-vsock.tex
index ad57f9d..9ef2b0e 100644
--- a/virtio-vsock.tex
+++ b/virtio-vsock.tex
@@ -16,7 +16,10 @@ \subsection{Virtqueues}\label{sec:Device Types / Socket Device / Virtqueues}
\subsection{Feature bits}\label{sec:Device Types / Socket Device / Feature bits}
-There are currently no feature bits defined for this device.
+\begin{description}
+\item VIRTIO_VSOCK_F_SEQPACKET (1) SOCK_SEQPACKET socket type is
+ supported.
+\end{description}
\subsection{Device configuration layout}\label{sec:Device Types / Socket Device / Device configuration layout}
@@ -135,15 +138,17 @@ \subsubsection{Addressing}\label{sec:Device Types / Socket Device / Device Opera
consists of a (cid, port number) tuple. The header fields used for this are
\field{src_cid}, \field{src_port}, \field{dst_cid}, and \field{dst_port}.
-Currently only stream sockets are supported. \field{type} is 1 (VIRTIO_VSOCK_TYPE_STREAM)
-for stream socket types.
+Currently stream and seqpacket sockets are supported. \field{type} is 1 (VIRTIO_VSOCK_TYPE_STREAM)
+for stream socket types, and 2 (VIRTIO_VSOCK_TYPE_SEQPACKET) for seqpacket socket types.
\begin{lstlisting}
-#define VIRTIO_VSOCK_TYPE_STREAM 1
+#define VIRTIO_VSOCK_TYPE_STREAM 1
+#define VIRTIO_VSOCK_TYPE_SEQPACKET 2
\end{lstlisting}
Stream sockets provide in-order, guaranteed, connection-oriented delivery
-without message boundaries.
+without message boundaries. Seqpacket sockets provide in-order, guaranteed,
+connection-oriented delivery with message boundaries.
\subsubsection{Buffer Space Management}\label{sec:Device Types / Socket Device / Device Operation / Buffer Space Management}
\field{buf_alloc} and \field{fwd_cnt} are used for buffer space management of
@@ -244,6 +249,17 @@ \subsubsection{Stream Sockets}\label{sec:Device Types / Socket Device / Device O
destination) address tuple for a new connection while the other peer is still
processing the old connection.
+\subsubsection{Seqpacket Sockets}\label{sec:Device Types / Socket Device / Device Operation / Seqpacket Sockets}
+
+\paragraph{Message boundaries}\label{sec:Device Types / Socket Device / Device Operation / Seqpacket Sockets / Message boundaries}
+
+To provide message boundaries, last RW packet of each message has VIRTIO_VSOCK_SEQ_EOR
+bit (bit 0) set in the \field{flags} of packet's header.
+
+\begin{lstlisting}
+#define VIRTIO_VSOCK_SEQ_EOR 1
+\end{lstlisting}
+
\subsubsection{Device Events}\label{sec:Device Types / Socket Device / Device Operation / Device Events}
Certain events are communicated by the device to the driver using the event
--
2.25.1
This publicly archived list offers a means to provide input to the
OASIS Virtual I/O Device (VIRTIO) TC.
In order to verify user consent to the Feedback License terms and
to minimize spam in the list archive, subscription is required
before posting.
Subscribe: virtio-comment-subscribe@lists.oasis-open.org
Unsubscribe: virtio-comment-unsubscribe@lists.oasis-open.org
List help: virtio-comment-help@lists.oasis-open.org
List archive: https://lists.oasis-open.org/archives/virtio-comment/
Feedback License: https://www.oasis-open.org/who/ipr/feedback_license.pdf
List Guidelines: https://www.oasis-open.org/policies-guidelines/mailing-lists
Committee: https://www.oasis-open.org/committees/virtio/
Join OASIS: https://www.oasis-open.org/join/
next prev parent reply other threads:[~2021-05-24 18:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-24 18:32 [virtio-comment] [PATCH v6 0/2] virtio-vsock: introduce SOCK_SEQPACKET description Arseny Krasnov
2021-05-24 18:33 ` [virtio-comment] [PATCH v6 1/2] virtio-vsock: use C style defines for constants Arseny Krasnov
2021-06-18 14:47 ` Stefano Garzarella
2021-06-18 14:47 ` [virtio-comment] " Stefano Garzarella
2021-05-24 18:34 ` Arseny Krasnov [this message]
2021-06-18 14:49 ` [PATCH v6 2/2] virtio-vsock: SOCK_SEQPACKET description Stefano Garzarella
2021-06-18 14:49 ` [virtio-comment] " Stefano Garzarella
2021-05-27 13:15 ` [virtio-comment] [PATCH v6 0/2] virtio-vsock: introduce " Stefano Garzarella
2021-05-27 13:15 ` Stefano Garzarella
2021-06-15 3:59 ` Arseny Krasnov
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=20210524183420.2514296-1-arseny.krasnov@kaspersky.com \
--to=arseny.krasnov@kaspersky.com \
--cc=andraprs@amazon.com \
--cc=cohuck@redhat.com \
--cc=colin.king@canonical.com \
--cc=davem@davemloft.net \
--cc=jasowang@redhat.com \
--cc=jhansen@vmware.com \
--cc=kuba@kernel.org \
--cc=mst@redhat.com \
--cc=nslusarek@gmx.net \
--cc=oxffffaa@gmail.com \
--cc=sgarzare@redhat.com \
--cc=stefanha@redhat.com \
--cc=virtio-comment@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 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.