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 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Seth Howell <seth.howell5141@gmail.com> |
||
---|---|---|
.. | ||
ctrlr_bdev.c | ||
ctrlr_discovery.c | ||
ctrlr.c | ||
Makefile | ||
nvmf_fc.h | ||
nvmf_internal.h | ||
nvmf.c | ||
rdma.c | ||
request.c | ||
subsystem.c | ||
transport.c | ||
transport.h |