Spdk/lib/nvmf
Philipp Skadorov 4bfb557d80 nvmf/rdma: recover qp from fatal errors
RDMA QP is attempted to recover after IBV_EVENT_QP_FATAL event
is received from IBV asynchronous event API.

RDMA QP is put into ERROR state and is not processing any inbound
requests. The outstanding requests are only allowed to COMPLETED
and FREE states, no outbound transfers are performed.

IBV_EVENT_QP_LAST_WQE_REACHED or IBV_EVENT_SQ_DRAINED event is
expected to follow IBV_EVENT_QP_FATAL, giving a go to draining of
all outstanding requests and freeing the associated resources.

The requests executed by block layer are gracefully allowed to
complete, but no outbound transfers are made.

Note, outstanding requests can not be reliably completed through
polling the CQ, as WC's with failure status might not have all
the fields valid. The failed WC's are dropped and the outstanding
requests are fetched from the appropriate state's linked list.

QP recovery is triggered when there is no more outstanding requests.
If QP recovery is completed succesfully, the RDMA QP is put back into
ACTIVE state, the QP disconnect is triggered otherwise.

Change-Id: I45ee7feea067f80ccc6402518990014d691fbda3
Signed-off-by: Philipp Skadorov <philipp.skadorov@wdc.com>
Reviewed-on: https://review.gerrithub.io/416879
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2018-07-18 20:58:50 +00:00
..
ctrlr_bdev.c nvmf: Add trace points for the RDMA state machine 2018-06-12 20:01:33 +00:00
ctrlr_discovery.c bdev: Rename spdk_internal/bdev.h to spdk/bdev_module.h 2018-05-25 16:02:22 +00:00
ctrlr.c nvmf/rdma: recover qp from fatal errors 2018-07-18 20:58:50 +00:00
Makefile build: remove $(ENV_CFLAGS) where not necessary 2018-01-03 12:05:59 -05:00
nvmf_fc.h nvmf: fix coding style for astyle 2.05 in nvmf_fc.h 2018-07-17 07:53:18 +00:00
nvmf_internal.h nvmf/rdma: recover qp from fatal errors 2018-07-18 20:58:50 +00:00
nvmf.c nvmf: ensure that destroying qpairs have a state_cb 2018-07-17 08:18:25 +00:00
rdma.c nvmf/rdma: recover qp from fatal errors 2018-07-18 20:58:50 +00:00
request.c nvmf/rdma: recover qp from fatal errors 2018-07-18 20:58:50 +00:00
subsystem.c nvmf: don't change NN while ctrlrs exist 2018-06-13 21:52:38 +00:00
transport.c nvmf: redundant spdk_nvmf_transport assignment 2018-06-14 17:44:27 +00:00
transport.h nvmf: Remove poll group from controller 2017-12-12 15:01:17 -05:00