From 04d5f47f7d01ef9a69bbd82f6022db075a80d3d4 Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Tue, 4 Oct 2016 13:23:29 -0700 Subject: [PATCH] iscsi: convert subsystem startup timer to event Change-Id: Iae21b07b152b439ae55fc30fb525a3e3a126b0ed Signed-off-by: Daniel Verkamp --- lib/iscsi/iscsi_subsystem.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/iscsi/iscsi_subsystem.c b/lib/iscsi/iscsi_subsystem.c index aeb9a96f3..bfa2f75c7 100644 --- a/lib/iscsi/iscsi_subsystem.c +++ b/lib/iscsi/iscsi_subsystem.c @@ -63,10 +63,9 @@ #include "iscsi/acceptor.h" #include "iscsi/conn.h" #include "iscsi/task.h" +#include "spdk/event.h" #include "spdk/log.h" -static struct rte_timer g_start_up_timer; - #define ISCSI_CONFIG_TMPL \ "[iSCSI]\n" \ " # node name (not include optional part)\n" \ @@ -944,7 +943,7 @@ spdk_iscsi_app_read_parameters(void) } static void -spdk_iscsi_setup(struct rte_timer *timer, void *arg) +spdk_iscsi_setup(struct spdk_event *event) { int rc; @@ -987,12 +986,11 @@ spdk_iscsi_subsystem_init(void) return -1; } - rte_timer_init(&g_start_up_timer); - /* - * Defer creation of listening sockets until the timer subsystem has started. + * Defer creation of listening sockets until the reactor has started. */ - rte_timer_reset(&g_start_up_timer, 0, SINGLE, rte_lcore_id(), spdk_iscsi_setup, NULL); + spdk_event_call(spdk_event_allocate(spdk_app_get_current_core(), spdk_iscsi_setup, NULL, NULL, + NULL)); return 0; }