From: Eric Blake <eblake@redhat.com>
To: "Eugenio Pérez" <eperezma@redhat.com>, qemu-devel@nongnu.org
Cc: Parav Pandit <parav@mellanox.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Jason Wang <jasowang@redhat.com>,
Juan Quintela <quintela@redhat.com>,
Markus Armbruster <armbru@redhat.com>,
virtualization@lists.linux-foundation.org,
Harpreet Singh Anand <hanand@xilinx.com>,
Xiao W Wang <xiao.w.wang@intel.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
Eli Cohen <eli@mellanox.com>,
Stefano Garzarella <sgarzare@redhat.com>,
Michael Lilja <ml@napatech.com>,
Jim Harford <jim.harford@broadcom.com>,
Rob Miller <rob.miller@broadcom.com>
Subject: Re: [RFC 08/10] vhost: Add x-vhost-enable-shadow-vq qmp
Date: Tue, 2 Feb 2021 09:38:33 -0600 [thread overview]
Message-ID: <4ab76cf6-401b-97de-6154-2e025cb1ebc6@redhat.com> (raw)
In-Reply-To: <20210129205415.876290-9-eperezma@redhat.com>
On 1/29/21 2:54 PM, Eugenio Pérez wrote:
> Command to enable shadow virtqueue looks like:
>
> { "execute": "x-vhost-enable-shadow-vq", "arguments": { "name": "dev0", "enable": true } }
>
> Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
> ---
> qapi/net.json | 23 +++++++++++++++++++++++
> hw/virtio/vhost.c | 6 ++++++
> 2 files changed, 29 insertions(+)
>
> diff --git a/qapi/net.json b/qapi/net.json
> index c31748c87f..6170d69798 100644
> --- a/qapi/net.json
> +++ b/qapi/net.json
> @@ -77,6 +77,29 @@
> ##
> { 'command': 'netdev_del', 'data': {'id': 'str'} }
>
> +##
> +# @x-vhost-enable-shadow-vq:
This spelling is the preferred form...[1]
> +#
> +# Use vhost shadow virtqueue.
> +#
> +# @name: the device name of the virtual network adapter
> +#
> +# @enable: true to use he alternate shadow VQ notification path
> +#
> +# Returns: Error if failure, or 'no error' for success
This line...[2]
> +#
> +# Since: 5.3
The next release is 6.0, not 5.3.
> +#
> +# Example:
> +#
> +# -> { "execute": "x-vhost_enable_shadow_vq", "arguments": {"enable": true} }
[1]...but doesn't match the example.
> +# <- { "return": { "enabled" : true } }
[2]...doesn't match this comment. I'd just drop the line, since there
is no explicit return listed.
> +#
> +##
> +{ 'command': 'x-vhost-enable-shadow-vq',
> + 'data': {'name': 'str', 'enable': 'bool'},
> + 'if': 'defined(CONFIG_VHOST_KERNEL)' }
> +
> ##
> # @NetLegacyNicOptions:
> #
> diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
> index 040f68ff2e..42836e45f3 100644
> --- a/hw/virtio/vhost.c
> +++ b/hw/virtio/vhost.c
> @@ -15,6 +15,7 @@
>
> #include "qemu/osdep.h"
> #include "qapi/error.h"
> +#include "qapi/qapi-commands-net.h"
> #include "hw/virtio/vhost.h"
> #include "qemu/atomic.h"
> #include "qemu/range.h"
> @@ -1841,3 +1842,8 @@ int vhost_net_set_backend(struct vhost_dev *hdev,
>
> return -1;
> }
> +
> +void qmp_x_vhost_enable_shadow_vq(const char *name, bool enable, Error **errp)
> +{
> + error_setg(errp, "Shadow virtqueue still not implemented.");
error_setg() should not be passed a trailing '.'.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
next prev parent reply other threads:[~2021-02-02 15:55 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-29 20:54 [RFC 00/10] vDPA shadow virtqueue - notifications forwarding Eugenio Pérez
2021-01-29 20:54 ` [RFC 01/10] virtio: Add virtqueue_set_handler Eugenio Pérez
2021-01-29 20:54 ` [RFC 02/10] virtio: Add set_vq_handler Eugenio Pérez
2021-01-29 20:54 ` [RFC 03/10] virtio: Add virtio_queue_get_idx Eugenio Pérez
2021-02-01 6:10 ` Jason Wang
2021-02-01 7:20 ` Eugenio Perez Martin
2021-01-29 20:54 ` [RFC 04/10] virtio: Add virtio_queue_host_notifier_status Eugenio Pérez
2021-01-29 20:54 ` [RFC 05/10] vhost: Add vhost_dev_from_virtio Eugenio Pérez
2021-02-01 6:12 ` Jason Wang
2021-02-01 8:28 ` Eugenio Perez Martin
2021-02-02 3:31 ` Jason Wang
2021-02-02 10:17 ` Eugenio Perez Martin
2021-02-04 3:14 ` Jason Wang
2021-02-04 9:25 ` Eugenio Perez Martin
2021-02-05 3:51 ` Jason Wang
2021-02-09 15:35 ` Eugenio Perez Martin
2021-02-10 5:54 ` Jason Wang
2021-01-29 20:54 ` [RFC 06/10] vhost: Save masked_notifier state Eugenio Pérez
2021-01-29 20:54 ` [RFC 07/10] vhost: Add VhostShadowVirtqueue Eugenio Pérez
2021-01-29 20:54 ` [RFC 08/10] vhost: Add x-vhost-enable-shadow-vq qmp Eugenio Pérez
2021-02-02 15:38 ` Eric Blake [this message]
2021-02-04 9:01 ` Eugenio Perez Martin
2021-02-04 12:16 ` Markus Armbruster
2021-02-04 14:03 ` Eugenio Perez Martin
2021-01-29 20:54 ` [RFC 09/10] vhost: Route guest->host notification through shadow virtqueue Eugenio Pérez
2021-02-01 6:29 ` Jason Wang
2021-02-02 10:08 ` Eugenio Perez Martin
2021-02-04 3:26 ` Jason Wang
2021-02-09 15:02 ` Eugenio Perez Martin
2021-02-10 5:57 ` Jason Wang
2021-01-29 20:54 ` [RFC 10/10] vhost: Route host->guest " Eugenio Pérez
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=4ab76cf6-401b-97de-6154-2e025cb1ebc6@redhat.com \
--to=eblake@redhat.com \
--cc=armbru@redhat.com \
--cc=eli@mellanox.com \
--cc=eperezma@redhat.com \
--cc=hanand@xilinx.com \
--cc=jasowang@redhat.com \
--cc=jim.harford@broadcom.com \
--cc=ml@napatech.com \
--cc=mst@redhat.com \
--cc=parav@mellanox.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=rob.miller@broadcom.com \
--cc=sgarzare@redhat.com \
--cc=stefanha@redhat.com \
--cc=virtualization@lists.linux-foundation.org \
--cc=xiao.w.wang@intel.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).