nvme: don't queue fabrics CONNECT command
This allows for submitting IO requests before the CONNECT command is sent and not stopping the connect process due to the CONNECT being queued. It could happen once IO qpair connection is asynchronous. Signed-off-by: Jim Harris <james.r.harris@intel.com> Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Change-Id: I04e45b1c2f49f9da3412c843ea899341c56a0420 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8624 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
parent
17f99bbb46
commit
8280d5f2fc
@ -985,13 +985,18 @@ nvme_qpair_submit_request(struct spdk_nvme_qpair *qpair, struct nvme_request *re
|
||||
|
||||
if (spdk_unlikely(!STAILQ_EMPTY(&qpair->queued_req) && req->num_children == 0)) {
|
||||
/*
|
||||
* requests that have no children should be sent to the transport after all
|
||||
* Requests that have no children should be sent to the transport after all
|
||||
* currently queued requests. Requests with chilren will be split and go back
|
||||
* through this path.
|
||||
* through this path. We need to make an exception for the fabrics commands
|
||||
* while the qpair is connecting to be able to send the connect command
|
||||
* asynchronously.
|
||||
*/
|
||||
STAILQ_INSERT_TAIL(&qpair->queued_req, req, stailq);
|
||||
req->queued = true;
|
||||
return 0;
|
||||
if (req->cmd.opc != SPDK_NVME_OPC_FABRIC ||
|
||||
nvme_qpair_get_state(qpair) != NVME_QPAIR_CONNECTING) {
|
||||
STAILQ_INSERT_TAIL(&qpair->queued_req, req, stailq);
|
||||
req->queued = true;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
rc = _nvme_qpair_submit_request(qpair, req);
|
||||
|
Loading…
Reference in New Issue
Block a user