Spdk/lib/nvmf
Swapnil Ingle 23b518a013 nvmf/vfio_user: mitigate cq full race
Linux host nvme driver processes all pending cqe's in one batch along with
completing backing blk_mq req's and later rings cq_doorbell once for all
processed cqes.
As blk_mq req's are completed there is room for more submissions
before ringing cq_doorbell.

This may race with vfio_user cq_is_full() which uses cq_doorbell to make final
decision and as host has not updated cq_doorbell we fail with cq_full error.

To mitigate this only process commands from sq which have free cq slot.

Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
Change-Id: I0cefb41df8099eb71de25923d05a9fcb28e4d124
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16788
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2023-03-08 08:45:00 +00:00
..
ctrlr_bdev.c bdev: Add default copy command support in bdev 2023-03-07 11:52:45 +00:00
ctrlr_discovery.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
ctrlr.c bdev: Add default copy command support in bdev 2023-03-07 11:52:45 +00:00
fc_ls.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
fc.c nvmf/fc: fix memleaks 2023-03-06 13:21:38 +00:00
Makefile so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
nvmf_fc.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
nvmf_internal.h nvmf: pause/resume polling for the target 2023-01-24 14:49:24 +00:00
nvmf_rpc.c nvmf: introduce async transport create 2023-02-16 16:45:08 +00:00
nvmf.c nvmf: Fix new line at the end of log message 2023-01-30 16:29:49 +00:00
rdma.c nvmf/rdma: Recreate resources and listeners after IB device is hotplugged 2023-03-07 11:50:05 +00:00
spdk_nvmf.map nvmf: introduce async transport create 2023-02-16 16:45:08 +00:00
subsystem.c nvmf: handle iovecs in reservation handling 2023-02-13 13:50:51 +00:00
tcp.c tcp: add note about default case in qpair_abort_request() 2023-02-13 13:50:15 +00:00
transport.c nvmf: disable data buf mempool cache 2023-02-28 08:57:23 +00:00
transport.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
vfio_user.c nvmf/vfio_user: mitigate cq full race 2023-03-08 08:45:00 +00:00