From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53535) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c6jH6-00053g-LK for qemu-devel@nongnu.org; Tue, 15 Nov 2016 14:20:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c6jH3-0005f1-Gu for qemu-devel@nongnu.org; Tue, 15 Nov 2016 14:20:08 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41322) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c6jH3-0005eI-AW for qemu-devel@nongnu.org; Tue, 15 Nov 2016 14:20:05 -0500 Date: Tue, 15 Nov 2016 21:20:03 +0200 From: "Michael S. Tsirkin" Message-ID: <20161115211908-mutt-send-email-mst@kernel.org> References: <20161018092405.21829-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20161018092405.21829-1-marcandre.lureau@redhat.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2 0/6] Start a contrib/libvhost-user List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?iso-8859-1?Q?Marc-Andr=E9?= Lureau Cc: qemu-devel@nongnu.org, felipe@nutanix.com, victork@redhat.com On Tue, Oct 18, 2016 at 12:23:59PM +0300, Marc-Andr=E9 Lureau wrote: > Hi >=20 > vhost-user & virtio have tricky corners and evolve regularly. There > isn't a reference code that would help you get started either. And the > backends duplicate most of the effort. I had to drop this as it got nacked for this release by Stefan. Sorry about that. Pls ping or repost after the release. > Furthermore, due to usage of ancillary data, shared memory, eventfd, > atomics, it is not so simple to implement in other languages than C > either. Having a library doing the low-level parts could eventually > help to reach other languages (this guided some decisions, such as > being able to override message handling) >=20 > I found it would help me to experiment with new usages of > libvhost-user (with other devices than network for example) if qemu > would provide such "reference" library. vhost-user-bridge was the most > complete attempt at implementing vhost-user slave in qemu, but it > lacked some abstraction and efficient handling of the virt queues. >=20 > I propose to provide such library based on virtio.c implementation and > vhost-user-bridge socket handling. It is not meant to be complete, or > solve all use cases (best efficiency, or multi-threading support are > not a goal for this first implementation). My hope is that at some > point the library would be complete and stable enough that it could > become a standalone project, that could cover most use cases. For now > it makes more sense to propose it in qemu/contrib as an internal > library where API could evolve. >=20 > Comments welcome! >=20 > v2: > - add documentation > - updated to follow latest virtio queue qemu implementation > - rename add_watch() to set_watch() > - various fixes from Felipe Franciosi >=20 > rfc->v1: > - add vu_gpa_to_va() > - fix indirect descriptors handling > - fix notification > - more error handling > - disable debugging >=20 > Marc-Andr=E9 Lureau (6): > tests/vhost-user-bridge: remove false comment > tests/vhost-user-bridge: remove unnecessary dispatcher_remove > tests/vhost-user-bridge: indicate peer disconnected > tests/vhost-user-bridge: do not accept more than one connection > contrib: add libvhost-user > tests/vhost-user-bridge: use contrib/libvhost-user >=20 > contrib/libvhost-user/libvhost-user.c | 1499 +++++++++++++++++++++++++= ++++++++ > tests/vhost-user-bridge.c | 1183 +++++--------------------= - > Makefile | 1 + > Makefile.objs | 2 +- > contrib/libvhost-user/Makefile.objs | 1 + > tests/Makefile.include | 2 +- > contrib/libvhost-user/libvhost-user.h | 435 ++++++++++ > 7 files changed, 2167 insertions(+), 956 deletions(-) > create mode 100644 contrib/libvhost-user/libvhost-user.c > create mode 100644 contrib/libvhost-user/Makefile.objs > create mode 100644 contrib/libvhost-user/libvhost-user.h >=20 > --=20 > 2.10.0