diff --git a/doc/nvmf/getting_started.txt b/doc/nvmf/getting_started.txt index 0e6e11eba..823386f9f 100644 --- a/doc/nvmf/getting_started.txt +++ b/doc/nvmf/getting_started.txt @@ -73,7 +73,7 @@ You must edit a version of this file for use in your environment and copy it to /usr/local/etc/spdk/nvmf.conf. Alternatively, you may also specify the configuration file explicitly using `-c /path/to/nvmf.conf` when starting `nvmf_tgt`. -The `Port` and `InitiatorGroup` sections must be updated in all cases to +The `Port` and `Host` sections must be updated in all cases to match the IP addresses in your network environment. The `Nvme` section must also be updated with a the list of NVMe devices diff --git a/etc/spdk/nvmf.conf.in b/etc/spdk/nvmf.conf.in index 68d35a8e5..b5a32c1ff 100644 --- a/etc/spdk/nvmf.conf.in +++ b/etc/spdk/nvmf.conf.in @@ -77,15 +77,15 @@ [Port2] FabricIntf 192.168.2.21:7174 -# Users must change the InitiatorGroup section(s) to match the IP -# addresses and initiator configuration in their environment. +# Users must change the Host section(s) to match the IP +# addresses of the clients that will connect to this target. # Netmask can be used to specify a single IP address or a range of IP addresses # Netmask 192.168.1.20 <== single IP address # Netmask 192.168.1.0/24 <== IP range 192.168.1.* -[InitiatorGroup1] +[Host1] Netmask 15.15.15.0/24 -[InitiatorGroup2] +[Host2] Netmask 192.168.2.0/24 # NVMe Device Whitelist @@ -122,13 +122,13 @@ # section above. [SubsystemGroup1] SubsystemName cnode1 - Mapping Port1 InitiatorGroup1 + Mapping Port1 Host1 # Using NVME 0 namespace 1 Controller0 Nvme0 [SubsystemGroup2] SubsystemName cnode2 - Mapping Port2 InitiatorGroup2 + Mapping Port2 Host2 # Using NVME 1 namespace 1 Controller0 Nvme1 diff --git a/lib/nvmf/conf.c b/lib/nvmf/conf.c index 31bf3bc8a..898a50216 100644 --- a/lib/nvmf/conf.c +++ b/lib/nvmf/conf.c @@ -319,7 +319,7 @@ spdk_nvmf_parse_init_grps(void) sp = spdk_conf_first_section(NULL); while (sp != NULL) { - if (spdk_conf_section_match_prefix(sp, "InitiatorGroup")) { + if (spdk_conf_section_match_prefix(sp, "Host")) { rc = spdk_nvmf_parse_init_grp(sp); if (rc < 0) { return -1; diff --git a/lib/nvmf/subsystem_grp.c b/lib/nvmf/subsystem_grp.c index 10dee1c06..03a534969 100644 --- a/lib/nvmf/subsystem_grp.c +++ b/lib/nvmf/subsystem_grp.c @@ -244,11 +244,11 @@ spdk_nvmf_subsystem_add_map(struct spdk_nvmf_subsystem_grp *ss_group, } ig = nvmf_initiator_group_find_by_tag(ig_tag); if (ig == NULL) { - SPDK_ERRLOG("%s: InitiatorGroup%d not found\n", ss_group->name, ig_tag); + SPDK_ERRLOG("%s: Host%d not found\n", ss_group->name, ig_tag); return -1; } if (ig->state != GROUP_READY) { - SPDK_ERRLOG("%s: InitiatorGroup%d not active\n", ss_group->name, ig_tag); + SPDK_ERRLOG("%s: Host%d not active\n", ss_group->name, ig_tag); return -1; } ig->ref++; @@ -334,10 +334,10 @@ spdk_cf_add_nvmf_subsystem(struct spdk_conf_section *sp) SPDK_ERRLOG("LU%d: mapping port error\n", ss_group->num); goto err0; } - if (strncasecmp(ig_tag, "InitiatorGroup", - strlen("InitiatorGroup")) != 0 + if (strncasecmp(ig_tag, "Host", + strlen("Host")) != 0 || sscanf(ig_tag, "%*[^0-9]%d", &ig_tag_i) != 1) { - SPDK_ERRLOG("LU%d: mapping initiator error\n", ss_group->num); + SPDK_ERRLOG("LU%d: mapping host error\n", ss_group->num); goto err0; } if (port_tag_i < 1 || ig_tag_i < 1) { diff --git a/test/nvmf/nvmf.conf b/test/nvmf/nvmf.conf index 459530374..119d9327b 100644 --- a/test/nvmf/nvmf.conf +++ b/test/nvmf/nvmf.conf @@ -14,9 +14,7 @@ Comment "Test1" FabricIntf 192.168.100.8:7174 -[InitiatorGroup1] - Comment "Initiator Group1" - InitiatorName ALL +[Host1] Netmask 192.168.100.0/24 [Nvme] @@ -25,6 +23,6 @@ [SubsystemGroup1] SubsystemName cnode1 - Mapping Port1 InitiatorGroup1 + Mapping Port1 Host1 QueueDepth 128 Controller0 Nvme0