nvmf: move AER command handling to session.c
Change-Id: Ib2ffdc253df808547a43f7f8e52b8d4d53c09c96 Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
6da9e1792a
commit
b6c72d7b09
@ -176,10 +176,8 @@ nvmf_direct_ctrlr_process_admin_cmd(struct spdk_nvmf_request *req)
|
||||
}
|
||||
break;
|
||||
case SPDK_NVME_OPC_ASYNC_EVENT_REQUEST:
|
||||
SPDK_TRACELOG(SPDK_TRACE_NVMF, "Async Event Request\n");
|
||||
session->aer_req = req;
|
||||
return spdk_nvmf_session_async_event_request(req);
|
||||
|
||||
return SPDK_NVMF_REQUEST_EXEC_STATUS_ASYNCHRONOUS;
|
||||
case SPDK_NVME_OPC_KEEP_ALIVE:
|
||||
SPDK_TRACELOG(SPDK_TRACE_NVMF, "Keep Alive\n");
|
||||
/*
|
||||
|
@ -763,3 +763,14 @@ spdk_nvmf_session_get_features_async_event_configuration(struct spdk_nvmf_reques
|
||||
rsp->cdw0 = session->async_event_config.raw;
|
||||
return SPDK_NVMF_REQUEST_EXEC_STATUS_COMPLETE;
|
||||
}
|
||||
|
||||
int
|
||||
spdk_nvmf_session_async_event_request(struct spdk_nvmf_request *req)
|
||||
{
|
||||
struct spdk_nvmf_session *session = req->conn->sess;
|
||||
|
||||
SPDK_TRACELOG(SPDK_TRACE_NVMF, "Async Event Request\n");
|
||||
|
||||
session->aer_req = req;
|
||||
return SPDK_NVMF_REQUEST_EXEC_STATUS_ASYNCHRONOUS;
|
||||
}
|
||||
|
@ -129,4 +129,6 @@ int spdk_nvmf_session_get_features_number_of_queues(struct spdk_nvmf_request *re
|
||||
int spdk_nvmf_session_set_features_async_event_configuration(struct spdk_nvmf_request *req);
|
||||
int spdk_nvmf_session_get_features_async_event_configuration(struct spdk_nvmf_request *req);
|
||||
|
||||
int spdk_nvmf_session_async_event_request(struct spdk_nvmf_request *req);
|
||||
|
||||
#endif
|
||||
|
@ -340,10 +340,7 @@ nvmf_virtual_ctrlr_process_admin_cmd(struct spdk_nvmf_request *req)
|
||||
case SPDK_NVME_OPC_SET_FEATURES:
|
||||
return nvmf_virtual_ctrlr_set_features(req);
|
||||
case SPDK_NVME_OPC_ASYNC_EVENT_REQUEST:
|
||||
SPDK_TRACELOG(SPDK_TRACE_NVMF, "Async Event Request\n");
|
||||
/* TODO: Just release the request as consumed. AER events will never
|
||||
* be triggered. */
|
||||
return SPDK_NVMF_REQUEST_EXEC_STATUS_RELEASE;
|
||||
return spdk_nvmf_session_async_event_request(req);
|
||||
case SPDK_NVME_OPC_KEEP_ALIVE:
|
||||
SPDK_TRACELOG(SPDK_TRACE_NVMF, "Keep Alive\n");
|
||||
/*
|
||||
|
@ -174,6 +174,12 @@ spdk_nvmf_session_get_features_async_event_configuration(struct spdk_nvmf_reques
|
||||
return -1;
|
||||
}
|
||||
|
||||
int
|
||||
spdk_nvmf_session_async_event_request(struct spdk_nvmf_request *req)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* test suite function */
|
||||
static void
|
||||
nvmf_test_nvmf_direct_ctrlr_admin_identify_nslist(void)
|
||||
|
@ -88,6 +88,12 @@ spdk_nvmf_session_get_features_async_event_configuration(struct spdk_nvmf_reques
|
||||
return -1;
|
||||
}
|
||||
|
||||
int
|
||||
spdk_nvmf_session_async_event_request(struct spdk_nvmf_request *req)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
int
|
||||
spdk_nvmf_request_complete(struct spdk_nvmf_request *req)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user