Commit cd8e42f4 authored by Naresh Gottumukkala's avatar Naresh Gottumukkala Committed by Tomasz Zawadzki
Browse files

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: default avatarNaresh 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: default avatarAleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: default avatarAnil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent c1a53822
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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
+3 −30
Original line number Diff line number Diff line
@@ -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 *
+0 −4
Original line number Diff line number Diff line
@@ -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);