Spdk/test/unit/lib/nvme
Shuhei Matsumoto cdf61c2f22 nvme: Polls only the qpair if ctrlr is not fabrics when connecting synchronously
For non-fabric controllers, the corresponding I/O qpairs are simply
re-enabled at controller reset.

This had a issue when I/O qpairs span multiple threads and poll group
is used.

spdk_nvme_ctrlr_reconnect_poll_async() calls
nvme_transport_ctrlr_connect_qpair() with qpair->async being false.
Then nvme_transport_ctrlr_connect_qpair() calls
spdk_nvme_poll_group_process_completions() until the qpair is connected.
spdk_nvme_poll_group_process_completions() may poll other qpairs.
This may cause I/O to complete on a wrong thread.

For PCIe controller, spdk_nvme_poll_group_process_completions() calls
spdk_nvme_qpair_process_completions() simply for each qpair.

Hence change nvme_transport_ctrlr_connect_qpair() to call
spdk_nvme_qpair_process_completions() if the controller is non-fabrics.

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: Ieb270c2fb154124021ef6d25577b817d05e5ca9e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14295
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2022-09-05 12:50:00 +00:00
..
nvme_ctrlr_cmd.c check_format: For C files only, fix return type breaks 2022-06-27 09:33:48 +00:00
nvme_ctrlr_ocssd_cmd.c check_format: For C files only, fix return type breaks 2022-06-27 09:33:48 +00:00
nvme_ctrlr.c nvme: Use spdk_nvme_ctrlr_is_fabrics() to update ioccsz 2022-08-12 08:59:52 +00:00
nvme_cuse.c check_format: For C files only, fix return type breaks 2022-06-27 09:33:48 +00:00
nvme_fabric.c nvme_fabrics: Lock mutext when prcessing set/get regs 2022-07-15 16:06:54 +00:00
nvme_io_msg.c check_format: For C files only, fix return type breaks 2022-06-27 09:33:48 +00:00
nvme_ns_cmd.c nvme: add support for verify command 2022-08-16 10:25:01 +00:00
nvme_ns_ocssd_cmd.c check_format: For C files only, fix return type breaks 2022-06-27 09:33:48 +00:00
nvme_ns.c check_format: For C files only, fix return type breaks 2022-06-27 09:33:48 +00:00
nvme_opal.c check_format: For C files only, fix return type breaks 2022-06-27 09:33:48 +00:00
nvme_pcie_common.c check_format: For C files only, fix return type breaks 2022-06-27 09:33:48 +00:00
nvme_pcie.c check_format: For C files only, fix return type breaks 2022-06-27 09:33:48 +00:00
nvme_poll_group.c Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
nvme_qpair.c nvme: Add ctrlr_abort_queued_aborts() into qpair_abort_all_queued_reqs() 2022-06-30 07:51:23 +00:00
nvme_quirks.c check_format: For C files only, fix return type breaks 2022-06-27 09:33:48 +00:00
nvme_rdma.c nvme_rdma: Release poller from poll group when qpair is actually disconnected 2022-09-05 12:49:11 +00:00
nvme_tcp.c sock: make impl_name const char * in all functions 2022-09-05 12:49:28 +00:00
nvme_transport.c nvme: Polls only the qpair if ctrlr is not fabrics when connecting synchronously 2022-09-05 12:50:00 +00:00
nvme.c check_format: For C files only, fix return type breaks 2022-06-27 09:33:48 +00:00
Makefile Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00