Commit a4b85721 authored by Ben Walker's avatar Ben Walker Committed by Benjamin Walker
Browse files

nvmf: Rename InitiatorGroup config section to Host



The specification refers to this concept as a Host,
so use that term. This only changes the configuration
file usage. Initiator groups are still referenced in
the code and will be removed later.

Change-Id: I897f4dbdfb65d94da1e5a77434fc07a2c18bcdc2
Signed-off-by: default avatarBen Walker <benjamin.walker@intel.com>
parent 988e88c8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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
+6 −6
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -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;
+5 −5
Original line number Diff line number Diff line
@@ -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) {
+2 −4
Original line number Diff line number Diff line
@@ -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