From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42627) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4pyJ-0001cN-B9 for qemu-devel@nongnu.org; Tue, 16 Jun 2015 08:28:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z4pyG-0003BG-3A for qemu-devel@nongnu.org; Tue, 16 Jun 2015 08:28:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58435) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4pyF-0003BC-Rd for qemu-devel@nongnu.org; Tue, 16 Jun 2015 08:28:04 -0400 Message-ID: <5580164D.8020505@redhat.com> Date: Tue, 16 Jun 2015 06:27:57 -0600 From: Eric Blake MIME-Version: 1.0 References: <1432538908-26298-5-git-send-email-mukawa@igel.co.jp> <1432874550-10921-1-git-send-email-mukawa@igel.co.jp> <1432874550-10921-5-git-send-email-mukawa@igel.co.jp> In-Reply-To: <1432874550-10921-5-git-send-email-mukawa@igel.co.jp> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="IkQtCaguEl9lNjnavDR1XKJ2sPBf3JqOU" Subject: Re: [Qemu-devel] [PATCH v1 4/4] vhost-user: Add new option to specify vhost-user backend features List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Tetsuya Mukawa , qemu-devel@nongnu.org Cc: jasowang@redhat.com, n.nikolaev@virtualopensystems.com, stefanha@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --IkQtCaguEl9lNjnavDR1XKJ2sPBf3JqOU Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 05/28/2015 10:42 PM, Tetsuya Mukawa wrote: > This patch adds below '-net' options to let QEMU know which features > vhost-user backend will support. [meta-comment: when posting a new revision of a series, do it as a new top-level thread rather than buried in-reply-to an earlier version] > If above features are specified, QEMU assumes vhost-user backend suppor= ts > the features, then QEMU can start without vhost-user backend connection= =2E > (While no connection, link status of virtio-net device will be down) >=20 >=20 > When connection between QEMU and the backend is established, QEMU check= es feature s/checkes/checks/ > values of the backend to make sure the expected features are provided. > If it doesn't, the connection will be closed by QEMU. >=20 > Signed-off-by: Tetsuya Mukawa > --- > +++ b/qapi-schema.json > @@ -2241,25 +2241,29 @@ > # > # @vhostforce: #optional vhost on for non-MSIX virtio guests > # > +# @backend_features: #optional feature flag to support vhost user back= end > +# (Since 2.4) > +# s/backend_features/backend-features/ (we document that qapi should prefer - over _ unless there is a consistency issue with _ already used in the struct) > @@ -2444,12 +2448,92 @@ > # > # @vhostforce: #optional vhost on for non-MSIX virtio guests (default:= false). > # > +# @backend_csum: #optional feature backend supports (default: false). > +# (Since 2.4) Again, s/_/-/ throughout this struct. > +# > +# @backend_mq: #optional feature backend supports (default: false). > +# (Since 2.4) A lot of identical descriptions. Might be worth more specific text to each option; for example, @backend_mq: #optional: True if backend supports multiqueue feature (default: false). (Since 2.4) > +++ b/qemu-options.hx > @@ -1467,6 +1467,15 @@ DEF("netdev", HAS_ARG, QEMU_OPTION_netdev, > "-netdev tap,id=3Dstr[,fd=3Dh][,fds=3Dx:y:...:z][,ifname=3Dname][,= script=3Dfile][,downscript=3Ddfile]\n" > " [,helper=3Dhelper][,sndbuf=3Dnbytes][,vnet_hdr=3Don|off]= [,vhost=3Don|off]\n" > " [,vhostfd=3Dh][,vhostfds=3Dx:y:...:z][,vhostforce=3Don|o= ff][,queues=3Dn]\n" > + " [,backend_csum=3Don|off][,backend_guest_csum=3Don|off][,= backend_gso=3Don|off]\n" > + " [,backend_guest_tso4=3Don|off][,backend_guest_tso6=3Don|= off]\n" > + " [,backend_guest_ecn=3Don|off][,backend_guest_ufo=3Don|of= f]\n" > + " [,backend_guest_announce=3Don|off][,backend_host_tso4=3D= on|off]\n" > + " [,backend_host_tso6=3Don|off][,backend_host_ecn=3Don|off= ]\n" > + " [,backend_host_ufo=3Don|off][,backend_mrg_rxbuf=3Don|off= ][,backend_status=3Don|off]\n" > + " [,backend_ctrl_vq=3Don|off][,backend_ctrl_vx=3Don|off][,= backend_ctrl_vlan=3Don|off]\n" > + " [,backend_ctrl_rx_extra=3Don|off][,backend_ctrl_mac_addr= =3Don|off]\n" > + " [,backend_ctrl_guest_offloads=3Don|off][,backend_mq=3Don= |off]\n" > " configure a host TAP network backend with ID 'str= '\n" > " use network scripts 'file' (default=3D" DEFAULT_N= ETWORK_SCRIPT ")\n" > " to configure it and 'dfile' (default=3D" DEFAULT_= NETWORK_DOWN_SCRIPT ")\n" > @@ -1486,6 +1495,7 @@ DEF("netdev", HAS_ARG, QEMU_OPTION_netdev, > " use 'vhostfd=3Dh' to connect to an already opened= vhost net device\n" > " use 'vhostfds=3Dx:y:...:z to connect to multiple = already opened vhost net devices\n" > " use 'queues=3Dn' to specify the number of queues = to be created for multiqueue TAP\n" > + " use 'backend_*=3Don' to specify virtio-net featur= e that vhost-user backend supports\n" Bikeshedding: Rather than having a lot of booleans, I wonder if it would be better to have an array of flag names. That is, in QMP form, this would select three features (and leave the others off) 'backend-features':[ 'csum', 'guest-csum', gso' ] although I'm not sure on how that would best translate to the command lin= e. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --IkQtCaguEl9lNjnavDR1XKJ2sPBf3JqOU 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/ iQEcBAEBCAAGBQJVgBZNAAoJEKeha0olJ0NqvJ8IAIWYG6KnBtZTFeMg2XrGvohp WYdNKeuQPqYFOoL+E3NhoyeSegoRvXDt953QBq1DEY4y+Y9wOjDyk2eEP3P7B7mj N/tnTbl9SpPwNOzvwu0jh0tIuPvHrc3aybT8W0M3i4npORItR17hRYGgNnKM5Eg6 tdKVmSvXxCTjUTDgZPz6uztlmusyEQ3obatxKvUdgj/jEBKSTkm5eew71f3xOcMl 4au6pZr79O7S9WEJPus0ffi4c5CaIVmRvOj7eqvhqy6DXrIa0IKT3QzsbWrE4Yf9 yMcdyUvtAOfi/Yjs48HbL1jejERtMt79fBQ7asw29zCyMVwMsEN9znpV7VXbHqs= =NbNO -----END PGP SIGNATURE----- --IkQtCaguEl9lNjnavDR1XKJ2sPBf3JqOU--