Spdk/lib/nvmf
Evgeniy Kochetov 567b1006a9 nvmf/rdma: Fix QP shutdown procedure implementation
This patch implements the following QP shutdown flow:
1. Move the QP to ERR state
2. Post dummy work requests to send and receive queues
3. Poll CQ until it returns dummy work requests (with WR Flush Error status)
4. Call ibv_destroy_qp and release resources

In order to differentiate dummy and normal WRs new spdk_nvmf_rdma_wr
structure was introduced which contains type of WR. Since now it is
expected that wr_id field in ibv_recv/send_wr and ibv_wc always points
to this structure. Based on WR type wr_id can be safely casted to
correct container structure. In case of unsuccessful work completions
'opcode' can not be used for this purpose because it may be
invalid (see "IB Architecture Specification Volume 1", ch. 11.4.2.1
"Poll for completion").

Change-Id: Ifb791e36114c619c71ad4d831f2c7972fe7cf13d
Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Reviewed-on: https://review.gerrithub.io/430754 (master)
Reviewed-on: https://review.gerrithub.io/436859
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-12-12 15:26:21 +00:00
..
ctrlr_bdev.c ctrlr_bdev: change spdk_nvmf_bdev_ctrlr_identify_ns to return void 2018-10-15 17:29:30 +00:00
ctrlr_discovery.c nvmf: Move target opts to transport opts (part 1) 2018-08-27 20:43:53 +00:00
ctrlr.c nvmf/ctrlr: add debug log for volatile write cache 2018-10-23 08:10:12 +00:00
Makefile Make: Add deps for each shared obj individually 2018-10-09 21:45:26 +00:00
nvmf_fc.h lib/nvmf: fix a typo error 2018-10-12 17:40:16 +00:00
nvmf_internal.h nvmf: Simplify qpair states 2018-12-12 15:26:21 +00:00
nvmf.c nvmf: change the return type of calloc failed 2018-12-12 15:26:21 +00:00
rdma.c nvmf/rdma: Fix QP shutdown procedure implementation 2018-12-12 15:26:21 +00:00
request.c nvmf: add free_req function pointer. 2018-07-27 20:50:36 +00:00
subsystem.c nvmf: Correctly enforce subsystem listener access control 2018-10-03 16:12:31 +00:00
transport.c mk: don't use '-include spdk/config.h' 2018-10-02 23:13:32 +00:00
transport.h nvmf: Move target opts to transport opts (part 2) 2018-09-17 20:42:16 +00:00