Commit 8742418f authored by Alexey Marchuk's avatar Alexey Marchuk Committed by Tomasz Zawadzki
Browse files

nvmf/rdma: Remove redundant private_data verification



Size of private data is already verified in this function.
Also private data is not optional according to the spec.

Signed-off-by: default avatarAlexey Marchuk <alexeymar@nvidia.com>
Change-Id: If26f1dcfcb124ce3ae50ab5893c9e48bd89f8b46
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/19119


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <jim.harris@gmail.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarShuhei Matsumoto <smatsumoto@nvidia.com>
parent 6bc8d265
Loading
Loading
Loading
Loading
+4 −9
Original line number Diff line number Diff line
@@ -1319,15 +1319,10 @@ nvmf_rdma_connect(struct spdk_nvmf_transport *transport, struct rdma_cm_event *e
	}
	max_read_depth = spdk_min(max_read_depth, rdma_param->initiator_depth);

	/* Finally check for the host software requested values, which are
	 * optional. */
	if (rdma_param->private_data != NULL &&
	    rdma_param->private_data_len >= sizeof(struct spdk_nvmf_rdma_request_private_data)) {
	SPDK_DEBUGLOG(rdma, "Host Receive Queue Size: %d\n", private_data->hrqsize);
	SPDK_DEBUGLOG(rdma, "Host Send Queue Size: %d\n", private_data->hsqsize);
	max_queue_depth = spdk_min(max_queue_depth, private_data->hrqsize);
	max_queue_depth = spdk_min(max_queue_depth, private_data->hsqsize + 1);
	}

	SPDK_DEBUGLOG(rdma, "Final Negotiated Queue Depth: %d R/W Depth: %d\n",
		      max_queue_depth, max_read_depth);