nvmf/fc: Extend nvmf_fc_lld_fini to take spdk_nvmf_transport_destroy_done_cb.
As LLD cleanup is asynchronous in nature, Pass the spdk_nvmf_transport_destroy_done_cb to LLD and it will be called once the cleanup is completed. Dont forcefully remove fc_ports by nvmf_fc_port_cleanup function. LLD will drive the fc_ports cleanup gracefully as part of nvmf_fc_lld_fini. Signed-off-by: Naresh Gottumukkala <raju.gottumukkala@broadcom.com> Change-Id: I537b9ea817eda26a0469114821e2288d2ba9d91c Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5827 Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
74669b90fc
commit
9f0b1d763a
@ -53,6 +53,9 @@ Change the return type of function `spdk_nbd_stop` from void to int. And update
|
||||
|
||||
### nvmf
|
||||
|
||||
nvmf_fc_lld_fini() now takes callback and hence updating FC Broadcom LLD driver
|
||||
to the latest is required.
|
||||
|
||||
FC transport supported primary tagging and VMID.
|
||||
|
||||
Broadcom FC LLD driver and SPDK NVMe-oF FC transport consolidated one LLD API,
|
||||
|
@ -968,17 +968,6 @@ nvmf_fc_port_lookup(uint8_t port_hdl)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
nvmf_fc_port_cleanup(void)
|
||||
{
|
||||
struct spdk_nvmf_fc_port *fc_port, *tmp;
|
||||
|
||||
TAILQ_FOREACH_SAFE(fc_port, &g_spdk_nvmf_fc_port_list, link, tmp) {
|
||||
TAILQ_REMOVE(&g_spdk_nvmf_fc_port_list, fc_port, link);
|
||||
free(fc_port);
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t
|
||||
nvmf_fc_get_prli_service_params(void)
|
||||
{
|
||||
@ -2042,14 +2031,9 @@ nvmf_fc_destroy(struct spdk_nvmf_transport *transport,
|
||||
g_nvmf_fgroup_count = 0;
|
||||
|
||||
/* low level FC driver clean up */
|
||||
nvmf_fc_lld_fini();
|
||||
|
||||
nvmf_fc_port_cleanup();
|
||||
nvmf_fc_lld_fini(cb_fn, cb_arg);
|
||||
}
|
||||
|
||||
if (cb_fn) {
|
||||
cb_fn(cb_arg);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -195,7 +195,7 @@ nvmf_fc_lld_init(void)
|
||||
static bool g_lld_fini_called = false;
|
||||
|
||||
void
|
||||
nvmf_fc_lld_fini(void)
|
||||
nvmf_fc_lld_fini(spdk_nvmf_transport_destroy_done_cb cb_fn, void *ctx)
|
||||
{
|
||||
g_lld_fini_called = true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user