Spdk/lib/vhost
Darek Stojaczyk 73844cccf4 vhost: introduce device sessions
Grouped a few spdk_vhost_dev struct fields into a new
struct spdk_vhost_session. A session will represent the
connection between SPDK vhost device (vhost-user slave)
and QEMU (vhost-user master).

This essentially serves two purposes. The first is to
allow multiple simultaneous connections to a single
vhost device. Each connection (session) will have access
to the same storage, but will use separate virtqueues,
separate features and possibly different memory. For
Vhost-SCSI, this could be used together with the upcoming
SCSI reservations feature.

The other purpose is to untie devices from lcores and tie
sessions instead. This will potentially allow us to modify
the device struct from any thread, meaning we'll be able
to get rid of the external events API and simplify a lot
of the code that manages vhost - vhost RPC for instance.
Device backends themselves would be responsible for
propagating all device events to each session, but it could
be completely transparent to the upper layers.

Change-Id: I39984cc0a3ae2e76e0817d48fdaa5f43d3339607
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/437774
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-12-23 00:42:54 +00:00
..
rte_vhost vhost/nvme: remove VHOST_USER_NVME_IO_CMD socket message 2018-11-27 13:24:42 +00:00
Makefile vhost_user_nvme: add vhost user nvme target to SPDK 2018-04-03 15:01:24 -04:00
vhost_blk.c vhost: introduce device sessions 2018-12-23 00:42:54 +00:00
vhost_internal.h vhost: introduce device sessions 2018-12-23 00:42:54 +00:00
vhost_nvme.c vhost: introduce device sessions 2018-12-23 00:42:54 +00:00
vhost_rpc.c vhost: rpc: add an optional parameter -n/--name for get_vhost_controllers 2018-10-04 23:33:04 +00:00
vhost_scsi.c vhost: introduce device sessions 2018-12-23 00:42:54 +00:00
vhost.c vhost: introduce device sessions 2018-12-23 00:42:54 +00:00