diff --git a/lib/nvmf/conf.c b/lib/nvmf/conf.c index 0b6b7eee0..31bf3bc8a 100644 --- a/lib/nvmf/conf.c +++ b/lib/nvmf/conf.c @@ -222,7 +222,7 @@ spdk_nvmf_parse_port(struct spdk_conf_section *sp) /* Loop over the fabric interfaces and add them to the port */ for (i = 0; ; i++) { - listen_addr = spdk_conf_section_get_nmval(sp, "FabricIntf", i, 1); + listen_addr = spdk_conf_section_get_nmval(sp, "FabricIntf", i, 0); if (listen_addr == NULL) { break; } @@ -238,6 +238,11 @@ spdk_nvmf_parse_port(struct spdk_conf_section *sp) spdk_nvmf_port_add_fabric_intf(port, fabric_intf); } + if (TAILQ_EMPTY(&port->head)) { + SPDK_ERRLOG("No fabric interface found\n"); + return -1; + } + return 0; } diff --git a/test/nvmf/nvmf.conf b/test/nvmf/nvmf.conf index b710defb1..459530374 100644 --- a/test/nvmf/nvmf.conf +++ b/test/nvmf/nvmf.conf @@ -12,7 +12,7 @@ [Port1] Comment "Test1" - FabricIntf DA1 192.168.100.8:7174 + FabricIntf 192.168.100.8:7174 [InitiatorGroup1] Comment "Initiator Group1"