mbox series

[v7,00/18] add virtio_blk device support to vdpa/ifc

Message ID 1651048206-282372-1-git-send-email-andy.pei@intel.com (mailing list archive)
Headers
Series add virtio_blk device support to vdpa/ifc |

Message

Pei, Andy April 27, 2022, 8:29 a.m. UTC
  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.

v7:
 Check on expected fd num in new vhost msg handler.
 Sanity check on vhost msg size.
 Fix typo.
 Add commit log to help understand code.
 Remove duplicated code.
 Add new API to get vDPA device type.
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 (18):
  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
  vhost: add API to get vDPA device type
  vdpa/ifc: add get device type ops to ifc driver
  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    |  36 +++-
 drivers/vdpa/ifc/base/ifcvf.h    |  20 +-
 drivers/vdpa/ifc/ifcvf_vdpa.c    | 392 +++++++++++++++++++++++++++++++++++++--
 examples/vdpa/main.c             |  57 ++++++
 examples/vdpa/vdpa_blk_compact.h |  65 +++++++
 lib/vhost/rte_vhost.h            |  17 ++
 lib/vhost/socket.c               |  39 ++++
 lib/vhost/vdpa_driver.h          |  11 +-
 lib/vhost/version.map            |   2 +
 lib/vhost/vhost_user.c           |  97 ++++++++++
 lib/vhost/vhost_user.h           |  13 ++
 usertools/dpdk-devbind.py        |   5 +-
 12 files changed, 730 insertions(+), 24 deletions(-)
 create mode 100644 examples/vdpa/vdpa_blk_compact.h