nvmf: Handle NICs that don't report RDMA initiator_depth

I believe this is required for NICs to report, but handle
the case where it isn't reported.

Change-Id: I38d10c3590d1df8bb902ab312af0f9e01b9e5032
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Ben Walker 2016-10-20 13:36:38 -07:00
parent a1a085cf6b
commit f64690d49a

View File

@ -667,7 +667,9 @@ nvmf_rdma_connect(struct rdma_cm_event *event)
SPDK_TRACELOG(SPDK_TRACE_RDMA,
"Host NIC Max Incoming RDMA R/W operations: %d Max Outgoing RDMA R/W operations: %d\n",
rdma_param->initiator_depth, rdma_param->responder_resources);
max_rw_depth = nvmf_min(max_rw_depth, rdma_param->initiator_depth);
if (rdma_param->initiator_depth > 0) {
max_rw_depth = nvmf_min(max_rw_depth, rdma_param->initiator_depth);
}
/* Finally check for the host software requested values, which are
* optional. */