Commit 77be4b72 authored by Jim Harris's avatar Jim Harris Committed by Konrad Sztyber
Browse files

init: remove spdk_subsystem_init_from_json_config



This was deprecated and marked for removal in v24.09 release, so it
is time to remove it.

Signed-off-by: default avatarJim Harris <jim.harris@samsung.com>
Change-Id: Ib76e7acd61c4067711be1a7c22aa0b43aba04f4f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/24664


Reviewed-by: default avatarAleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
parent 4586880f
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -27,13 +27,6 @@ Passing NVMe/TLS pre-shared keys via `spdk_nvme_ctrlr_opts.psk` is deprecated an
removed in the v24.09 release.  Instead, a key obtained from the keyring library should be passed
in `spdk_nvme_ctrlr_opts.tls_psk`.

### init

#### `spdk_subsystem_init_from_json_config`

The function is deprecated and will be removed in 24.09 release. Please use
`spdk_subsystem_load_config` instead.

### nvmf

#### `decode_rpc_listen_address`
+0 −17
Original line number Diff line number Diff line
@@ -81,23 +81,6 @@ typedef void (*spdk_subsystem_init_fn)(int rc, void *ctx);
 */
void spdk_subsystem_init(spdk_subsystem_init_fn cb_fn, void *cb_arg);

/**
 * Like spdk_subsystem_init, but additionally configure each subsystem using the provided JSON config
 * file. This will automatically start a JSON RPC server and then stop it.
 *
 * Deprecated - will be removed in 24.09 SPDK release. Please use
 * \ref spdk_subsystem_load_config.
 *
 * \param json_config_file Path to a JSON config file.
 * \param rpc_addr Path to a unix domain socket to send configuration RPCs to.
 * \param cb_fn Function called when the process is complete.
 * \param cb_arg User context passed to cb_fn.
 * \param stop_on_error Whether to stop initialization if one of the JSON RPCs fails.
 */
void spdk_subsystem_init_from_json_config(const char *json_config_file, const char *rpc_addr,
		spdk_subsystem_init_fn cb_fn, void *cb_arg,
		bool stop_on_error);

/**
 * Loads RPC configuration from provided JSON for current RPC state. The function will
 * automatically start a JSON RPC server for configuration purposes and then stop it.
+1 −1
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@
SPDK_ROOT_DIR := $(abspath $(CURDIR)/../..)
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk

SO_VER := 5
SO_VER := 6
SO_MINOR := 0

C_SRCS = json_config.c subsystem.c subsystem_rpc.c rpc.c
+0 −26
Original line number Diff line number Diff line
@@ -645,32 +645,6 @@ fail:
	app_json_config_load_done(ctx, -EINVAL);
}

SPDK_LOG_DEPRECATION_REGISTER(spdk_subsystem_init_from_json_config,
			      "spdk_subsystem_init_from_json_config is deprecated", "v24.09", 0);

void
spdk_subsystem_init_from_json_config(const char *json_config_file, const char *rpc_addr,
				     spdk_subsystem_init_fn cb_fn, void *cb_arg,
				     bool stop_on_error)
{
	char *json = NULL;
	ssize_t json_size = 0;

	SPDK_LOG_DEPRECATED(spdk_subsystem_init_from_json_config);

	assert(cb_fn);

	json = spdk_posix_file_load_from_name(json_config_file, &json_size);
	if (!json) {
		SPDK_ERRLOG("Could not read JSON config file\n");
		cb_fn(-EINVAL, cb_arg);
		return;
	}

	json_config_prepare_ctx(cb_fn, cb_arg, stop_on_error, json, json_size, true);
	free(json);
}

void
spdk_subsystem_load_config(void *json, ssize_t json_size, spdk_subsystem_init_fn cb_fn,
			   void *cb_arg, bool stop_on_error)
+0 −1
Original line number Diff line number Diff line
@@ -8,7 +8,6 @@
	spdk_subsystem_fini;
	spdk_subsystem_init_next;
	spdk_subsystem_fini_next;
	spdk_subsystem_init_from_json_config;
	spdk_subsystem_exists;

	spdk_rpc_initialize;
Loading