diff --git a/CHANGELOG.md b/CHANGELOG.md index 8479faf12..84206aabe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -54,6 +54,10 @@ independent SPDK processes are running on one node. The filter function can then be implemented in these processes to decide which SSDs to probe based on the new SSD's PCI address. +### nvmf + +Removed the `spdk_nvmf_tgt_listen` and `spdk_nvmf_subsystem_add_ns` API. + ### opal Removed the `spdk_opal_supported` API. diff --git a/doc/nvmf_tgt_pg.md b/doc/nvmf_tgt_pg.md index 939817b72..8bfb7e1d9 100644 --- a/doc/nvmf_tgt_pg.md +++ b/doc/nvmf_tgt_pg.md @@ -68,7 +68,7 @@ system. This is used for access control. A user of the NVMe-oF target library begins by creating a target using spdk_nvmf_tgt_create(), setting up a set of addresses on which to accept -connections by calling spdk_nvmf_tgt_listen(), then creating a subsystem +connections by calling spdk_nvmf_tgt_listen_ext(), then creating a subsystem using spdk_nvmf_subsystem_create(). Subsystems begin in an inactive state and must be activated by calling @@ -78,7 +78,7 @@ calling spdk_nvmf_subsystem_pause() and resumed by calling spdk_nvmf_subsystem_resume(). Namespaces may be added to the subsystem by calling -spdk_nvmf_subsystem_add_ns() when the subsystem is inactive or paused. +spdk_nvmf_subsystem_add_ns_ext() when the subsystem is inactive or paused. Namespaces are bdevs. See @ref bdev for more information about the SPDK bdev layer. A bdev may be obtained by calling spdk_bdev_get_by_name(). diff --git a/include/spdk/nvmf.h b/include/spdk/nvmf.h index 367b8c8cb..b6d304e14 100644 --- a/include/spdk/nvmf.h +++ b/include/spdk/nvmf.h @@ -233,21 +233,6 @@ struct spdk_nvmf_tgt *spdk_nvmf_get_next_tgt(struct spdk_nvmf_tgt *prev); */ void spdk_nvmf_tgt_write_config_json(struct spdk_json_write_ctx *w, struct spdk_nvmf_tgt *tgt); -/** - * Begin accepting new connections at the address provided (deprecated, please use spdk_nvmf_tgt_listen_ext). - * - * The connections will be matched with a subsystem, which may or may not allow - * the connection based on a subsystem-specific list of allowed hosts. See - * spdk_nvmf_subsystem_add_host() and spdk_nvmf_subsystem_add_listener() - * - * \param tgt The target associated with this listen address. - * \param trid The address to listen at. - * - * \return 0 on success or a negated errno on failure. - */ -int spdk_nvmf_tgt_listen(struct spdk_nvmf_tgt *tgt, - struct spdk_nvme_transport_id *trid); - /** * Begin accepting new connections at the address provided. * @@ -267,7 +252,7 @@ int spdk_nvmf_tgt_listen_ext(struct spdk_nvmf_tgt *tgt, const struct spdk_nvme_t /** * Stop accepting new connections at the provided address. * - * This is a counterpart to spdk_nvmf_tgt_listen(). + * This is a counterpart to spdk_nvmf_tgt_listen_ext(). * * \param tgt The target associated with the listen address. * \param trid The address to stop listening at. @@ -623,7 +608,7 @@ const char *spdk_nvmf_host_get_nqn(const struct spdk_nvmf_host *host); /** * Accept new connections on the address provided. * - * This does not start the listener. Use spdk_nvmf_tgt_listen() for that. + * This does not start the listener. Use spdk_nvmf_tgt_listen_ext() for that. * * May only be performed on subsystems in the PAUSED or INACTIVE states. * No namespaces are required to be paused. @@ -777,23 +762,6 @@ struct spdk_nvmf_ns_opts { */ void spdk_nvmf_ns_opts_get_defaults(struct spdk_nvmf_ns_opts *opts, size_t opts_size); -/** - * Add a namespace to a subsytem (deprecated, please use spdk_nvmf_subsystem_add_ns_ext). - * - * May only be performed on subsystems in the PAUSED or INACTIVE states. - * - * \param subsystem Subsystem to add namespace to. - * \param bdev Block device to add as a namespace. - * \param opts Namespace options, or NULL to use defaults. - * \param opts_size sizeof(*opts) - * \param ptpl_file Persist through power loss file path. - * - * \return newly added NSID on success, or 0 on failure. - */ -uint32_t spdk_nvmf_subsystem_add_ns(struct spdk_nvmf_subsystem *subsystem, struct spdk_bdev *bdev, - const struct spdk_nvmf_ns_opts *opts, size_t opts_size, - const char *ptpl_file); - /** * Add a namespace to a subsystems in the PAUSED or INACTIVE states. * @@ -1111,7 +1079,7 @@ spdk_nvmf_transport_stop_listen(struct spdk_nvmf_transport *transport, /** * Stop accepting new connections at the provided address. * - * This is a counterpart to spdk_nvmf_tgt_listen(). It differs + * This is a counterpart to spdk_nvmf_tgt_listen_ext(). It differs * from spdk_nvmf_transport_stop_listen() in that it also destroys all * qpairs that are connected to the specified listener. Because * this function disconnects the qpairs, it has to be asynchronous. diff --git a/lib/nvmf/nvmf.c b/lib/nvmf/nvmf.c index 70682aa60..05ef9b268 100644 --- a/lib/nvmf/nvmf.c +++ b/lib/nvmf/nvmf.c @@ -667,16 +667,6 @@ spdk_nvmf_tgt_listen_ext(struct spdk_nvmf_tgt *tgt, const struct spdk_nvme_trans return rc; } -int -spdk_nvmf_tgt_listen(struct spdk_nvmf_tgt *tgt, struct spdk_nvme_transport_id *trid) -{ - struct spdk_nvmf_listen_opts opts; - - spdk_nvmf_listen_opts_init(&opts, sizeof(opts)); - - return spdk_nvmf_tgt_listen_ext(tgt, trid, &opts); -} - int spdk_nvmf_tgt_stop_listen(struct spdk_nvmf_tgt *tgt, struct spdk_nvme_transport_id *trid) diff --git a/lib/nvmf/spdk_nvmf.map b/lib/nvmf/spdk_nvmf.map index 349f8fbc4..0f5ca81ad 100644 --- a/lib/nvmf/spdk_nvmf.map +++ b/lib/nvmf/spdk_nvmf.map @@ -10,7 +10,6 @@ spdk_nvmf_get_next_tgt; spdk_nvmf_tgt_write_config_json; spdk_nvmf_listen_opts_init; - spdk_nvmf_tgt_listen; spdk_nvmf_tgt_listen_ext; spdk_nvmf_tgt_stop_listen; spdk_nvmf_poll_group_create; @@ -49,7 +48,6 @@ spdk_nvmf_subsystem_allow_any_listener; spdk_nvmf_subsytem_any_listener_allowed; spdk_nvmf_ns_opts_get_defaults; - spdk_nvmf_subsystem_add_ns; spdk_nvmf_subsystem_add_ns_ext; spdk_nvmf_subsystem_remove_ns; spdk_nvmf_subsystem_get_first_ns; diff --git a/lib/nvmf/subsystem.c b/lib/nvmf/subsystem.c index 59a52dd09..07bfe21e0 100644 --- a/lib/nvmf/subsystem.c +++ b/lib/nvmf/subsystem.c @@ -1486,15 +1486,6 @@ spdk_nvmf_subsystem_add_ns_ext(struct spdk_nvmf_subsystem *subsystem, const char return opts.nsid; } -uint32_t -spdk_nvmf_subsystem_add_ns(struct spdk_nvmf_subsystem *subsystem, struct spdk_bdev *bdev, - const struct spdk_nvmf_ns_opts *user_opts, size_t opts_size, - const char *ptpl_file) -{ - return spdk_nvmf_subsystem_add_ns_ext(subsystem, spdk_bdev_get_name(bdev), - user_opts, opts_size, ptpl_file); -} - static uint32_t nvmf_subsystem_get_next_allocated_nsid(struct spdk_nvmf_subsystem *subsystem, uint32_t prev_nsid)