test/unit: remove unnecessary mock definitions
Added -ffunction-sections / --gc-sections to allow the linker to remove unused functions when linking test executables. This reduces the number of required mock definitions to those actually required by tested code. Change-Id: I22725ce82e22675a7c2d28c8227e586f2cd65023 Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Reviewed-on: https://review.gerrithub.io/c/436319 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
eecc6dc8e6
commit
3816dbf89b
@ -39,6 +39,8 @@ C_SRCS = $(TEST_FILE)
|
||||
|
||||
CFLAGS += -I$(SPDK_ROOT_DIR)/lib
|
||||
CFLAGS += -I$(SPDK_ROOT_DIR)/test
|
||||
CFLAGS += -ffunction-sections
|
||||
LDFLAGS += -Wl,--gc-sections
|
||||
|
||||
SPDK_LIB_LIST += thread util log sock
|
||||
|
||||
|
@ -42,7 +42,6 @@
|
||||
*/
|
||||
#include "rte_crypto.h"
|
||||
#include "rte_cryptodev.h"
|
||||
DEFINE_STUB_V(rte_crypto_op_free, (struct rte_crypto_op *op));
|
||||
#include "bdev/crypto/vbdev_crypto.c"
|
||||
|
||||
/* SPDK stubs */
|
||||
@ -59,7 +58,6 @@ DEFINE_STUB(spdk_bdev_io_type_supported, bool, (struct spdk_bdev *bdev,
|
||||
DEFINE_STUB_V(spdk_bdev_module_release_bdev, (struct spdk_bdev *bdev));
|
||||
DEFINE_STUB_V(spdk_bdev_close, (struct spdk_bdev_desc *desc));
|
||||
DEFINE_STUB(spdk_bdev_get_name, const char *, (const struct spdk_bdev *bdev), 0);
|
||||
DEFINE_STUB(spdk_env_get_current_core, uint32_t, (void), 0);
|
||||
DEFINE_STUB(spdk_bdev_get_io_channel, struct spdk_io_channel *, (struct spdk_bdev_desc *desc), 0);
|
||||
DEFINE_STUB_V(spdk_bdev_unregister, (struct spdk_bdev *bdev, spdk_bdev_unregister_cb cb_fn,
|
||||
void *cb_arg));
|
||||
@ -71,7 +69,6 @@ DEFINE_STUB(spdk_bdev_module_claim_bdev, int, (struct spdk_bdev *bdev, struct sp
|
||||
DEFINE_STUB_V(spdk_bdev_module_examine_done, (struct spdk_bdev_module *module));
|
||||
DEFINE_STUB(spdk_vbdev_register, int, (struct spdk_bdev *vbdev, struct spdk_bdev **base_bdevs,
|
||||
int base_bdev_count), 0);
|
||||
DEFINE_STUB(spdk_bdev_get_by_name, struct spdk_bdev *, (const char *bdev_name), NULL);
|
||||
DEFINE_STUB(spdk_env_get_socket_id, uint32_t, (uint32_t core), 0);
|
||||
|
||||
/* DPDK stubs */
|
||||
@ -83,22 +80,20 @@ DEFINE_STUB(rte_crypto_op_pool_create, struct rte_mempool *,
|
||||
(const char *name, enum rte_crypto_op_type type, unsigned nb_elts,
|
||||
unsigned cache_size, uint16_t priv_size, int socket_id), (struct rte_mempool *)1);
|
||||
DEFINE_STUB(rte_cryptodev_device_count_by_driver, uint8_t, (uint8_t driver_id), 0);
|
||||
DEFINE_STUB(rte_cryptodev_socket_id, int, (uint8_t dev_id), 0);
|
||||
DEFINE_STUB(rte_cryptodev_configure, int, (uint8_t dev_id, struct rte_cryptodev_config *config), 0);
|
||||
DEFINE_STUB(rte_cryptodev_queue_pair_setup, int, (uint8_t dev_id, uint16_t queue_pair_id,
|
||||
const struct rte_cryptodev_qp_conf *qp_conf,
|
||||
int socket_id, struct rte_mempool *session_pool), 0);
|
||||
DEFINE_STUB(rte_cryptodev_start, int, (uint8_t dev_id), 0)
|
||||
DEFINE_STUB(rte_cryptodev_start, int, (uint8_t dev_id), 0);
|
||||
DEFINE_STUB_V(rte_cryptodev_stop, (uint8_t dev_id));
|
||||
DEFINE_STUB(rte_cryptodev_sym_session_create, struct rte_cryptodev_sym_session *,
|
||||
(struct rte_mempool *mempool), (struct rte_cryptodev_sym_session *)1);
|
||||
DEFINE_STUB(rte_cryptodev_sym_session_clear, int, (uint8_t dev_id,
|
||||
struct rte_cryptodev_sym_session *sess), 0);
|
||||
DEFINE_STUB(rte_cryptodev_sym_session_free, int, (struct rte_cryptodev_sym_session *sess), 0);
|
||||
DEFINE_STUB(rte_cryptodev_sym_session_init, int, (uint8_t dev_id,
|
||||
struct rte_cryptodev_sym_session *sess,
|
||||
struct rte_crypto_sym_xform *xforms, struct rte_mempool *mempool), 0);
|
||||
DEFINE_STUB(rte_vdev_init, int, (const char *name, const char *args), 0);
|
||||
DEFINE_STUB(rte_cryptodev_sym_session_free, int, (struct rte_cryptodev_sym_session *sess), 0);
|
||||
|
||||
void __attribute__((noreturn)) __rte_panic(const char *funcname, const char *format, ...)
|
||||
{
|
||||
abort();
|
||||
@ -285,12 +280,6 @@ rte_mempool_put_bulk(struct rte_mempool *mp, void *const *obj_table,
|
||||
return;
|
||||
}
|
||||
|
||||
static inline void *rte_mempool_get_priv(struct rte_mempool *mp)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
static inline int
|
||||
rte_crypto_op_attach_sym_session(struct rte_crypto_op *op,
|
||||
struct rte_cryptodev_sym_session *sess)
|
||||
|
@ -44,9 +44,6 @@
|
||||
|
||||
#define BDEV_UT_NUM_THREADS 3
|
||||
|
||||
DEFINE_STUB_V(spdk_scsi_nvme_translate, (const struct spdk_bdev_io *bdev_io,
|
||||
int *sc, int *sk, int *asc, int *ascq));
|
||||
|
||||
DEFINE_STUB(spdk_conf_find_section, struct spdk_conf_section *, (struct spdk_conf *cp,
|
||||
const char *name), NULL);
|
||||
DEFINE_STUB(spdk_conf_section_get_nmval, char *,
|
||||
|
@ -39,23 +39,11 @@
|
||||
|
||||
#define test_argc 6
|
||||
|
||||
DEFINE_STUB_V(spdk_rpc_initialize, (const char *listen_addr));
|
||||
DEFINE_STUB_V(spdk_rpc_finish, (void));
|
||||
DEFINE_STUB_V(spdk_event_call, (struct spdk_event *event));
|
||||
DEFINE_STUB_V(spdk_reactors_start, (void));
|
||||
DEFINE_STUB_V(spdk_reactors_stop, (void *arg1, void *arg2));
|
||||
DEFINE_STUB(spdk_reactors_init, int, (unsigned int max_delay_us), 0);
|
||||
DEFINE_STUB_V(spdk_reactors_fini, (void));
|
||||
DEFINE_STUB(spdk_event_allocate, struct spdk_event *, (uint32_t core, spdk_event_fn fn, void *arg1,
|
||||
void *arg2), NULL);
|
||||
DEFINE_STUB(spdk_env_get_current_core, uint32_t, (void), 0);
|
||||
DEFINE_STUB(spdk_app_get_core_mask, struct spdk_cpuset *, (void), NULL);
|
||||
DEFINE_STUB_V(spdk_subsystem_config, (FILE *fp));
|
||||
DEFINE_STUB_V(spdk_subsystem_init, (struct spdk_event *app_start_event));
|
||||
DEFINE_STUB_V(spdk_subsystem_fini, (struct spdk_event *app_stop_event));
|
||||
DEFINE_STUB(spdk_env_init, int, (const struct spdk_env_opts *opts), 0);
|
||||
DEFINE_STUB_V(spdk_env_opts_init, (struct spdk_env_opts *opts));
|
||||
DEFINE_STUB(spdk_env_get_core_count, uint32_t, (void), 1);
|
||||
DEFINE_STUB_V(spdk_rpc_register_method, (const char *method, spdk_rpc_method_handler func,
|
||||
uint32_t state_mask));
|
||||
DEFINE_STUB_V(spdk_rpc_set_state, (uint32_t state));
|
||||
|
@ -41,52 +41,24 @@
|
||||
|
||||
#include "common/lib/test_env.c"
|
||||
|
||||
DEFINE_STUB_V(nvme_ctrlr_fail,
|
||||
(struct spdk_nvme_ctrlr *ctrlr, bool hot_remove))
|
||||
|
||||
DEFINE_STUB_V(nvme_ctrlr_proc_get_ref, (struct spdk_nvme_ctrlr *ctrlr))
|
||||
|
||||
DEFINE_STUB_V(nvme_ctrlr_proc_put_ref, (struct spdk_nvme_ctrlr *ctrlr))
|
||||
|
||||
DEFINE_STUB(spdk_pci_nvme_enumerate, int,
|
||||
(spdk_pci_enum_cb enum_cb, void *enum_ctx), -1)
|
||||
|
||||
DEFINE_STUB(spdk_pci_device_get_id, struct spdk_pci_id,
|
||||
(struct spdk_pci_device *pci_dev),
|
||||
MOCK_STRUCT_INIT(.vendor_id = 0xffff, .device_id = 0xffff,
|
||||
.subvendor_id = 0xffff, .subdevice_id = 0xffff))
|
||||
|
||||
DEFINE_STUB_V(nvme_ctrlr_proc_get_ref, (struct spdk_nvme_ctrlr *ctrlr));
|
||||
DEFINE_STUB_V(nvme_ctrlr_proc_put_ref, (struct spdk_nvme_ctrlr *ctrlr));
|
||||
DEFINE_STUB(spdk_nvme_transport_available, bool,
|
||||
(enum spdk_nvme_transport_type trtype), true)
|
||||
|
||||
(enum spdk_nvme_transport_type trtype), true);
|
||||
/* return anything non-NULL, this won't be deferenced anywhere in this test */
|
||||
DEFINE_STUB(spdk_nvme_ctrlr_get_current_process, struct spdk_nvme_ctrlr_process *,
|
||||
(struct spdk_nvme_ctrlr *ctrlr), (struct spdk_nvme_ctrlr_process *)(uintptr_t)0x1)
|
||||
|
||||
DEFINE_STUB(nvme_ctrlr_add_process, int,
|
||||
(struct spdk_nvme_ctrlr *ctrlr, void *devhandle), 0)
|
||||
|
||||
(struct spdk_nvme_ctrlr *ctrlr), (struct spdk_nvme_ctrlr_process *)(uintptr_t)0x1);
|
||||
DEFINE_STUB(nvme_ctrlr_process_init, int,
|
||||
(struct spdk_nvme_ctrlr *ctrlr), 0)
|
||||
|
||||
DEFINE_STUB(spdk_pci_device_get_addr, struct spdk_pci_addr,
|
||||
(struct spdk_pci_device *pci_dev), {0})
|
||||
|
||||
(struct spdk_nvme_ctrlr *ctrlr), 0);
|
||||
DEFINE_STUB(nvme_ctrlr_get_ref_count, int,
|
||||
(struct spdk_nvme_ctrlr *ctrlr), 0)
|
||||
|
||||
(struct spdk_nvme_ctrlr *ctrlr), 0);
|
||||
DEFINE_STUB(dummy_probe_cb, bool,
|
||||
(void *cb_ctx, const struct spdk_nvme_transport_id *trid,
|
||||
struct spdk_nvme_ctrlr_opts *opts), false)
|
||||
|
||||
struct spdk_nvme_ctrlr_opts *opts), false);
|
||||
DEFINE_STUB(nvme_transport_ctrlr_construct, struct spdk_nvme_ctrlr *,
|
||||
(const struct spdk_nvme_transport_id *trid,
|
||||
const struct spdk_nvme_ctrlr_opts *opts,
|
||||
void *devhandle), NULL)
|
||||
|
||||
DEFINE_STUB(spdk_nvme_qpair_process_completions, int32_t,
|
||||
(struct spdk_nvme_qpair *qpair,
|
||||
uint32_t max_completions), 0);
|
||||
void *devhandle), NULL);
|
||||
|
||||
static bool ut_destruct_called = false;
|
||||
void
|
||||
|
@ -66,8 +66,6 @@ int set_status_cpl = -1;
|
||||
DEFINE_STUB(nvme_ctrlr_cmd_set_host_id, int,
|
||||
(struct spdk_nvme_ctrlr *ctrlr, void *host_id, uint32_t host_id_size,
|
||||
spdk_nvme_cmd_cb cb_fn, void *cb_arg), 0);
|
||||
DEFINE_STUB(nvme_ctrlr_identify_ns, int, (struct spdk_nvme_ns *ns), 0);
|
||||
DEFINE_STUB(nvme_ctrlr_identify_id_desc, int, (struct spdk_nvme_ns *ns), 0);
|
||||
DEFINE_STUB_V(nvme_ns_set_identify_data, (struct spdk_nvme_ns *ns));
|
||||
|
||||
struct spdk_nvme_ctrlr *nvme_transport_ctrlr_construct(const struct spdk_nvme_transport_id *trid,
|
||||
|
@ -38,10 +38,6 @@
|
||||
|
||||
#include "common/lib/test_env.c"
|
||||
|
||||
DEFINE_STUB(spdk_nvme_qpair_process_completions, int32_t,
|
||||
(struct spdk_nvme_qpair *qpair,
|
||||
uint32_t max_completions), 0);
|
||||
|
||||
static struct nvme_driver _g_nvme_driver = {
|
||||
.lock = PTHREAD_MUTEX_INITIALIZER,
|
||||
};
|
||||
@ -91,9 +87,6 @@ nvme_ctrlr_destruct(struct spdk_nvme_ctrlr *ctrlr)
|
||||
{
|
||||
}
|
||||
|
||||
DEFINE_STUB(spdk_nvme_ctrlr_get_current_process, struct spdk_nvme_ctrlr_process *,
|
||||
(struct spdk_nvme_ctrlr *ctrlr), NULL)
|
||||
|
||||
int
|
||||
nvme_ctrlr_add_process(struct spdk_nvme_ctrlr *ctrlr, void *devhandle)
|
||||
{
|
||||
|
@ -41,10 +41,6 @@
|
||||
|
||||
#define OCSSD_SECTOR_SIZE 0x1000
|
||||
|
||||
DEFINE_STUB(spdk_nvme_qpair_process_completions, int32_t,
|
||||
(struct spdk_nvme_qpair *qpair,
|
||||
uint32_t max_completions), 0);
|
||||
|
||||
static struct nvme_driver _g_nvme_driver = {
|
||||
.lock = PTHREAD_MUTEX_INITIALIZER,
|
||||
};
|
||||
@ -70,9 +66,6 @@ nvme_ctrlr_proc_get_ref(struct spdk_nvme_ctrlr *ctrlr)
|
||||
return;
|
||||
}
|
||||
|
||||
DEFINE_STUB(spdk_nvme_ctrlr_get_current_process, struct spdk_nvme_ctrlr_process *,
|
||||
(struct spdk_nvme_ctrlr *ctrlr), NULL)
|
||||
|
||||
int
|
||||
nvme_ctrlr_process_init(struct spdk_nvme_ctrlr *ctrlr)
|
||||
{
|
||||
|
@ -41,23 +41,6 @@
|
||||
|
||||
pid_t g_spdk_nvme_pid;
|
||||
|
||||
DEFINE_STUB(spdk_mem_register, int, (void *vaddr, size_t len), 0);
|
||||
DEFINE_STUB(spdk_mem_unregister, int, (void *vaddr, size_t len), 0);
|
||||
|
||||
DEFINE_STUB(spdk_nvme_ctrlr_get_process,
|
||||
struct spdk_nvme_ctrlr_process *,
|
||||
(struct spdk_nvme_ctrlr *ctrlr, pid_t pid),
|
||||
NULL);
|
||||
|
||||
DEFINE_STUB(spdk_nvme_ctrlr_get_current_process,
|
||||
struct spdk_nvme_ctrlr_process *,
|
||||
(struct spdk_nvme_ctrlr *ctrlr),
|
||||
NULL);
|
||||
|
||||
DEFINE_STUB(spdk_nvme_wait_for_completion, int,
|
||||
(struct spdk_nvme_qpair *qpair,
|
||||
struct nvme_completion_poll_status *status), 0);
|
||||
|
||||
struct spdk_log_flag SPDK_LOG_NVME = {
|
||||
.name = "nvme",
|
||||
.enabled = false,
|
||||
|
@ -38,89 +38,12 @@
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("nvme", SPDK_LOG_NVME)
|
||||
|
||||
DEFINE_STUB(nvme_qpair_submit_request, int, (struct spdk_nvme_qpair *qpair,
|
||||
struct nvme_request *req), 0);
|
||||
|
||||
DEFINE_STUB(nvme_qpair_init, int, (struct spdk_nvme_qpair *qpair, uint16_t id,
|
||||
struct spdk_nvme_ctrlr *ctrlr, enum spdk_nvme_qprio qprio, uint32_t num_requests), 0);
|
||||
|
||||
DEFINE_STUB_V(nvme_qpair_deinit, (struct spdk_nvme_qpair *qpair));
|
||||
|
||||
DEFINE_STUB(nvme_ctrlr_probe, int, (const struct spdk_nvme_transport_id *trid, void *devhandle,
|
||||
spdk_nvme_probe_cb probe_cb, void *cb_ctx), 0);
|
||||
|
||||
DEFINE_STUB(nvme_ctrlr_get_cap, int, (struct spdk_nvme_ctrlr *ctrlr,
|
||||
union spdk_nvme_cap_register *cap), 0);
|
||||
|
||||
DEFINE_STUB(nvme_ctrlr_get_vs, int, (struct spdk_nvme_ctrlr *ctrlr,
|
||||
union spdk_nvme_vs_register *vs), 0);
|
||||
|
||||
DEFINE_STUB_V(nvme_ctrlr_init_cap, (struct spdk_nvme_ctrlr *ctrlr,
|
||||
const union spdk_nvme_cap_register *cap, const union spdk_nvme_vs_register *vs));
|
||||
|
||||
DEFINE_STUB(nvme_ctrlr_construct, int, (struct spdk_nvme_ctrlr *ctrlr), 0);
|
||||
|
||||
DEFINE_STUB_V(nvme_ctrlr_destruct, (struct spdk_nvme_ctrlr *ctrlr));
|
||||
|
||||
DEFINE_STUB(nvme_ctrlr_add_process, int, (struct spdk_nvme_ctrlr *ctrlr, void *devhandle), 0);
|
||||
|
||||
DEFINE_STUB_V(nvme_ctrlr_connected, (struct spdk_nvme_ctrlr *ctrlr));
|
||||
|
||||
DEFINE_STUB(nvme_ctrlr_cmd_identify, int, (struct spdk_nvme_ctrlr *ctrlr, uint8_t cns,
|
||||
uint16_t cntid, uint32_t nsid, void *payload, size_t payload_size, spdk_nvme_cmd_cb cb_fn,
|
||||
void *cb_arg), 0);
|
||||
|
||||
DEFINE_STUB_V(spdk_nvme_ctrlr_get_default_ctrlr_opts, (struct spdk_nvme_ctrlr_opts *opts,
|
||||
size_t opts_size));
|
||||
|
||||
DEFINE_STUB_V(nvme_completion_poll_cb, (void *arg, const struct spdk_nvme_cpl *cpl));
|
||||
|
||||
DEFINE_STUB(spdk_nvme_ctrlr_get_current_process, struct spdk_nvme_ctrlr_process *,
|
||||
(struct spdk_nvme_ctrlr *ctrlr), NULL);
|
||||
|
||||
DEFINE_STUB(spdk_nvme_wait_for_completion, int, (struct spdk_nvme_qpair *qpair,
|
||||
struct nvme_completion_poll_status *status), 0);
|
||||
|
||||
DEFINE_STUB(spdk_nvme_wait_for_completion_robust_lock, int, (struct spdk_nvme_qpair *qpair,
|
||||
struct nvme_completion_poll_status *status, pthread_mutex_t *robust_mutex), 0);
|
||||
|
||||
DEFINE_STUB(spdk_mem_map_set_translation, int, (struct spdk_mem_map *map, uint64_t vaddr,
|
||||
uint64_t size, uint64_t translation), 0);
|
||||
|
||||
DEFINE_STUB(spdk_mem_map_clear_translation, int, (struct spdk_mem_map *map, uint64_t vaddr,
|
||||
uint64_t size), 0);
|
||||
|
||||
DEFINE_STUB(spdk_mem_map_alloc, struct spdk_mem_map *, (uint64_t default_translation,
|
||||
const struct spdk_mem_map_ops *ops, void *cb_ctx), NULL);
|
||||
|
||||
DEFINE_STUB_V(spdk_mem_map_free, (struct spdk_mem_map **pmap));
|
||||
|
||||
DEFINE_STUB(nvme_fabric_qpair_connect, int, (struct spdk_nvme_qpair *qpair, uint32_t num_entries),
|
||||
0);
|
||||
|
||||
DEFINE_STUB(nvme_transport_ctrlr_set_reg_4, int, (struct spdk_nvme_ctrlr *ctrlr, uint32_t offset,
|
||||
uint32_t value), 0);
|
||||
|
||||
DEFINE_STUB(nvme_fabric_ctrlr_set_reg_4, int, (struct spdk_nvme_ctrlr *ctrlr, uint32_t offset,
|
||||
uint32_t value), 0);
|
||||
|
||||
DEFINE_STUB(nvme_fabric_ctrlr_set_reg_8, int, (struct spdk_nvme_ctrlr *ctrlr, uint32_t offset,
|
||||
uint64_t value), 0);
|
||||
|
||||
DEFINE_STUB(nvme_fabric_ctrlr_get_reg_4, int, (struct spdk_nvme_ctrlr *ctrlr, uint32_t offset,
|
||||
uint32_t *value), 0);
|
||||
|
||||
DEFINE_STUB(nvme_fabric_ctrlr_get_reg_8, int, (struct spdk_nvme_ctrlr *ctrlr, uint32_t offset,
|
||||
uint64_t *value), 0);
|
||||
|
||||
DEFINE_STUB_V(nvme_ctrlr_destruct_finish, (struct spdk_nvme_ctrlr *ctrlr));
|
||||
|
||||
DEFINE_STUB(nvme_request_check_timeout, int, (struct nvme_request *req, uint16_t cid,
|
||||
struct spdk_nvme_ctrlr_process *active_proc, uint64_t now_tick), 0);
|
||||
|
||||
DEFINE_STUB(nvme_fabric_ctrlr_discover, int, (struct spdk_nvme_ctrlr *ctrlr, void *cb_ctx,
|
||||
spdk_nvme_probe_cb probe_cb), 0);
|
||||
|
||||
/* used to mock out having to split an SGL over a memory region */
|
||||
uint64_t g_mr_size;
|
||||
struct ibv_mr g_nvme_rdma_mr;
|
||||
|
@ -57,27 +57,11 @@ DEFINE_STUB(spdk_nvmf_poll_group_create,
|
||||
(struct spdk_nvmf_tgt *tgt),
|
||||
NULL);
|
||||
|
||||
DEFINE_STUB_V(spdk_nvmf_poll_group_destroy,
|
||||
(struct spdk_nvmf_poll_group *group));
|
||||
|
||||
DEFINE_STUB_V(spdk_nvmf_transport_qpair_fini,
|
||||
(struct spdk_nvmf_qpair *qpair));
|
||||
|
||||
DEFINE_STUB(spdk_nvmf_poll_group_add,
|
||||
int,
|
||||
(struct spdk_nvmf_poll_group *group, struct spdk_nvmf_qpair *qpair),
|
||||
0);
|
||||
|
||||
DEFINE_STUB(spdk_nvmf_subsystem_get_sn,
|
||||
const char *,
|
||||
(const struct spdk_nvmf_subsystem *subsystem),
|
||||
NULL);
|
||||
|
||||
DEFINE_STUB(spdk_nvmf_subsystem_get_ns,
|
||||
struct spdk_nvmf_ns *,
|
||||
(struct spdk_nvmf_subsystem *subsystem, uint32_t nsid),
|
||||
NULL);
|
||||
|
||||
DEFINE_STUB(spdk_nvmf_subsystem_get_first_ns,
|
||||
struct spdk_nvmf_ns *,
|
||||
(struct spdk_nvmf_subsystem *subsystem),
|
||||
@ -98,9 +82,6 @@ DEFINE_STUB(spdk_nvmf_subsystem_add_ctrlr,
|
||||
(struct spdk_nvmf_subsystem *subsystem, struct spdk_nvmf_ctrlr *ctrlr),
|
||||
0);
|
||||
|
||||
DEFINE_STUB_V(spdk_nvmf_subsystem_remove_ctrlr,
|
||||
(struct spdk_nvmf_subsystem *subsystem, struct spdk_nvmf_ctrlr *ctrlr));
|
||||
|
||||
DEFINE_STUB(spdk_nvmf_subsystem_get_ctrlr,
|
||||
struct spdk_nvmf_ctrlr *,
|
||||
(struct spdk_nvmf_subsystem *subsystem, uint16_t cntlid),
|
||||
@ -124,11 +105,6 @@ DEFINE_STUB(spdk_nvmf_request_complete,
|
||||
(struct spdk_nvmf_request *req),
|
||||
-1);
|
||||
|
||||
DEFINE_STUB(spdk_nvmf_request_free,
|
||||
int,
|
||||
(struct spdk_nvmf_request *req),
|
||||
-1);
|
||||
|
||||
DEFINE_STUB(spdk_nvmf_qpair_get_listen_trid,
|
||||
int,
|
||||
(struct spdk_nvmf_qpair *qpair, struct spdk_nvme_transport_id *trid),
|
||||
|
@ -42,11 +42,6 @@
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("nvmf", SPDK_LOG_NVMF)
|
||||
|
||||
DEFINE_STUB(spdk_bdev_module_claim_bdev,
|
||||
int,
|
||||
(struct spdk_bdev *bdev, struct spdk_bdev_desc *desc,
|
||||
struct spdk_bdev_module *module), 0);
|
||||
|
||||
DEFINE_STUB_V(spdk_bdev_module_release_bdev,
|
||||
(struct spdk_bdev *bdev));
|
||||
|
||||
|
@ -77,13 +77,7 @@ spdk_app_parse_core_mask(const char *mask, struct spdk_cpuset *cpumask)
|
||||
|
||||
DEFINE_STUB(spdk_env_get_first_core, uint32_t, (void), 0);
|
||||
DEFINE_STUB(spdk_env_get_next_core, uint32_t, (uint32_t prev_core), 0);
|
||||
DEFINE_STUB(spdk_env_get_last_core, uint32_t, (void), 0);
|
||||
DEFINE_STUB_V(spdk_app_stop, (int rc));
|
||||
DEFINE_STUB_V(spdk_event_call, (struct spdk_event *event));
|
||||
DEFINE_STUB(spdk_poller_register, struct spdk_poller *, (spdk_poller_fn fn, void *arg,
|
||||
uint64_t period_microseconds), NULL);
|
||||
DEFINE_STUB_V(spdk_poller_unregister, (struct spdk_poller **ppoller));
|
||||
DEFINE_STUB(spdk_iommu_mem_unregister, int, (uint64_t addr, uint64_t len), 0);
|
||||
DEFINE_STUB(rte_vhost_get_mem_table, int, (int vid, struct rte_vhost_memory **mem), 0);
|
||||
DEFINE_STUB(rte_vhost_get_negotiated_features, int, (int vid, uint64_t *features), 0);
|
||||
DEFINE_STUB(rte_vhost_get_vhost_vring, int,
|
||||
@ -91,26 +85,18 @@ DEFINE_STUB(rte_vhost_get_vhost_vring, int,
|
||||
DEFINE_STUB(rte_vhost_enable_guest_notification, int,
|
||||
(int vid, uint16_t queue_id, int enable), 0);
|
||||
DEFINE_STUB(rte_vhost_get_ifname, int, (int vid, char *buf, size_t len), 0);
|
||||
DEFINE_STUB(rte_vhost_get_vring_num, uint16_t, (int vid), 0);
|
||||
DEFINE_STUB(rte_vhost_driver_start, int, (const char *name), 0);
|
||||
DEFINE_STUB(rte_vhost_driver_callback_register, int,
|
||||
(const char *path, struct vhost_device_ops const *const ops), 0);
|
||||
DEFINE_STUB(rte_vhost_driver_disable_features, int, (const char *path, uint64_t features), 0);
|
||||
DEFINE_STUB(rte_vhost_driver_set_features, int, (const char *path, uint64_t features), 0);
|
||||
DEFINE_STUB(rte_vhost_driver_register, int, (const char *path, uint64_t flags), 0);
|
||||
DEFINE_STUB_V(rte_vhost_log_used_vring, (int vid, uint16_t vring_idx, uint64_t offset,
|
||||
uint64_t len));
|
||||
DEFINE_STUB_V(rte_vhost_log_write, (int vid, uint64_t addr, uint64_t len));
|
||||
DEFINE_STUB(spdk_vhost_scsi_controller_construct, int, (void), 0);
|
||||
DEFINE_STUB(spdk_vhost_blk_controller_construct, int, (void), 0);
|
||||
DEFINE_STUB(spdk_vhost_nvme_admin_passthrough, int, (int vid, void *cmd, void *cqe, void *buf), 0);
|
||||
DEFINE_STUB(spdk_vhost_nvme_set_cq_call, int, (int vid, uint16_t qid, int fd), 0);
|
||||
DEFINE_STUB(spdk_vhost_nvme_set_bar_mr, int, (int vid, void *bar, uint64_t bar_size), 0);
|
||||
DEFINE_STUB(spdk_vhost_nvme_get_cap, int, (int vid, uint64_t *cap), 0);
|
||||
DEFINE_STUB(spdk_vhost_nvme_controller_construct, int, (void), 0);
|
||||
DEFINE_STUB(rte_vhost_set_vhost_vring_last_idx, int,
|
||||
(int vid, uint16_t vring_idx, uint16_t last_avail_idx, uint16_t last_used_idx), 0);
|
||||
DEFINE_STUB(spdk_env_get_current_core, uint32_t, (void), 0);
|
||||
|
||||
void *
|
||||
spdk_call_unaffinitized(void *cb(void *arg), void *arg)
|
||||
|
Loading…
Reference in New Issue
Block a user