qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: "Marc-André Lureau" <marcandre.lureau@redhat.com>, qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2 01/12] vhost-user: define conventions for vhost-user backends
Date: Thu, 7 Feb 2019 11:42:39 -0600	[thread overview]
Message-ID: <a89d56aa-2f16-093f-a406-35db0e0c69f8@redhat.com> (raw)
In-Reply-To: <20190207165449.6125-2-marcandre.lureau@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 4103 bytes --]

On 2/7/19 10:54 AM, Marc-André Lureau wrote:
> As discussed during "[PATCH v4 00/29] vhost-user for input & GPU"
> review, let's define a common set of backend conventions to help with
> management layer implementation, and interoperability.
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>  MAINTAINERS                  |   1 +
>  docs/interop/vhost-user.json | 219 +++++++++++++++++++++++++++++++++++
>  docs/interop/vhost-user.txt  | 101 +++++++++++++++-
>  3 files changed, 319 insertions(+), 2 deletions(-)
>  create mode 100644 docs/interop/vhost-user.json

> +##
> +# @VHostUserBackendType:
> +#
> +# List the various vhost user backend types.
> +#
> +# @net: virtio net
> +# @block: virtio block
> +# @console: virtio console
> +# @rng: virtio rng
> +# @balloon: virtio balloon
> +# @rpmsg: virtio remote processor messaging
> +# @scsi: virtio scsi
> +# @9p: 9p virtio console
> +# @rproc-serial: virtio remoteproc serial link
> +# @caif: virtio caif
> +# @gpu: virtio gpu
> +# @input: virtio input
> +# @vsock: virtio vsock transport
> +# @crypto: virtio crypto
> +#
> +# Since: 3.2

s/3.2/4.0/g in your patch series

> +##
> +{
> +  'enum': 'VHostUserBackendType',
> +  'data': [ 'net', 'block', 'console', 'rng', 'balloon', 'rpmsg',
> +            'scsi', '9p', 'rproc-serial', 'caif', 'gpu', 'input', 'vsock',
> +            'crypto' ]
> +}

Worth alphabetizing? Not a strong requirement, though, if this order
makes more sense.


> +#
> +# Top-down, the list of directories goes from general to specific.
> +#
> +# Management software should build a list of files from all three
> +# locations, then sort the list by filename (i.e., last pathname

perhaps s/filename/basename/

> +# component). Management software should choose the first JSON file on
> +# the sorted list that matches the search criteria. If a more specific
> +# directory has a file with same name as a less specific directory, then
> +# the file in the more specific directory takes effect. If the more
> +# specific file is zero length, it hides the less specific one.
> +#

> +++ b/docs/interop/vhost-user.txt
> @@ -17,8 +17,13 @@ The protocol defines 2 sides of the communication, master and slave. Master is
>  the application that shares its virtqueues, in our case QEMU. Slave is the
>  consumer of the virtqueues.
>  
> -In the current implementation QEMU is the Master, and the Slave is intended to
> -be a software Ethernet switch running in user space, such as Snabbswitch.
> +In the current implementation QEMU is the Master, and the Slave is the
> +external process consuming the virtio queues, for example a software
> +Ethernet switch running in user space, such as Snabbswitch, or a block

Is 'slirp' any better than 'Snabbswitch' as a demonstration of
user-space networking?

> +device backend processing read & write to a virtual disk. In order to
> +facilitate interoperability between various backend implementations,
> +it is recommended to follow the "Backend program conventions"
> +described in this document.
>  

> +
> +The backend program must end (as quickly and cleanly as possible) when
> +the SIGTERM signal is received. Eventually, it may be SIGKILL by the

s/be/receive/

> +management layer after a few seconds.
> +
> +The following command line options have an expected behaviour. They
> +are mandatory, unless explicitly said differently:
> +
> +* --socket-path=PATH
> +
> +This option specify the location of the vhost-user Unix domain socket.
> +It is incompatible with --fd.
> +
> +* --fd=FDNUM
> +
> +When this argument is given, the backend program is started with the
> +vhost-user socket as file descriptor FDNUM. It is incompatible with
> +--socket-path.

Do we also want to require support for systemd-style
LISTEN_PID/LISTEN_FDS socket activation?

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2019-02-07 17:42 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-07 16:54 [Qemu-devel] [PATCH v2 00/12] vhost-user-backend & vhost-user-input Marc-André Lureau
2019-02-07 16:54 ` [Qemu-devel] [PATCH v2 01/12] vhost-user: define conventions for vhost-user backends Marc-André Lureau
2019-02-07 17:42   ` Eric Blake [this message]
2019-02-07 18:45     ` Marc-André Lureau
2019-02-07 16:54 ` [Qemu-devel] [PATCH v2 02/12] vhost-user: simplify vhost_user_init/vhost_user_cleanup Marc-André Lureau
2019-02-07 16:54 ` [Qemu-devel] [PATCH v2 03/12] libvhost-user: exit by default on VHOST_USER_NONE Marc-André Lureau
2019-02-07 16:54 ` [Qemu-devel] [PATCH v2 04/12] vhost-user: wrap some read/write with retry handling Marc-André Lureau
2019-02-07 16:54 ` [Qemu-devel] [PATCH v2 05/12] Add vhost-user-backend Marc-André Lureau
2019-02-07 17:36   ` Michael S. Tsirkin
2019-02-07 18:29     ` Marc-André Lureau
2019-02-07 19:18       ` Michael S. Tsirkin
2019-02-08 11:15         ` Marc-André Lureau
2019-02-07 16:54 ` [Qemu-devel] [PATCH v2 06/12] vhost-user: split vhost_user_read() Marc-André Lureau
2019-02-07 16:54 ` [Qemu-devel] [PATCH v2 07/12] vhost-user: add vhost_user_input_get_config() Marc-André Lureau
2019-02-07 16:54 ` [Qemu-devel] [PATCH v2 08/12] libvhost-user-glib: export vug_source_new() Marc-André Lureau
2019-02-07 16:54 ` [Qemu-devel] [PATCH v2 09/12] libvhost-user: add vu_queue_unpop() Marc-André Lureau
2019-02-07 16:54 ` [Qemu-devel] [PATCH v2 10/12] Add vhost-user-input-pci Marc-André Lureau
2019-02-07 16:54 ` [Qemu-devel] [PATCH v2 11/12] contrib: add vhost-user-input Marc-André Lureau
2019-02-07 16:54 ` [Qemu-devel] [PATCH v2 12/12] RFC: add explicit can_migrate to vhost_user_backend_dev_init() Marc-André Lureau

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=a89d56aa-2f16-093f-a406-35db0e0c69f8@redhat.com \
    --to=eblake@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).