nvme: only update cntlid after adminq connect

For ioq, target is supposed to respond with the same
cntlid as specified in the connect capsule, but the
Linux kernel target doesn't actually do that.  It really
only needs to be set on the adminq connect, so just
do that.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I4eec605f856bdad2c8614d505241566a9fe292ab

Reviewed-on: https://review.gerrithub.io/372345
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Jim Harris 2017-08-01 23:45:49 -07:00
parent 905f19304d
commit 0158f354db

View File

@ -621,8 +621,10 @@ nvme_rdma_qpair_fabric_connect(struct nvme_rdma_qpair *rqpair)
return -1;
}
rsp = (struct spdk_nvmf_fabric_connect_rsp *)&status.cpl;
rctrlr->cntlid = rsp->status_code_specific.success.cntlid;
if (nvme_qpair_is_admin_queue(&rqpair->qpair)) {
rsp = (struct spdk_nvmf_fabric_connect_rsp *)&status.cpl;
rctrlr->cntlid = rsp->status_code_specific.success.cntlid;
}
ret:
spdk_dma_free(nvmf_data);
return rc;