etc/spdk/iscsi.conf.in: How to use cpumask for the connection

User can specify processor affinity for each iSCSI connection
by specifying cpumask in the configuration file.

However the example of iscsi.conf.in does not have any description
about this. Hence it is very difficult for user to use this.

The portal group section of the config dump file has the same
description. Hence it is also changed.

Change-Id: I6e7b3bb67e10e78f4a47165525f023555080f146
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/391510
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
This commit is contained in:
Shuhei Matsumoto 2017-12-18 13:32:42 +09:00 committed by Daniel Verkamp
parent c22f12c8df
commit 8fd2882fb2
2 changed files with 27 additions and 8 deletions

View File

@ -64,11 +64,21 @@
# Users must change the PortalGroup section(s) to match the IP addresses
# for their environment.
# PortalGroup sections define which TCP ports the iSCSI server will use
# to listen for incoming connections. These are also used to determine
# which targets are accessible over each portal group.
# PortalGroup sections define which network portals the iSCSI target
# will use to listen for incoming connections. These are also used to
# determine which targets are accessible over each portal group.
# Up to 1024 Portal directives are allowed. These define the network
# portals of the portal group. The user must specify a IP address
# for each network portal, and may optionally specify a port and
# a cpumask. If the port is omitted, 3260 will be used. Cpumask will
# be used to set the processor affinity of the iSCSI connection
# through the portal. If the cpumask is omitted, cpumask will be
# set to all available processors.
# Syntax:
# Portal <Name> <IP address>[:<port>[@<cpumask>]]
[PortalGroup1]
Portal DA1 192.168.2.21:3260
Portal DA2 192.168.2.22:3260@0xF
# Users must change the InitiatorGroup section(s) to match the IP
# addresses and initiator configuration in their environment.

View File

@ -117,16 +117,25 @@ static const char *portal_group_section = \
"\n"
"# Users must change the PortalGroup section(s) to match the IP addresses\n"
"# for their environment.\n"
"# PortalGroup sections define which TCP ports the iSCSI server will use\n"
"# to listen for incoming connections. These are also used to determine\n"
"# which targets are accessible over each portal group.\n";
"# PortalGroup sections define which network portals the iSCSI target\n"
"# will use to listen for incoming connections. These are also used to\n"
"# determine which targets are accessible over each portal group.\n"
"# Up to 1024 Portal directives are allowed. These define the network\n"
"# portals of the portal group. The user must specify a IP address\n"
"# for each network portal, and may optionally specify a port and\n"
"# a cpumask. If the port is omitted, 3260 will be used. Cpumask will\n"
"# be used to set the processor affinity of the iSCSI connection\n"
"# through the portal. If the cpumask is omitted, cpumask will be\n"
"# set to all available processors.\n"
"# Syntax:\n"
"# Portal <Name> <IP address>[:<port>[@<cpumask>]]\n";
#define PORTAL_GROUP_TMPL \
"[PortalGroup%d]\n" \
" Comment \"Portal%d\"\n"
#define PORTAL_TMPL \
" Portal DA1 %s:%s\n"
" Portal DA1 %s:%s@0x%" PRIx64 "\n"
static void
spdk_iscsi_config_dump_portal_groups(FILE *fp)
@ -144,7 +153,7 @@ spdk_iscsi_config_dump_portal_groups(FILE *fp)
/* Dump portals */
TAILQ_FOREACH(p, &pg->head, per_pg_tailq) {
if (NULL == p) { continue; }
fprintf(fp, PORTAL_TMPL, p->host, p->port);
fprintf(fp, PORTAL_TMPL, p->host, p->port, p->cpumask);
}
}
}