Commit 0165cd07 authored by Slawomir Ptak's avatar Slawomir Ptak Committed by Tomasz Zawadzki
Browse files

lib/nvmf: Deprecate spdk_nvmf_subsytem_any_listener_allowed (typo)



Deprecate the spdk_nvmf_subsytem_any_listener_allowed function
due to a typo in the function name. Introduce a new function
with the correct name.

Change-Id: I6abe72ccf14b8d00040b5d6283e63ec5674cb114
Signed-off-by: default avatarSlawomir Ptak <slawomir.ptak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/19847


Community-CI: Mellanox Build Bot
Reviewed-by: default avatarJim Harris <jim.harris@gmail.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent a1f4f11b
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -42,6 +42,11 @@ will be removed in 23.09 release.
`transport` field in `listen_addresses` of `nvmf_get_subsystems` RPC is deprecated.
`trtype` field should be used instead. `transport` field will be removed in 24.01 release.

#### 'spdk_nvmf_subsytem_any_listener_allowed'

The function is deprecated and will be removed in 24.01 release. Please use
'spdk_nvmf_subsystem_any_listener_allowed' instead.

### gpt

#### `old_gpt_guid`
+14 −0
Original line number Diff line number Diff line
@@ -752,6 +752,9 @@ void spdk_nvmf_subsystem_allow_any_listener(
/**
 * Check whether a subsystem allows any listen address or only addresses in the allowed list.
 *
 * Deprecated - will be removed in 24.01. Please use
 * \ref spdk_nvmf_subsystem_any_listener_allowed.
 *
 * \param subsystem Subsystem to query.
 *
 * \return true if this subsystem allows dynamic management of listen address list,
@@ -760,6 +763,17 @@ void spdk_nvmf_subsystem_allow_any_listener(
bool spdk_nvmf_subsytem_any_listener_allowed(
	struct spdk_nvmf_subsystem *subsystem);

/**
 * Check whether a subsystem allows any listen address or only addresses in the allowed list.
 *
 * \param subsystem Subsystem to query.
 *
 * \return true if this subsystem allows dynamic management of listen address list,
 *  or false if only allows addresses in the list configured during subsystem setup.
 */
bool spdk_nvmf_subsystem_any_listener_allowed(
	struct spdk_nvmf_subsystem *subsystem);

/**
 * Set whether a subsystem supports Asymmetric Namespace Access (ANA)
 * reporting.
+1 −1
Original line number Diff line number Diff line
@@ -3128,7 +3128,7 @@ nvmf_fc_adm_add_rem_nport_listener(struct spdk_nvmf_fc_nport *nport, bool add)
	while (subsystem) {
		struct nvmf_fc_add_rem_listener_ctx *ctx;

		if (spdk_nvmf_subsytem_any_listener_allowed(subsystem) == true) {
		if (spdk_nvmf_subsystem_any_listener_allowed(subsystem) == true) {
			ctx = calloc(1, sizeof(struct nvmf_fc_add_rem_listener_ctx));
			if (ctx) {
				ctx->add_listener = add;
+1 −0
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@
	spdk_nvmf_subsystem_listener_get_trid;
	spdk_nvmf_subsystem_allow_any_listener;
	spdk_nvmf_subsytem_any_listener_allowed;
	spdk_nvmf_subsystem_any_listener_allowed;
	spdk_nvmf_subsystem_listener_opts_init;
	spdk_nvmf_ns_opts_get_defaults;
	spdk_nvmf_subsystem_add_ns_ext;
+9 −0
Original line number Diff line number Diff line
@@ -1336,12 +1336,21 @@ spdk_nvmf_subsystem_allow_any_listener(struct spdk_nvmf_subsystem *subsystem,
	subsystem->flags.allow_any_listener = allow_any_listener;
}

SPDK_LOG_DEPRECATION_REGISTER(spdk_nvmf_subsytem_any_listener_allowed,
			      "spdk_nvmf_subsytem_any_listener_allowed is deprecated", "v24.01", 0);

bool
spdk_nvmf_subsytem_any_listener_allowed(struct spdk_nvmf_subsystem *subsystem)
{
	SPDK_LOG_DEPRECATED(spdk_nvmf_subsytem_any_listener_allowed);
	return subsystem->flags.allow_any_listener;
}

bool
spdk_nvmf_subsystem_any_listener_allowed(struct spdk_nvmf_subsystem *subsystem)
{
	return subsystem->flags.allow_any_listener;
}

struct subsystem_update_ns_ctx {
	struct spdk_nvmf_subsystem *subsystem;