From: Stefan Hajnoczi <stefanha@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: mst@redhat.com, jag.raman@oracle.com, qemu-devel@nongnu.org,
sgarzare@redhat.com
Subject: Re: [PATCH 2/3] docs: vhost-user: rewrite section on ring state machine
Date: Mon, 1 Mar 2021 10:16:32 +0000 [thread overview]
Message-ID: <YDy/ABOolQwqqFOp@stefanha-x1.localdomain> (raw)
In-Reply-To: <20210226143413.188046-3-pbonzini@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 3919 bytes --]
On Fri, Feb 26, 2021 at 09:34:12AM -0500, Paolo Bonzini wrote:
> This section is using the word "back-end" to refer to the
> "slave's back-end", and talking about the "client" for
> what the rest of the document calls the "slave".
>
> Rework it to free the use of the term "back-end", which in
> the next patch will replace "slave".
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> docs/interop/vhost-user.rst | 46 +++++++++++++++++--------------------
> 1 file changed, 21 insertions(+), 25 deletions(-)
>
> diff --git a/docs/interop/vhost-user.rst b/docs/interop/vhost-user.rst
> index 6bbc092958..028ff98eac 100644
> --- a/docs/interop/vhost-user.rst
> +++ b/docs/interop/vhost-user.rst
> @@ -307,40 +307,36 @@ bit was dedicated for this purpose::
>
> #define VHOST_USER_F_PROTOCOL_FEATURES 30
>
> -Starting and stopping rings
> ----------------------------
> +Ring states
> +-----------
>
> -Client must only process each ring when it is started.
> +Rings can be in one of three states:
>
> -Client must only pass data between the ring and the backend, when the
> -ring is enabled.
> +* stopped: the slave must not process the ring at all.
>
> -If ring is started but disabled, client must process the ring without
> -talking to the backend.
> +* started but disabled: the slave must process the ring without
> + causing any side effects. For example, for a networking device,
> + in the disabled state the slave must not supply any new RX packets,
> + but must process and discard any TX packets.
>
> -For example, for a networking device, in the disabled state client
> -must not supply any new RX packets, but must process and discard any
> -TX packets.
> +* started and enabled.
>
> -If ``VHOST_USER_F_PROTOCOL_FEATURES`` has not been negotiated, the
> -ring is initialized in an enabled state.
> +Each ring is initialized in a stopped state. The slave must start
> +ring upon receiving a kick (that is, detecting that file descriptor is
s/ring/the ring/
> +readable) on the descriptor specified by ``VHOST_USER_SET_VRING_KICK``
> +or receiving the in-band message ``VHOST_USER_VRING_KICK`` if negotiated,
> +and stop ring upon receiving ``VHOST_USER_GET_VRING_BASE``.
s/ring/the ring/
>
> -If ``VHOST_USER_F_PROTOCOL_FEATURES`` has been negotiated, the ring is
> -initialized in a disabled state. Client must not pass data to/from the
> -backend until ring is enabled by ``VHOST_USER_SET_VRING_ENABLE`` with
> -parameter 1, or after it has been disabled by
> -``VHOST_USER_SET_VRING_ENABLE`` with parameter 0.
> +Rings can be enabled or disabled by ``VHOST_USER_SET_VRING_ENABLE``.
>
> -Each ring is initialized in a stopped state, client must not process
> -it until ring is started, or after it has been stopped.
> +If ``VHOST_USER_F_PROTOCOL_FEATURES`` has not been negotiated, the
> +ring starts directly in the enabled state.
"starts" can be confused with the started ring state but is used to mean
"initialized" above. The following is clearer:
"ring is initialized to the stopped but enabled state"
>
> -Client must start ring upon receiving a kick (that is, detecting that
> -file descriptor is readable) on the descriptor specified by
> -``VHOST_USER_SET_VRING_KICK`` or receiving the in-band message
> -``VHOST_USER_VRING_KICK`` if negotiated, and stop ring upon receiving
> -``VHOST_USER_GET_VRING_BASE``.
> +If ``VHOST_USER_F_PROTOCOL_FEATURES`` has been negotiated, the ring is
> +initialized in a disabled state and is enabled by
> +``VHOST_USER_SET_VRING_ENABLE`` with parameter 1.
>
> -While processing the rings (whether they are enabled or not), client
> +While processing the rings (whether they are enabled or not), the slave
> must support changing some configuration aspects on the fly.
>
> Multiple queue support
> --
> 2.26.2
>
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2021-03-01 10:17 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-26 14:34 [PATCH 0/3] docs: replace master/slave with more accurate wording Paolo Bonzini
2021-02-26 14:34 ` [PATCH 1/3] docs: vhost-user: clean up request/reply description Paolo Bonzini
2021-03-01 8:12 ` Philippe Mathieu-Daudé
2021-03-01 10:16 ` Stefan Hajnoczi
2021-03-01 10:32 ` Stefano Garzarella
2021-03-01 10:49 ` Paolo Bonzini
2021-03-01 11:33 ` Alex Bennée
2021-02-26 14:34 ` [PATCH 2/3] docs: vhost-user: rewrite section on ring state machine Paolo Bonzini
2021-03-01 10:16 ` Stefan Hajnoczi [this message]
2021-02-26 14:34 ` [PATCH 3/3] docs: vhost-user: replace master/slave with front-end/back-end Paolo Bonzini
2021-03-01 10:23 ` Stefan Hajnoczi
2021-03-01 10:48 ` Paolo Bonzini
2021-02-26 14:48 ` [PATCH 0/3] docs: replace master/slave with more accurate wording Jag Raman
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=YDy/ABOolQwqqFOp@stefanha-x1.localdomain \
--to=stefanha@redhat.com \
--cc=jag.raman@oracle.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=sgarzare@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).