Commit 226b4b7a authored by Daniel Verkamp's avatar Daniel Verkamp
Browse files

nvmf: extract keyed SGL fields in rdma.c



Drop the RDMA-specific fields from spdk_nvmf_request and get them
directly from the command SGL in the transport-specific read function.

Change-Id: Icd06a9018a8c341213fbc8d26d3d7cbf2fb32d30
Signed-off-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent 8b419899
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -237,8 +237,12 @@ nvmf_ibv_send_wr_init(struct ibv_send_wr *wr,
	wr->num_sge = 1;

	if (req != NULL) {
		wr->wr.rdma.rkey = req->rkey;
		wr->wr.rdma.remote_addr = req->remote_addr;
		struct spdk_nvme_sgl_descriptor *sgl = &req->cmd->nvme_cmd.dptr.sgl1;

		RTE_VERIFY(sgl->generic.type == SPDK_NVME_SGL_TYPE_KEYED_DATA_BLOCK);

		wr->wr.rdma.rkey = sgl->keyed.key;
		wr->wr.rdma.remote_addr = sgl->address;

		SPDK_TRACELOG(SPDK_TRACE_RDMA, "rkey %x\n", wr->wr.rdma.rkey);
		SPDK_TRACELOG(SPDK_TRACE_RDMA, "remote addr %p\n",
+0 −2
Original line number Diff line number Diff line
@@ -558,8 +558,6 @@ spdk_nvmf_request_prep_data(struct spdk_nvmf_request *req,
			}

			req->data = bb;
			req->remote_addr = sgl->address;
			req->rkey = sgl->keyed.key;
			req->length = sgl->keyed.length;
		} else if (sgl->generic.type == SPDK_NVME_SGL_TYPE_DATA_BLOCK &&
			   sgl->unkeyed.subtype == SPDK_NVME_SGL_SUBTYPE_OFFSET) {
+0 −2
Original line number Diff line number Diff line
@@ -59,8 +59,6 @@ SPDK_STATIC_ASSERT(sizeof(union nvmf_c2h_msg) == 16, "Incorrect size");

struct spdk_nvmf_request {
	struct spdk_nvmf_conn		*conn;
	uint64_t			remote_addr;
	uint32_t			rkey;
	uint32_t			length;
	enum spdk_nvme_data_transfer	xfer;
	void				*data;