This patch set add virtio_blk device support to vdpa/ifc driver. With a lot of similarities, I re-use part of vdpa/ifc driver. Distinguish the virtio net and blk device by device id, and implement specific features and ops. Add example to vdpa to support virtio_blk device. To support blk device live migration, some modification to vhost lib. Perform dev_conf op only under VHOST_USER_SET_VRING_CALL msg.
v6: fix some commit log. add vhost socket in log output to make it more user-friendly. when driver ops fail, just output some log, do not break message handler. check vhost msg size in msg handler. v5: fix some coding style issues. v4: add args "isblk" to vdpa example to specify a block device, fix some issue in example. Make sure code specify for block device does not affect net device. v3: Fix some compile issues. v2: Fix some coding style issues. Andy Pei (16): vdpa/ifc: add support for virtio blk device vhost: add vDPA ops for blk device vhost: add vhost msg support vdpa/ifc: add blk ops for ifc device vdpa/ifc: add vDPA interrupt for blk device vdpa/ifc: add block device SW live-migration examples/vdpa: add vDPA blk support in example usertools: add support for virtio blk device vdpa/ifc: add set vring state for blk device vdpa/ifc: add some log at vDPA launch before qemu connect vdpa/ifc: read virtio max queues from hardware vdpa/ifc: add interrupt and handle for virtio blk vdpa/ifc: add is blk flag to ifcvf HW struct vdpa/ifc/base: access correct register for blk device vdpa/ifc: blk device pause without no inflight IO vhost: make sure each queue callfd is configured drivers/vdpa/ifc/base/ifcvf.c | 42 +++- drivers/vdpa/ifc/base/ifcvf.h | 29 ++- drivers/vdpa/ifc/ifcvf_vdpa.c | 521 ++++++++++++++++++++++++++++++++++++--- examples/vdpa/main.c | 61 ++++- examples/vdpa/vdpa_blk_compact.h | 72 ++++++ examples/vdpa/vhost_user.h | 169 +++++++++++++ lib/vhost/vdpa_driver.h | 8 +- lib/vhost/vhost_user.c | 83 +++++++ lib/vhost/vhost_user.h | 13 + usertools/dpdk-devbind.py | 8 + 10 files changed, 951 insertions(+), 55 deletions(-) create mode 100644 examples/vdpa/vdpa_blk_compact.h create mode 100644 examples/vdpa/vhost_user.h -- 1.8.3.1