nvmf: set cid when failing a misordered fused command
If we don't set the cid before failing the misordered command, we use some other random cid, causing the initiator to think the wrong command was completed. Fixes #2481. For this issue, the target was completing a previously submitted AER, not the fuzzed fused command. The initiator would then submit another AER to replace the completed one, but the target complained that the initiator sent too many AERs since the target didn't really know it had completed an AER so hadn't adjusted its num_aer count. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: I4bd66f147086b262d0e48b8399d237e5ed3c2651 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12452 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
parent
a876c45f07
commit
f0935084bd
@ -2888,6 +2888,7 @@ nvmf_tcp_req_process(struct spdk_nvmf_tcp_transport *ttransport,
|
|||||||
*/
|
*/
|
||||||
tcp_req->req.rsp->nvme_cpl.status.sct = SPDK_NVME_SCT_GENERIC;
|
tcp_req->req.rsp->nvme_cpl.status.sct = SPDK_NVME_SCT_GENERIC;
|
||||||
tcp_req->req.rsp->nvme_cpl.status.sc = SPDK_NVME_SC_ABORTED_MISSING_FUSED;
|
tcp_req->req.rsp->nvme_cpl.status.sc = SPDK_NVME_SC_ABORTED_MISSING_FUSED;
|
||||||
|
tcp_req->req.rsp->nvme_cpl.cid = tcp_req->req.cmd->nvme_cmd.cid;
|
||||||
nvmf_tcp_req_set_state(tcp_req, TCP_REQUEST_STATE_READY_TO_COMPLETE);
|
nvmf_tcp_req_set_state(tcp_req, TCP_REQUEST_STATE_READY_TO_COMPLETE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user