nvmf/fc: Merged LLD queue init api.

Today we have two lowlevel LLD apis nvmf_fc_init_q and
spdk_nvmf_fc_init_poller_queues for LLD queue initialisation.
Since two calls are redundant, merge them to one api. Also remove dead
function code nvmf_fc_hwqp_reinit_poller_queues.

Signed-off-by: Naresh Gottumukkala <raju.gottumukkala@broadcom.com>
Change-Id: Ic3df6bff7d38d7b1e946755c3224daf7f6194125
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5444
Community-CI: Broadcom CI
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Naresh Gottumukkala 2020-12-04 06:34:54 +00:00 committed by Tomasz Zawadzki
parent c1a53822bb
commit cd8e42f48c
3 changed files with 9 additions and 34 deletions

View File

@ -2,6 +2,12 @@
## v21.01: (Upcoming Release)
### nvmf
Broadcom FC LLD driver and SPDK NVMe-oF FC transport consolidated one LLD API,
`nvmf_fc_init_poller_queues` into another LLD API `nvmf_fc_init_q`.
Hence updating Broadcom FC LLD driver to the latest is required.
### event
The pci_whitelist and pci_blacklist members of struct spdk_app_opts have been

View File

@ -389,12 +389,6 @@ nvmf_fc_hwqp_free_fc_request(struct spdk_nvmf_fc_hwqp *hwqp, struct spdk_nvmf_fc
TAILQ_INSERT_HEAD(&hwqp->free_reqs, fc_req, link);
}
void
nvmf_fc_init_poller_queues(struct spdk_nvmf_fc_hwqp *hwqp)
{
nvmf_fc_init_rqpair_buffers(hwqp);
}
struct spdk_nvmf_fc_conn *
nvmf_fc_hwqp_find_fc_conn(struct spdk_nvmf_fc_hwqp *hwqp, uint64_t conn_id)
{
@ -409,28 +403,6 @@ nvmf_fc_hwqp_find_fc_conn(struct spdk_nvmf_fc_hwqp *hwqp, uint64_t conn_id)
return NULL;
}
void
nvmf_fc_hwqp_reinit_poller_queues(struct spdk_nvmf_fc_hwqp *hwqp, void *queues_curr)
{
struct spdk_nvmf_fc_abts_ctx *ctx;
struct spdk_nvmf_fc_poller_api_queue_sync_args *args = NULL, *tmp = NULL;
/* Clean up any pending sync callbacks */
TAILQ_FOREACH_SAFE(args, &hwqp->sync_cbs, link, tmp) {
TAILQ_REMOVE(&hwqp->sync_cbs, args, link);
ctx = args->cb_info.cb_data;
if (ctx) {
if (++ctx->hwqps_responded == ctx->num_hwqps) {
free(ctx->sync_poller_args);
free(ctx->abts_poller_args);
free(ctx);
}
}
}
nvmf_fc_reinit_q(hwqp->queues, queues_curr);
}
void
nvmf_fc_init_hwqp(struct spdk_nvmf_fc_port *fc_port, struct spdk_nvmf_fc_hwqp *hwqp)
{
@ -439,15 +411,16 @@ nvmf_fc_init_hwqp(struct spdk_nvmf_fc_port *fc_port, struct spdk_nvmf_fc_hwqp *h
/* clear counters */
memset(&hwqp->counters, 0, sizeof(struct spdk_nvmf_fc_errors));
nvmf_fc_init_poller_queues(hwqp);
if (&fc_port->ls_queue != hwqp) {
nvmf_fc_create_req_mempool(hwqp);
}
nvmf_fc_init_q(hwqp);
TAILQ_INIT(&hwqp->connection_list);
TAILQ_INIT(&hwqp->sync_cbs);
TAILQ_INIT(&hwqp->ls_pending_queue);
/* Init low level driver queues */
nvmf_fc_init_q(hwqp);
}
static struct spdk_nvmf_fc_poll_group *

View File

@ -848,13 +848,9 @@ void nvmf_fc_ls_add_conn_failure(
void nvmf_fc_init_hwqp(struct spdk_nvmf_fc_port *fc_port, struct spdk_nvmf_fc_hwqp *hwqp);
void nvmf_fc_init_poller_queues(struct spdk_nvmf_fc_hwqp *hwqp);
struct spdk_nvmf_fc_conn *nvmf_fc_hwqp_find_fc_conn(struct spdk_nvmf_fc_hwqp *hwqp,
uint64_t conn_id);
void nvmf_fc_hwqp_reinit_poller_queues(struct spdk_nvmf_fc_hwqp *hwqp, void *queues_curr);
struct spdk_nvmf_fc_port *nvmf_fc_port_lookup(uint8_t port_hdl);
bool nvmf_fc_port_is_offline(struct spdk_nvmf_fc_port *fc_port);