Commit 39d59206 authored by Ziye Yang's avatar Ziye Yang Committed by Daniel Verkamp
Browse files

nvmf,tgt: SPDK_NVME_FEAT_ASYNC_EVENT_CONFIGURATION handle



Even for direct mode, each session should use its own
async event configuration like virtual mode instead of
passthrough.

Change-Id: I9c1175f3677c672c0cad684341b8a46a575d753e
Signed-off-by: default avatarZiye Yang <ziye.yang@intel.com>
parent dd16a727
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -154,6 +154,10 @@ nvmf_direct_ctrlr_process_admin_cmd(struct spdk_nvmf_request *req)
			return spdk_nvmf_session_get_features_host_identifier(req);
		case SPDK_NVME_FEAT_KEEP_ALIVE_TIMER:
			return spdk_nvmf_session_get_features_keep_alive_timer(req);
		case SPDK_NVME_FEAT_ASYNC_EVENT_CONFIGURATION:
			SPDK_TRACELOG(SPDK_TRACE_NVMF, "Get Features - Async Event Configuration\n");
			response->cdw0 = session->async_event_config.raw;
			return SPDK_NVMF_REQUEST_EXEC_STATUS_COMPLETE;
		default:
			goto passthrough;
		}
@@ -167,6 +171,11 @@ nvmf_direct_ctrlr_process_admin_cmd(struct spdk_nvmf_request *req)
			return spdk_nvmf_session_set_features_host_identifier(req);
		case SPDK_NVME_FEAT_KEEP_ALIVE_TIMER:
			return spdk_nvmf_session_set_features_keep_alive_timer(req);
		case SPDK_NVME_FEAT_ASYNC_EVENT_CONFIGURATION:
			SPDK_TRACELOG(SPDK_TRACE_NVMF, "Set Features - Async Event Configuration, cdw11 0x%08x\n",
				      cmd->cdw11);
			session->async_event_config.raw = cmd->cdw11;
			return SPDK_NVMF_REQUEST_EXEC_STATUS_COMPLETE;
		default:
			goto passthrough;
		}