Commit 82ea2611 authored by Daniel Verkamp's avatar Daniel Verkamp
Browse files

nvmf: move nvmf_complete_cmd to request.c



This is the only file that calls it, so it can be static.

Change-Id: I47573b7b38b40ad37e758234245eedbe94ae0a12
Signed-off-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent f6d8e3d4
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -108,10 +108,6 @@ struct spdk_nvmf_globals {
	uint16_t	   sin_port;
};

void
nvmf_complete_cmd(void *rsp, const struct spdk_nvme_cpl *cmp);


int nvmf_tgt_init(char *nodebase, int max_queue_depth, int max_conn_per_sess);

extern struct spdk_nvmf_globals g_nvmf_tgt;
+14 −0
Original line number Diff line number Diff line
@@ -128,6 +128,20 @@ nvmf_process_discovery_cmd(struct spdk_nvmf_request *req)
	return true;
}

static void
nvmf_complete_cmd(void *ctx, const struct spdk_nvme_cpl *cmp)
{
	struct spdk_nvmf_request *req = ctx;
	struct spdk_nvme_cpl *response;

	spdk_trace_record(TRACE_NVMF_LIB_COMPLETE, 0, 0, (uint64_t)req, 0);

	response = &req->rsp->nvme_cpl;
	memcpy(response, cmp, sizeof(*cmp));

	spdk_nvmf_request_complete(req);
}

static bool
nvmf_process_admin_cmd(struct spdk_nvmf_request *req)
{
+0 −14
Original line number Diff line number Diff line
@@ -284,20 +284,6 @@ nvmf_disconnect(struct nvmf_session *session,
	}
}

void
nvmf_complete_cmd(void *ctx, const struct spdk_nvme_cpl *cmp)
{
	struct spdk_nvmf_request *req  = ctx;
	struct spdk_nvme_cpl *response;

	spdk_trace_record(TRACE_NVMF_LIB_COMPLETE, 0, 0, (uint64_t)req, 0);

	response = &req->rsp->nvme_cpl;
	memcpy(response, cmp, sizeof(*cmp));

	spdk_nvmf_request_complete(req);
}

static uint64_t
nvmf_prop_get_cap(struct nvmf_session *session)
{