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: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
f6d8e3d421
commit
82ea261126
@ -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;
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user