From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42544) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZUQh-0004Rl-9E for qemu-devel@nongnu.org; Tue, 08 Sep 2015 21:44:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZZUQd-0002vu-Vp for qemu-devel@nongnu.org; Tue, 08 Sep 2015 21:44:07 -0400 Received: from mga11.intel.com ([192.55.52.93]:59857) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZUQd-0002vo-Qc for qemu-devel@nongnu.org; Tue, 08 Sep 2015 21:44:03 -0400 Date: Wed, 9 Sep 2015 09:47:15 +0800 From: Yuanhan Liu Message-ID: <20150909014715.GG3054@yliu-dev.sh.intel.com> References: <1441697927-16456-1-git-send-email-yuanhan.liu@linux.intel.com> <1441697927-16456-7-git-send-email-yuanhan.liu@linux.intel.com> <55EF5196.3080802@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55EF5196.3080802@redhat.com> Subject: Re: [Qemu-devel] [PATCH 6/7] vhost-user: add multiple queue support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: changchun.ouyang@intel.com, qemu-devel@nongnu.org, mst@redhat.com On Tue, Sep 08, 2015 at 03:22:30PM -0600, Eric Blake wrote: > On 09/08/2015 01:38 AM, Yuanhan Liu wrote: > > From: Ouyang Changchun > > > > This patch is initially based a patch from Nikolay Nikolaev. > > > > Here is the latest version for adding vhost-user multiple queue support, > > by creating a nc and vhost_net pair for each queue. > > > > Reviewing grammar and interface only: Thanks, and will fix them in next patch. --yliu > > > +++ b/docs/specs/vhost-user.txt > > @@ -135,6 +135,19 @@ As older slaves don't support negotiating protocol features, > > a feature bit was dedicated for this purpose: > > #define VHOST_USER_F_PROTOCOL_FEATURES 30 > > > > +Multiple queue support > > +------------------- > > +Multiple queue is treated as a protocal extension, hence the slave has to > > s/protocal/protocol/ > > > +implement protocol features first. Multiple queues is supported only when > > +the protocol feature VHOST_USER_PROTOCOL_F_MQ(bit 0) is set. > > + > > +The max # of queues the slave support can be queried with message > > s/#/number/ > s/support/supports/ > > > +VHOST_USER_GET_PROTOCOL_FEATURES. Master should stop when the # of requested > > s/#/number/ > > > +queues is bigger than that. > > + > > +As all queues share one connection, the master use a unique index for each > > s/use/uses/ > > > +queue in the sent message to identify one specified queue. > > + > > > +++ 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' } } > > Looks okay. > > -- > Eric Blake eblake redhat com +1-919-301-3266 > Libvirt virtualization library http://libvirt.org >