nvme: don't reinit qpairs for vfio-user during reset
Previously we were only checking trtype==PCIE to determine whether a controller was fabrics. This skipped the vfio-user case. So use the new spdk_nvme_transport_id_is_fabrics() API instead. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: I81f26853f44b1c47522ce6354e5aa4a905796bd0 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8089 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: <dongx.yi@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
b832f99f88
commit
43b4883217
@ -1438,13 +1438,13 @@ spdk_nvme_ctrlr_reset(struct spdk_nvme_ctrlr *ctrlr)
|
||||
}
|
||||
|
||||
/*
|
||||
* For PCIe controllers, the memory locations of the transport qpair
|
||||
* For non-fabrics controllers, the memory locations of the transport qpair
|
||||
* don't change when the controller is reset. They simply need to be
|
||||
* re-enabled with admin commands to the controller. For fabric
|
||||
* controllers we need to disconnect and reconnect the qpair on its
|
||||
* own thread outside of the context of the reset.
|
||||
*/
|
||||
if (rc == 0 && ctrlr->trid.trtype == SPDK_NVME_TRANSPORT_PCIE) {
|
||||
if (rc == 0 && !spdk_nvme_ctrlr_is_fabrics(ctrlr)) {
|
||||
/* Reinitialize qpairs */
|
||||
TAILQ_FOREACH(qpair, &ctrlr->active_io_qpairs, tailq) {
|
||||
assert(spdk_bit_array_get(ctrlr->free_io_qids, qpair->id));
|
||||
|
Loading…
Reference in New Issue
Block a user