lib/fc: move to spdk_nvmf_tgt_listen_ext()

spdk_nvmf_tgt_listen() is deprecated, so moved
the remaining instance to spdk_nvmf_tgt_listen_ext().

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I32b54e99f83fa10f1074f80aad82bb0608c9ae11
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6630
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
Tomasz Zawadzki 2021-03-02 08:54:22 -05:00
parent 38d13d06a8
commit 144eac1362

View File

@ -3127,12 +3127,15 @@ nvmf_fc_adm_add_rem_nport_listener(struct spdk_nvmf_fc_nport *nport, bool add)
{ {
struct spdk_nvmf_tgt *tgt = nvmf_fc_get_tgt(); struct spdk_nvmf_tgt *tgt = nvmf_fc_get_tgt();
struct spdk_nvmf_subsystem *subsystem; struct spdk_nvmf_subsystem *subsystem;
struct spdk_nvmf_listen_opts opts;
if (!tgt) { if (!tgt) {
SPDK_ERRLOG("No nvmf target defined\n"); SPDK_ERRLOG("No nvmf target defined\n");
return -EINVAL; return -EINVAL;
} }
spdk_nvmf_listen_opts_init(&opts, sizeof(opts));
subsystem = spdk_nvmf_subsystem_get_first(tgt); subsystem = spdk_nvmf_subsystem_get_first(tgt);
while (subsystem) { while (subsystem) {
struct nvmf_fc_add_rem_listener_ctx *ctx; struct nvmf_fc_add_rem_listener_ctx *ctx;
@ -3146,7 +3149,7 @@ nvmf_fc_adm_add_rem_nport_listener(struct spdk_nvmf_fc_nport *nport, bool add)
nport->fc_nodename.u.wwn, nport->fc_nodename.u.wwn,
nport->fc_portname.u.wwn); nport->fc_portname.u.wwn);
if (spdk_nvmf_tgt_listen(subsystem->tgt, &ctx->trid)) { if (spdk_nvmf_tgt_listen_ext(subsystem->tgt, &ctx->trid, &opts)) {
SPDK_ERRLOG("Failed to add transport address %s to tgt listeners\n", SPDK_ERRLOG("Failed to add transport address %s to tgt listeners\n",
ctx->trid.traddr); ctx->trid.traddr);
free(ctx); free(ctx);