Commit d8b4b81a authored by Wojciech Panfil's avatar Wojciech Panfil Committed by Tomasz Zawadzki
Browse files

nvmf/subsystem: Deprecate transport parameter from dump_nvmf_subsystem



This option was kept for compatibility purposes,
but now decision has been made to remove it,
as it has been replaced by 'trtype'.

Change-Id: Ife83d230f7408eea3ce3073b56fbe35b972048a5
Signed-off-by: default avatarWojciech Panfil <wojciech.panfil@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/18836


Community-CI: Mellanox Build Bot
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <jim.harris@gmail.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
parent 1e3d25b9
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -22,6 +22,9 @@ The `spdk_nvmf_request::data` field has been removed: instead, clients should se
`->iov` and `->iovcnt` appropriately, as nvmf request APIs now expect any data
buffers to be described there. spdk_nvmf_request_get_data() has been removed.

`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.

### jsonrpc

New APIs, `spdk_jsonrpc_set_log_level` and `spdk_jsonrpc_set_log_file`, were added to enable
+5 −0
Original line number Diff line number Diff line
@@ -37,6 +37,11 @@ VTune integration is in now deprecated and will be removed in the 23.09 release.
Parameters `cb_fn` and `ctx` of `spdk_nvmf_qpair_disconnect` API are deprecated. These parameters
will be removed in 23.09 release.

#### `nvmf_get_subsystems`

`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.

### gpt

#### `old_gpt_guid`
+14 −1
Original line number Diff line number Diff line
@@ -18,6 +18,8 @@

#include "nvmf_internal.h"

static bool g_logged_deprecated_nvmf_get_subsystems = false;

static int
json_write_hex_str(struct spdk_json_write_ctx *w, const void *data, size_t size)
{
@@ -197,7 +199,8 @@ dump_nvmf_subsystem(struct spdk_json_write_ctx *w, struct spdk_nvmf_subsystem *s
		if (adrfam == NULL) {
			adrfam = "unknown";
		}
		/* NOTE: "transport" is kept for compatibility; new code should use "trtype" */
		/* NOTE: "transport" is kept for compatibility and will be removed in SPDK v24.01
		 * New code should use "trtype". */
		spdk_json_write_named_string(w, "transport", trid->trstring);
		spdk_json_write_named_string(w, "trtype", trid->trstring);
		spdk_json_write_named_string(w, "adrfam", adrfam);
@@ -277,6 +280,10 @@ dump_nvmf_subsystem(struct spdk_json_write_ctx *w, struct spdk_nvmf_subsystem *s
	spdk_json_write_object_end(w);
}

SPDK_LOG_DEPRECATION_REGISTER(rpc_nvmf_get_subsystems,
			      "listener.transport is deprecated in favor of trtype",
			      "v24.01", 0);

static void
rpc_nvmf_get_subsystems(struct spdk_jsonrpc_request *request,
			const struct spdk_json_val *params)
@@ -286,6 +293,12 @@ rpc_nvmf_get_subsystems(struct spdk_jsonrpc_request *request,
	struct spdk_nvmf_subsystem *subsystem = NULL;
	struct spdk_nvmf_tgt *tgt;

	/* Log only once */
	if (!g_logged_deprecated_nvmf_get_subsystems) {
		SPDK_LOG_DEPRECATED(rpc_nvmf_get_subsystems);
		g_logged_deprecated_nvmf_get_subsystems = true;
	}

	if (params) {
		if (spdk_json_decode_object(params, rpc_get_subsystem_decoders,
					    SPDK_COUNTOF(rpc_get_subsystem_decoders),