Spdk/lib
Changpeng Liu 295e54d144 virtio/vfio_user: add virtio_blk device support
Add vfio-user transport support based on existing virtio client
library.

Test steps using bdevperf:

Start `spdk_tgt` with created virtio_blk device:
1. build/bin/spdk_tgt
2. scripts/rpc.py bdev_malloc_create -b malloc0 $((512)) 512
3. scripts/rpc.py vfu_virtio_create_blk_endpoint vfu.0 --bdev-name malloc0 \
                                                 --cpumask=0x1 --num-queues=2 \
                                                 --qsize=256 --packed-ring

Start `bdevperf`:
1. test/bdev/bdevperf/bdevperf -r /var/tmp/spdk.sock.1 -g -s 2048 -q 128 -o 4096 \
                               -w randread -t 30 -m 0x2
2. scripts/rpc.py -s /var/tmp/spdk.sock.1 bdev_virtio_attach_controller --dev-type blk \
                  --trtype vfio-user --traddr vfu.0 VirtioBlk0
3. test/bdev/bdevperf/bdevperf.py -s /var/tmp/spdk.sock.1 perform_tests

Change-Id: I368c4becebbca57328a25fc750e41c353420e481
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13896
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-09-29 19:42:56 +00:00
..
accel accel/idxd/iaa: Convert to use iovecs 2022-09-23 00:10:08 +00:00
bdev bdev: send bdev reset based on outstanding IO and a new timeout parameter 2022-09-22 19:18:30 +00:00
blob blob: Add functions to find [un]allocated io_unit 2022-09-15 08:23:56 +00:00
blobfs blob: Optimize copy-on-write flow for clusters backed by zeroes device 2022-09-05 12:49:46 +00:00
conf Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
dma check_format: For C files only, fix return type breaks 2022-06-27 09:33:48 +00:00
env_dpdk env_dpdk: add dpdk_pci_device_get_mem_resource 2022-09-29 15:32:24 +00:00
env_ocf check_format: For C files only, fix return type breaks 2022-06-27 09:33:48 +00:00
event trace: update trace help inside SPDK target 2022-09-27 19:41:17 +00:00
ftl FTL: close ftl bdev in original thread 2022-09-22 07:10:03 +00:00
idxd idxd: For kernel mode, handle IOMMU+SM mode 2022-09-26 11:48:39 +00:00
init init: Avoid calling RPC methods twice 2022-09-15 08:25:18 +00:00
ioat check_format: For C files only, fix return type breaks 2022-06-27 09:33:48 +00:00
iscsi print better errors when creating mempools from secondary process 2022-08-29 11:41:32 +00:00
json json: fix parsing json problems when json config is invalid. 2022-09-02 07:32:21 +00:00
jsonrpc check_format: For C files only, fix return type breaks 2022-06-27 09:33:48 +00:00
log Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
lvol blobstore: implement spdk_bs_grow and bdev_lvol_grow_lvstore RPC 2022-06-28 17:55:43 +00:00
nbd lib/nbd: return nbd_poll idle or busy accordingly 2022-09-22 07:51:46 +00:00
notify Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
nvme vfio_user: remove CONFIG_VFIO_USER flag for client library 2022-09-29 19:42:56 +00:00
nvmf nvmf/tcp: add admin queue depth check before init 2022-09-28 06:39:14 +00:00
rdma rdma: Maintain per device PD which is persistent across reconnect 2022-08-12 08:59:43 +00:00
reduce check_format: For C files only, fix return type breaks 2022-06-27 09:33:48 +00:00
rocksdb Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
rpc rpc: Add API to get method state mask 2022-09-15 08:25:18 +00:00
scsi lib/scsi: use bkdr hash to avoid naa identifier collision 2022-08-03 07:43:10 +00:00
sock sock: make impl_name const char * in all functions 2022-09-05 12:49:28 +00:00
thread thread: add assert for io_channel_iter allocation failure 2022-09-29 07:27:27 +00:00
trace trace: update trace help inside SPDK target 2022-09-27 19:41:17 +00:00
trace_parser trace: allocate shm filesize based on number of cores used 2022-09-20 10:17:45 +00:00
ut_mock Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
util configure/misc: make ISA-L a hard dependency 2022-09-20 10:18:54 +00:00
vfio_user lib/vfio-user: add spdk_vfio_user_dev_send_request as public function 2022-09-23 15:16:01 +00:00
vfu_tgt lib/vfu_tgt: add library for PCI device emulation 2022-09-29 19:42:56 +00:00
vhost check_format.sh: remove "rte_vhost" exclusions 2022-09-29 15:32:24 +00:00
virtio virtio/vfio_user: add virtio_blk device support 2022-09-29 19:42:56 +00:00
vmd lib/vmd: return -1 if NVMe driver is not found 2022-09-05 12:50:06 +00:00
Makefile vfio_user: remove CONFIG_VFIO_USER flag for client library 2022-09-29 19:42:56 +00:00