nvme/rdma: Remove queue depth adjustment to crqsize
According to NVMe over Fabrics specification (rev.1.1a) HSQSIZE sent in RDMA_CM_REQUEST private data (ch.7.3.6.4) shall be the same as SQSIZE later sent in Connect command (ch.3.3). SPDK NVMe RDMA initiator adjusts SQSIZE to CRQSIZE received from target in RDMA_CM_ACCEPT private data. Target is allowed to send CRQSIZE < HSQSIZE if RNR retries are used. So, it is possible that SQSIZE sent by SPDK will be lower than previously sent HSQSIZE. There are targets validating this match and they reject connection from SPDK. Linux kernel NVMe initiator doesn't perform such adjustments and connects well to such targets. This patch aligns SPDK behavior with specification and Linux kernel implementation. Signed-off-by: Evgeniy Kochetov <evgeniik@nvidia.com> Change-Id: I01968d1c07d284396fa5939932d85841351d7a45 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11350 Community-CI: Mellanox Build Bot Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
47dd5b4a35
commit
486426529d
@ -507,9 +507,8 @@ nvme_rdma_qpair_process_cm_event(struct nvme_rdma_qpair *rqpair)
|
||||
if (accept_data == NULL) {
|
||||
rc = -1;
|
||||
} else {
|
||||
SPDK_DEBUGLOG(nvme, "Requested queue depth %d. Actually got queue depth %d.\n",
|
||||
SPDK_DEBUGLOG(nvme, "Requested queue depth %d. Target receive queue depth %d.\n",
|
||||
rqpair->num_entries, accept_data->crqsize);
|
||||
rqpair->num_entries = spdk_min(rqpair->num_entries, accept_data->crqsize);
|
||||
}
|
||||
break;
|
||||
case RDMA_CM_EVENT_DISCONNECTED:
|
||||
|
@ -661,7 +661,7 @@ test_nvme_rdma_qpair_process_cm_event(void)
|
||||
rqpair.num_entries = 1024;
|
||||
rc = nvme_rdma_qpair_process_cm_event(&rqpair);
|
||||
CU_ASSERT(rc == 0);
|
||||
CU_ASSERT(rqpair.num_entries == 512);
|
||||
CU_ASSERT(rqpair.num_entries == 1024);
|
||||
|
||||
/* case6: event == RDMA_CM_EVENT_DISCONNECTED */
|
||||
rqpair.evt = &event;
|
||||
|
Loading…
Reference in New Issue
Block a user