qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Yuanhan Liu <yuanhan.liu@linux.intel.com>, qemu-devel@nongnu.org
Cc: jasowang@redhat.com, mst@redhat.com,
	Changchun.ouyang@hotmail.com,
	Changchun Ouyang <changchun.ouyang@intel.com>
Subject: Re: [Qemu-devel] [PATCH v10 6/7] vhost-user: add multiple queue support
Date: Tue, 22 Sep 2015 08:44:18 -0600	[thread overview]
Message-ID: <56016942.6060105@redhat.com> (raw)
In-Reply-To: <1442588324-11365-7-git-send-email-yuanhan.liu@linux.intel.com>

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

On 09/18/2015 08:58 AM, Yuanhan Liu wrote:
> From: Changchun Ouyang <changchun.ouyang@intel.com>
> 
> This patch is initially based a patch from Nikolay Nikolaev.
> 
> This patch adds vhost-user multiple queue support, by creating a nc
> and vhost_net pair for each queue.
> 
> Qemu exits if find that the backend can't support number of requested

s/support/support the/

> queues (by providing queues=# option). The max number is queried by a
> new message, VHOST_USER_GET_QUEUE_NUM, and is sent only when protocol
> feature VHOST_USER_PROTOCOL_F_MQ is present first.
> 
> The max queue check is done at vhost-user initiation stage. We initiate
> one queue first, which, in the meantime, also gets the max_queues the
> backend supports.
> 
> In older version, it was reported that some messages are sent more times
> than necessary. Here we came an agreement with Michael that we could
> categorize vhost user messages to 2 types: non-vring specific messages,
> which should be sent only once, and vring specific messages, which should
> be sent per queue.
> 
> Here I introduced a helper function vhost_user_one_time_request(), which
> lists following messages as non-vring specific messages:
> 
>         VHOST_USER_SET_OWNER
>         VHOST_USER_RESET_DEVICE
>         VHOST_USER_SET_MEM_TABLE
>         VHOST_USER_GET_QUEUE_NUM
> 
> For above messages, we simply ignore them when they are not sent the first
> time.
> 
> Signed-off-by: Nikolay Nikolaev <n.nikolaev@virtualopensystems.com>
> Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
> Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
> 
> ---

Just focusing on the interface portions:

> +++ b/qapi-schema.json
> @@ -2480,12 +2480,16 @@
>  #
>  # @vhostforce: #optional vhost on for non-MSIX virtio guests (default: false).
>  #
> +# @queues: #optional number of queues to be created for multiqueue vhost-user
> +#          (default: 1) (Since 2.5)
> +#
>  # Since 2.1
>  ##
>  { 'struct': 'NetdevVhostUserOptions',
>    'data': {
>      'chardev':        'str',
> -    '*vhostforce':    'bool' } }
> +    '*vhostforce':    'bool',
> +    '*queues':        'int' } }
>  

Discoverable via introspection, and should work with the patches from
Zoltan and me that get QMP netdev_add converted over to qapi.

Interface is good to go.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


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

  parent reply	other threads:[~2015-09-22 14:44 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-18 14:58 [Qemu-devel] [PATCH v10 0/7] vhost-user multiple queue support Yuanhan Liu
2015-09-18 14:58 ` [Qemu-devel] [PATCH v10 1/7] vhost-user: use VHOST_USER_XXX macro for switch statement Yuanhan Liu
2015-09-18 14:58 ` [Qemu-devel] [PATCH v10 2/7] vhost-user: add protocol feature negotiation Yuanhan Liu
2015-09-18 14:58 ` [Qemu-devel] [PATCH v10 3/7] vhost: rename VHOST_RESET_OWNER to VHOST_RESET_DEVICE Yuanhan Liu
2015-09-18 14:58 ` [Qemu-devel] [PATCH v10 4/7] vhost-user: add VHOST_USER_GET_QUEUE_NUM message Yuanhan Liu
2015-09-22  9:56   ` Jason Wang
2015-09-23  2:06     ` Yuanhan Liu
2015-09-18 14:58 ` [Qemu-devel] [PATCH v10 5/7] vhost: introduce vhost_backend_get_vq_index method Yuanhan Liu
2015-09-22 10:01   ` Jason Wang
2015-09-23 12:26   ` Eric Blake
2015-09-18 14:58 ` [Qemu-devel] [PATCH v10 6/7] vhost-user: add multiple queue support Yuanhan Liu
2015-09-22 10:14   ` Jason Wang
2015-09-23  1:57     ` Yuanhan Liu
2015-09-23  2:12       ` Jason Wang
2015-09-23  2:16         ` Yuanhan Liu
2015-09-22 11:53   ` Michael S. Tsirkin
2015-09-22 14:44   ` Eric Blake [this message]
2015-09-22 18:52   ` Eduardo Habkost
2015-09-23  1:48     ` Yuanhan Liu
2015-09-18 14:58 ` [Qemu-devel] [PATCH v10 7/7] vhost-user: add a new message to disable/enable a specific virt queue Yuanhan Liu
2015-09-22 14:47   ` Eric Blake
2015-09-23  2:05     ` Yuanhan Liu
2015-09-23  2:06       ` Eric Blake
2015-09-23  2:12         ` Yuanhan Liu

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=56016942.6060105@redhat.com \
    --to=eblake@redhat.com \
    --cc=Changchun.ouyang@hotmail.com \
    --cc=changchun.ouyang@intel.com \
    --cc=jasowang@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=yuanhan.liu@linux.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).