qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/6] Start a contrib/libvhost-user
@ 2016-10-18  9:23 Marc-André Lureau
  2016-10-18  9:24 ` [Qemu-devel] [PATCH v2 1/6] tests/vhost-user-bridge: remove false comment Marc-André Lureau
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: Marc-André Lureau @ 2016-10-18  9:23 UTC (permalink / raw)
  To: qemu-devel; +Cc: felipe, victork, mst, Marc-André Lureau

Hi

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.

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)

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.

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.

Comments welcome!

v2:
- add documentation
- updated to follow latest virtio queue qemu implementation
- rename add_watch() to set_watch()
- various fixes from Felipe Franciosi

rfc->v1:
- add vu_gpa_to_va()
- fix indirect descriptors handling
- fix notification
- more error handling
- disable debugging

Marc-André 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

 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

-- 
2.10.0

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2016-11-15 19:20 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-18  9:23 [Qemu-devel] [PATCH v2 0/6] Start a contrib/libvhost-user Marc-André Lureau
2016-10-18  9:24 ` [Qemu-devel] [PATCH v2 1/6] tests/vhost-user-bridge: remove false comment Marc-André Lureau
2016-10-18  9:24 ` [Qemu-devel] [PATCH v2 2/6] tests/vhost-user-bridge: remove unnecessary dispatcher_remove Marc-André Lureau
2016-10-18  9:24 ` [Qemu-devel] [PATCH v2 3/6] tests/vhost-user-bridge: indicate peer disconnected Marc-André Lureau
2016-10-18  9:24 ` [Qemu-devel] [PATCH v2 4/6] tests/vhost-user-bridge: do not accept more than one connection Marc-André Lureau
2016-10-18  9:24 ` [Qemu-devel] [PATCH v2 5/6] contrib: add libvhost-user Marc-André Lureau
2016-10-18 14:13   ` Felipe Franciosi
2016-10-18 14:43   ` Felipe Franciosi
2016-10-18 15:25     ` Marc-André Lureau
2016-10-18 16:21       ` Felipe Franciosi
2016-10-27 22:11         ` Michael S. Tsirkin
2016-10-27 22:17           ` Felipe Franciosi
2016-10-18  9:24 ` [Qemu-devel] [PATCH v2 6/6] tests/vhost-user-bridge: use contrib/libvhost-user Marc-André Lureau
2016-10-18 13:29   ` Eric Blake
2016-11-15 19:20 ` [Qemu-devel] [PATCH v2 0/6] Start a contrib/libvhost-user Michael S. Tsirkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).