From 81344a66ef94970a2fe18c85f1ab39fc7df1749b Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Wed, 31 May 2017 16:14:01 -0700 Subject: [PATCH] nvmf: make spdk_nvmf_ctrlr_ops contents private This structure is not part of the public API and shouldn't be in spdk/nvmf.h. Change-Id: I29fbb269d3ab77cd9fa9908726abc7c7a4c6d8c1 Signed-off-by: Daniel Verkamp Reviewed-on: https://review.gerrithub.io/363296 Tested-by: SPDK Automated Test System Reviewed-by: Ben Walker --- include/spdk/nvmf.h | 33 +-------------------------------- lib/nvmf/nvmf_internal.h | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 32 deletions(-) diff --git a/include/spdk/nvmf.h b/include/spdk/nvmf.h index c410eb809..96263d371 100644 --- a/include/spdk/nvmf.h +++ b/include/spdk/nvmf.h @@ -62,6 +62,7 @@ struct spdk_bdev; struct spdk_nvme_ctrlr; struct spdk_nvmf_request; struct spdk_nvmf_conn; +struct spdk_nvmf_ctrlr_ops; typedef void (*spdk_nvmf_subsystem_connect_fn)(void *cb_ctx, struct spdk_nvmf_request *req); typedef void (*spdk_nvmf_subsystem_disconnect_fn)(void *cb_ctx, struct spdk_nvmf_conn *conn); @@ -83,38 +84,6 @@ struct spdk_nvmf_host { TAILQ_ENTRY(spdk_nvmf_host) link; }; -struct spdk_nvmf_ctrlr_ops { - /** - * Initialize the controller. - */ - int (*attach)(struct spdk_nvmf_subsystem *subsystem); - - /** - * Get NVMe identify controller data. - */ - void (*ctrlr_get_data)(struct spdk_nvmf_session *session); - - /** - * Process admin command. - */ - int (*process_admin_cmd)(struct spdk_nvmf_request *req); - - /** - * Process IO command. - */ - int (*process_io_cmd)(struct spdk_nvmf_request *req); - - /** - * Poll for completions. - */ - void (*poll_for_completions)(struct spdk_nvmf_subsystem *subsystem); - - /** - * Detach the controller. - */ - void (*detach)(struct spdk_nvmf_subsystem *subsystem); -}; - struct spdk_nvmf_subsystem_allowed_listener { struct spdk_nvmf_listen_addr *listen_addr; TAILQ_ENTRY(spdk_nvmf_subsystem_allowed_listener) link; diff --git a/lib/nvmf/nvmf_internal.h b/lib/nvmf/nvmf_internal.h index 3be0d470b..ce79a1775 100644 --- a/lib/nvmf/nvmf_internal.h +++ b/lib/nvmf/nvmf_internal.h @@ -36,6 +36,7 @@ #include "spdk/stdinc.h" +#include "spdk/nvmf.h" #include "spdk/nvmf_spec.h" #include "spdk/assert.h" #include "spdk/queue.h" @@ -43,6 +44,38 @@ #define SPDK_NVMF_DEFAULT_NUM_SESSIONS_PER_LCORE 1 +struct spdk_nvmf_ctrlr_ops { + /** + * Initialize the controller. + */ + int (*attach)(struct spdk_nvmf_subsystem *subsystem); + + /** + * Get NVMe identify controller data. + */ + void (*ctrlr_get_data)(struct spdk_nvmf_session *session); + + /** + * Process admin command. + */ + int (*process_admin_cmd)(struct spdk_nvmf_request *req); + + /** + * Process IO command. + */ + int (*process_io_cmd)(struct spdk_nvmf_request *req); + + /** + * Poll for completions. + */ + void (*poll_for_completions)(struct spdk_nvmf_subsystem *subsystem); + + /** + * Detach the controller. + */ + void (*detach)(struct spdk_nvmf_subsystem *subsystem); +}; + struct spdk_nvmf_tgt { uint16_t max_queue_depth; uint16_t max_queues_per_session;