From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57861) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeOnz-0000WJ-Kz for qemu-devel@nongnu.org; Tue, 22 Sep 2015 10:44:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZeOnw-0006Vq-Sf for qemu-devel@nongnu.org; Tue, 22 Sep 2015 10:44:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52699) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeOnw-0006Vi-M0 for qemu-devel@nongnu.org; Tue, 22 Sep 2015 10:44:24 -0400 References: <1442588324-11365-1-git-send-email-yuanhan.liu@linux.intel.com> <1442588324-11365-7-git-send-email-yuanhan.liu@linux.intel.com> From: Eric Blake Message-ID: <56016942.6060105@redhat.com> Date: Tue, 22 Sep 2015 08:44:18 -0600 MIME-Version: 1.0 In-Reply-To: <1442588324-11365-7-git-send-email-yuanhan.liu@linux.intel.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="kJS9C9Ce1s2xNlU9hnRoBTfBQurgopVXJ" Subject: Re: [Qemu-devel] [PATCH v10 6/7] vhost-user: add multiple queue support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Yuanhan Liu , qemu-devel@nongnu.org Cc: jasowang@redhat.com, mst@redhat.com, Changchun.ouyang@hotmail.com, Changchun Ouyang This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --kJS9C9Ce1s2xNlU9hnRoBTfBQurgopVXJ Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 09/18/2015 08:58 AM, Yuanhan Liu wrote: > From: Changchun Ouyang >=20 > This patch is initially based a patch from Nikolay Nikolaev. >=20 > This patch adds vhost-user multiple queue support, by creating a nc > and vhost_net pair for each queue. >=20 > Qemu exits if find that the backend can't support number of requested s/support/support the/ > queues (by providing queues=3D# 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. >=20 > 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. >=20 > In older version, it was reported that some messages are sent more time= s > 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 shou= ld > be sent per queue. >=20 > Here I introduced a helper function vhost_user_one_time_request(), whic= h > lists following messages as non-vring specific messages: >=20 > VHOST_USER_SET_OWNER > VHOST_USER_RESET_DEVICE > VHOST_USER_SET_MEM_TABLE > VHOST_USER_GET_QUEUE_NUM >=20 > For above messages, we simply ignore them when they are not sent the fi= rst > time. >=20 > Signed-off-by: Nikolay Nikolaev > Signed-off-by: Changchun Ouyang > Signed-off-by: Yuanhan Liu >=20 > --- 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 vho= st-user > +# (default: 1) (Since 2.5) > +# > # Since 2.1 > ## > { 'struct': 'NetdevVhostUserOptions', > 'data': { > 'chardev': 'str', > - '*vhostforce': 'bool' } } > + '*vhostforce': 'bool', > + '*queues': 'int' } } > =20 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. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --kJS9C9Ce1s2xNlU9hnRoBTfBQurgopVXJ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJWAWlCAAoJEKeha0olJ0Nq2ZcH/jCQNEa7gJhNS/NnGN7EQwHi yGEuVudtPV+e7U/uBCwSbhA/hbQrPlkaFqzK4Z2uahNcl5tLDBkSEFHaOOs2l39U EQVbQC/3x/DQYmu1OfysU78F3H3NFlZZgqCpcxyGw4k1hw6PeiMLeMDSxr/b4iQg XkK3lU4MRXVHG0aLT6Fz8KfJp44btZvUyRpKxhxS3zyjRqCjmhzBhXS64DDHHxZ/ xybuv+5qZEdkx0e9EVvOfAAD1h7uzzswJejdMMsGkylcbuy/VUmeSEFcYH1Q6pk6 b6JLlwiqxKN9DMypF27i5egm+TxvG+0qAeM6Yj+XQW+QyOEgGJ9rNY0jTqYUuOI= =IoAb -----END PGP SIGNATURE----- --kJS9C9Ce1s2xNlU9hnRoBTfBQurgopVXJ--