Commit 356e2ab2 authored by Ziye Yang's avatar Ziye Yang Committed by Jim Harris
Browse files

event: remove spdk_app_init



In this patch, spdk_app_init will be merged into
spdk_app_start.
Due to this change, we need to change event_perf
to use spdk_app_start, since we cannot use spdk_app_init
anymore. So the related changes for event_perf is to
make it work with reactor framework.

Change-Id: Id67edf209fd628cca361a499068c93aeedfe6167
Signed-off-by: default avatarZiye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/364153


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 127cc4c0
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -177,12 +177,11 @@ main(int argc, char **argv)

	opts.shutdown_cb = spdk_iscsi_shutdown;
	opts.usr1_handler = spdk_sigusr1;
	spdk_app_init(&opts);

	printf("Total cores available: %u\n", spdk_env_get_core_count());
	printf("Using net framework %s\n", spdk_net_framework_get_name());
	/* Blocks until the application is exiting */
	app_rc = spdk_app_start(spdk_startup, NULL, NULL);
	app_rc = spdk_app_start(&opts, spdk_startup, NULL, NULL);

	rc = spdk_app_fini();

+1 −2
Original line number Diff line number Diff line
@@ -307,11 +307,10 @@ spdk_nvmf_tgt_start(struct spdk_app_opts *opts)
	int rc;

	opts->shutdown_cb = spdk_nvmf_shutdown_cb;
	spdk_app_init(opts);

	printf("Total cores available: %d\n", spdk_env_get_core_count());
	/* Blocks until the application is exiting */
	rc = spdk_app_start(spdk_nvmf_startup, NULL, NULL);
	rc = spdk_app_start(opts, spdk_nvmf_startup, NULL, NULL);

	spdk_app_fini();

+1 −2
Original line number Diff line number Diff line
@@ -150,10 +150,9 @@ main(int argc, char *argv[])
	}

	opts.shutdown_cb = spdk_vhost_shutdown_cb;
	spdk_app_init(&opts);

	/* Blocks until the application is exiting */
	rc = spdk_app_start(spdk_vhost_startup, (void *)socket_path, NULL);
	rc = spdk_app_start(&opts, spdk_vhost_startup, (void *)socket_path, NULL);

	spdk_app_fini();

+4 −9
Original line number Diff line number Diff line
@@ -97,22 +97,17 @@ struct spdk_app_opts {
void spdk_app_opts_init(struct spdk_app_opts *opts);

/**
 * \brief Initialize an application to use the event framework. This must be called prior to using
 * any other functions in this library.
 * \brief Start the framework. Once started, the framework will call start_fn on the master
 * core with the arguments provided. This call will block until \ref spdk_app_stop is called.
 */
void spdk_app_init(struct spdk_app_opts *opts);
int spdk_app_start(struct spdk_app_opts *opts, spdk_event_fn start_fn,
		   void *arg1, void *arg2);

/**
 * \brief Perform final shutdown operations on an application using the event framework.
 */
int spdk_app_fini(void);

/**
 * \brief Start the framework. Once started, the framework will call start_fn on the master
 * core with the arguments provided. This call will block until \ref spdk_app_stop is called.
 */
int spdk_app_start(spdk_event_fn start_fn, void *arg1, void *arg2);

/**
 * \brief Start shutting down the framework.  Typically this function is not called directly, and
 * the shutdown process is started implicitly by a process signal.  But in applications that are
+0 −2
Original line number Diff line number Diff line
@@ -51,8 +51,6 @@ int spdk_reactors_fini(void);
void spdk_reactors_start(void);
void spdk_reactors_stop(void);

uint32_t spdk_event_queue_run_batch(uint32_t lcore);

struct spdk_subsystem {
	const char *name;
	/* User must call spdk_subsystem_init_next() when they are done with their initialization. */
Loading