From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55643) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4V7q-0003OX-7P for qemu-devel@nongnu.org; Mon, 15 Jun 2015 10:12:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z4V7n-0007GS-0k for qemu-devel@nongnu.org; Mon, 15 Jun 2015 10:12:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37713) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4V7m-0007GN-QA for qemu-devel@nongnu.org; Mon, 15 Jun 2015 10:12:30 -0400 Date: Mon, 15 Jun 2015 15:12:28 +0100 From: Stefan Hajnoczi Message-ID: <20150615141228.GG9410@stefanha-thinkpad.redhat.com> References: <1432538908-26298-5-git-send-email-mukawa@igel.co.jp> <1432874550-10921-1-git-send-email-mukawa@igel.co.jp> <5578EAB6.9070409@igel.co.jp> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="FwyhczKCDPOVeYh6" Content-Disposition: inline In-Reply-To: <5578EAB6.9070409@igel.co.jp> Subject: Re: [Qemu-devel] [PATCH v1 0/4] Add feature to start QEMU without vhost-user backend List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Tetsuya Mukawa Cc: jasowang@redhat.com, qemu-devel@nongnu.org, n.nikolaev@virtualopensystems.com, "Michael S. Tsirkin" --FwyhczKCDPOVeYh6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jun 11, 2015 at 10:56:06AM +0900, Tetsuya Mukawa wrote: > On 2015/05/29 13:42, Tetsuya Mukawa wrote: > > Hi guys, > > > > Here are patches to add feature to start QEMU without vhost-user backen= d. > > Currently, if we want to use vhost-user backend, the backend must start= before > > QEMU. Also, if QEMU or the backend is closed unexpectedly, there is no = way to > > recover without restarting both applications. Practically, it's not use= ful. > > > > This patch series adds following features. > > - QEMU can start before the backend. > > - QEMU or the backend can restart anytime. > > connectivity will be recovered automatically, when app starts again. > > (if QEMU is server, QEMU just wait reconnection) > > while lost connection, link status of virtio-net device is down, > > so virtio-net driver on the guest can know it > > > > To work like above, the patch introduces flags to specify features vhos= t-user > > backend will support. > > > > Here are examples. > > ('backend_mrg_rxbuf' is an one of new flags. To know all, check the las= t patch) > > > > * QEMU is configured as vhost-user client. > > -chardev socket,id=3Dchr0,path=3D/tmp/sock,reconnect=3D3 \ > > -netdev vhost-user,id=3Dnet0,chardev=3Dchr0,vhostforce,backend_mrg= _rxbuf \ > > -device virtio-net-pci,netdev=3Dnet0 \ > > > > * QEMU is configured as vhost-user server. > > -chardev socket,id=3Dchr0,path=3D/tmp/sock,server,nowait \ > > -netdev vhost-user,id=3Dnet0,chardev=3Dchr0,vhostforce,backend_mrg= _rxbuf \ > > -device virtio-net-pci,netdev=3Dnet0 \ > > > > When virtio-net device is configured by virtio-net driver, QEMU should = know > > vhost-user backend features. But if QEMU starts without the backend, QE= MU cannot > > know it. So above the feature values specified by user will be used as = features > > the backend will support. > > > > When connection between QEMU and the backend is established, QEMU check= es feature > > values of the backend to make sure the expected features are provided. > > If it doesn't, the connection will be closed by QEMU. > > > > Regards, > > Tetsuya > > > > ---------- > > Changes > > ---------- > > - Changes from RFC patch > > The last patch of this series was changed like below. > > - Rebase to latest master. > > - Remove needless has_backend_feature variable. > > - Change user interface to be able to specify each feature by name. > > - Add (Since 2.4) to schema file. > > - Fix commit title and body. > > > > > > Tetsuya Mukawa (4): > > vhost-user: Add ability to know vhost-user backend disconnection > > vhost-user: Shutdown vhost-user connection when wrong messages are > > passed > > vhost-user: Enable 'nowait' and 'reconnect' option > > vhost-user: Add new option to specify vhost-user backend features > > > > hw/net/vhost_net.c | 6 ++- > > hw/net/virtio-net.c | 13 +++++ > > hw/scsi/vhost-scsi.c | 2 +- > > hw/virtio/vhost-user.c | 24 ++++++--- > > hw/virtio/vhost.c | 7 ++- > > include/hw/virtio/vhost.h | 3 +- > > include/hw/virtio/virtio-net.h | 1 + > > include/net/net.h | 3 ++ > > include/net/vhost_net.h | 1 + > > include/sysemu/char.h | 7 +++ > > net/net.c | 9 ++++ > > net/tap.c | 1 + > > net/vhost-user.c | 69 ++++++++++++++++++++++++- > > qapi-schema.json | 114 +++++++++++++++++++++++++++++++++= ++------ > > qemu-char.c | 15 ++++++ > > qemu-options.hx | 10 ++++ > > 16 files changed, 256 insertions(+), 29 deletions(-) > > >=20 > Ping. >=20 > Could someone please review this patches? > http://patchwork.ozlabs.org/project/qemu-devel/list/?submitter=3D66139 Nikolay, Jason, or Michael: Can one of you please step up to become maintainer of net/vhost-user.c. I don't follow vhost-user development much and can't give good review feedback about the vhost-user specific aspects. Please send a patch that adds you to the MAINTAINERS file for net/vhost-user.c. Then either include merged patches in Michael's pull requests or ask me (and in the future, Jason) to include them in net pull requests. Stefan --FwyhczKCDPOVeYh6 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVft1MAAoJEJykq7OBq3PIKnwH/3ic762C35E4G4+gNTrRvg8J KT3iMYwTKqoravd2fU1We+3rVjpTzjiRmVS6uwprd/C9YBw0Rgi6KWnb77IqRRGX LljRtN+znPYCiWMfXjBWPzu8vAZ2NyW5aWINhPHNbhU/dFQVLY/H1FkDBFkmC64k wcia713Q4Ra7SkWEpu6fUVq5W+FNpPZ4hF8HbY9zQ6EpM+L0utq0PaH77piWZReu XCQRERvcCL+xHefIBcHWL5RKp1yh88PLWscbsMF0nvcfPwJ10OwC7jUAVATHLic6 3PM3GVWWLnDGfmF/UHxAZ3UGZewxPLCTvi7Cws5ouIknMd0BlWU6mGQgVjdiD4o= =UQzH -----END PGP SIGNATURE----- --FwyhczKCDPOVeYh6--