From f892089f9286603922c8613f53cf9c14d611650b Mon Sep 17 00:00:00 2001 From: Naresh Gottumukkala Date: Fri, 8 Jan 2021 05:06:06 +0000 Subject: [PATCH] nvmf/fc: Add flag to differentiate LS queue and non LS queue. Signed-off-by: Naresh Gottumukkala Change-Id: Ic80c5de475b712b045ec4e9c31d4bc2fdbe395fb Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5828 Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Shuhei Matsumoto --- lib/nvmf/fc.c | 2 ++ lib/nvmf/nvmf_fc.h | 1 + 2 files changed, 3 insertions(+) diff --git a/lib/nvmf/fc.c b/lib/nvmf/fc.c index 06d846bf3..98899bfce 100644 --- a/lib/nvmf/fc.c +++ b/lib/nvmf/fc.c @@ -2367,6 +2367,7 @@ nvmf_fc_adm_hw_port_data_init(struct spdk_nvmf_fc_port *fc_port, fc_port->ls_queue.queues = args->ls_queue; fc_port->ls_queue.thread = nvmf_fc_get_main_thread(); fc_port->ls_queue.hwqp_id = SPDK_MAX_NUM_OF_FC_PORTS * fc_port->num_io_queues; + fc_port->ls_queue.is_ls_queue = true; /* * Initialize the LS queue. @@ -2383,6 +2384,7 @@ nvmf_fc_adm_hw_port_data_init(struct spdk_nvmf_fc_port *fc_port, struct spdk_nvmf_fc_hwqp *hwqp = &fc_port->io_queues[i]; hwqp->hwqp_id = i; hwqp->queues = args->io_queues[i]; + hwqp->is_ls_queue = false; rc = nvmf_fc_init_hwqp(fc_port, hwqp); if (rc) { for (; i > 0; --i) { diff --git a/lib/nvmf/nvmf_fc.h b/lib/nvmf/nvmf_fc.h index 088868e97..f84595571 100644 --- a/lib/nvmf/nvmf_fc.h +++ b/lib/nvmf/nvmf_fc.h @@ -309,6 +309,7 @@ struct spdk_nvmf_fc_poll_group { */ struct spdk_nvmf_fc_hwqp { enum spdk_fc_hwqp_state state; /* queue state (for poller) */ + bool is_ls_queue; uint32_t lcore_id; /* core hwqp is running on (for tracing purposes only) */ struct spdk_thread *thread; /* thread hwqp is running on */ uint32_t hwqp_id; /* A unique id (per physical port) for a hwqp */