numam-spdk/lib
Evgeniy Kochetov d53a1f1cba nvmf/rdma: Handle completions for destroyed QP associated with SRQ
IB Architecture Specification vol.1 rel.13. in ch.10.3.1 "QUEUE PAIR
AND EE CONTEXT STATES" suggests the following destroy procedure for
QPs associated with SRQ:
- Put the QP in the Error State;
- wait for the Affiliated Asynchronous Last WQE Reached Event;
- either:
  * drain the CQ by invoking the Poll CQ verb and either wait for CQ
    to be empty or the number of Poll CQ operations has exceeded CQ
    capacity size; or
  * post another WR that completes on the same CQ and wait for this WR
    to return as a WC;
- and then invoke a Destroy QP or Reset QP.

Without the drain step it is possible that LAST_WQE_REACHED event is
received and QP is destroyed before the last receive WR completion is
polled from the CQ.

In SPDK there is no risk of resource leakage in this case. So, instead
of draining we can destroy QP and then just ignore receive completions
without QP and post receive WRs back to SRQ.

Fixes #903

Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465747 (master)

(cherry picked from commit 87ebcb08c1)
Change-Id: Ice6d3d5afc205c489f768e3b51c6cda8809bee9a
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468300
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Eugene Kochetov <evgeniik@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-09-20 20:26:30 +00:00
..
bdev bdev: fix error path for allocating qos paramters 2019-09-09 21:55:22 +00:00
blob lib/blob: move bdev subdir under module directory. 2019-09-06 02:19:41 +00:00
blobfs blobfs: make internal asynchronous APIs as public APIs 2019-06-28 09:50:50 +00:00
conf string: spdk_strtol to delegate additional error checking 2019-01-29 00:10:57 +00:00
copy lib/copy: move ioat subdir to module directory. 2019-09-06 02:19:41 +00:00
env_dpdk env_dpdk/memory: aggregate adjacent vfio mappings 2019-09-09 21:55:22 +00:00
env_ocf lib/mk: update OCF build. 2019-09-06 02:19:41 +00:00
event lib/event: move rpc and subsystems dirs to module 2019-09-06 02:19:41 +00:00
ftl lib/ftl: delay processing ANM events initialization is completed 2019-09-20 20:26:30 +00:00
ioat ioat: allocate device struct using regular calloc 2019-04-09 06:30:42 +00:00
iscsi mk: add a lib deps file. 2019-09-06 02:19:41 +00:00
json json_util: fix typo in debug message. 2019-05-31 14:39:53 +00:00
jsonrpc jsonrpc: tolerate null json value for parameters in json-rpc call 2019-07-26 19:30:57 +00:00
log mk: move log_rpc from inside log 2019-09-06 02:19:41 +00:00
log_rpc mk: move log_rpc from inside log 2019-09-06 02:19:41 +00:00
lvol lvol: Fix for lvol failed deletion flow 2019-04-02 19:23:22 +00:00
nbd jsonrpc: don't check returned value from spdk_jsonrpc_begin_result() 2019-07-22 05:13:30 +00:00
net jsonrpc: don't check returned value from spdk_jsonrpc_begin_result() 2019-07-22 05:13:30 +00:00
notify lib: move notify_rpc under lib/notify 2019-09-06 02:19:41 +00:00
nvme Revert "nvme: small code cleanup for nvme_transport_ctrlr_scan" 2019-09-10 22:27:45 +00:00
nvmf nvmf/rdma: Handle completions for destroyed QP associated with SRQ 2019-09-20 20:26:30 +00:00
reduce lib/reduce: change and move the max IOVEC define for reduce 2019-07-29 04:36:59 +00:00
rocksdb RocksDB: Remove static and assert for SpdkInitializeThread 2019-07-05 04:19:11 +00:00
rpc jsonrpc: don't check returned value from spdk_jsonrpc_begin_result() 2019-07-22 05:13:30 +00:00
rte_vhost make: add dependencies for the rte_vhost build. 2019-09-20 20:26:30 +00:00
scsi scsi: remove bdev_scsi_mode_select_page() 2019-07-26 04:14:59 +00:00
sock sock: Add the code to free the entry 2019-09-09 04:42:54 +00:00
thread thread: Assign not pointer but instance of spdk_cpuset in struct spdk_thread 2019-07-04 00:30:22 +00:00
trace lib: move trace_rpc into lib/trace 2019-09-06 02:19:41 +00:00
ut_mock thread: Eliminate use of pthread_self and thread_ids 2019-01-15 16:53:12 +00:00
util dif: Add spdk_dix_remap_ref_tag to remap ref. tag for separate metadata payload 2019-07-11 11:14:22 +00:00
vhost make: add dependencies for the rte_vhost build. 2019-09-20 20:26:30 +00:00
virtio lib/virtio: change the definition of cookie 2019-06-26 08:03:37 +00:00
vmd lib/vmd: check header_type after the vmd_adapter structure is verified 2019-07-23 19:55:04 +00:00
Makefile make: add dependencies for the rte_vhost build. 2019-09-20 20:26:30 +00:00