Commit 39e850d1 authored by Ben Walker's avatar Ben Walker Committed by Changpeng Liu
Browse files

iscsi: Remove cpumask from portals



Connections will soon be assigned to poll groups, which will be
dynamically moved between CPU cores based on load. It no longer makes
sense to restrict certain portal groups to specific cpu cores in this
model.

Change-Id: Iee983d75febc9797aa60021c5bc0680335e895cd
Signed-off-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463358


Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent 4c77b005
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2,6 +2,11 @@

## v19.10: (Upcoming Release)

### iSCSI

Portals may no longer be associated with a cpumask. The scheduling of
connections is moving to a more dynamic model.

## v19.07:

### ftl
+3 −6
Original line number Diff line number Diff line
@@ -71,13 +71,10 @@
#  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.
#  for each network portal, and may optionally specify a port.
#  If the port is omitted, 3260 will be used.
#  Syntax:
#    Portal <Name> <IP address>[:<port>[@<cpumask>]]
#    Portal <Name> <IP address>[:<port>]
[PortalGroup1]
  Portal DA1 192.168.2.21:3260
  Portal DA2 192.168.2.22:3260@0xF
+0 −6
Original line number Diff line number Diff line
@@ -229,7 +229,6 @@ spdk_iscsi_conn_construct(struct spdk_iscsi_portal *portal,
	conn->pg_tag = portal->group->tag;
	conn->portal_host = strdup(portal->host);
	conn->portal_port = strdup(portal->port);
	conn->portal_cpumask = &portal->cpumask;
	conn->sock = sock;

	conn->state = ISCSI_CONN_STATE_INVALID;
@@ -1445,11 +1444,6 @@ spdk_iscsi_conn_schedule(struct spdk_iscsi_conn *conn)

		lcore = g_next_core;
		g_next_core = spdk_env_get_next_core(g_next_core);

		if (!spdk_cpuset_get_cpu(&conn->portal->cpumask, lcore)) {
			continue;
		}

		break;
	}

+0 −1
Original line number Diff line number Diff line
@@ -82,7 +82,6 @@ struct spdk_iscsi_conn {
	int				pg_tag;
	char				*portal_host;
	char				*portal_port;
	struct spdk_cpuset		*portal_cpumask;
	uint32_t			lcore;
	struct spdk_sock		*sock;
	struct spdk_iscsi_sess		*sess;
+6 −2
Original line number Diff line number Diff line
@@ -799,9 +799,13 @@ spdk_rpc_add_portal_group(struct spdk_jsonrpc_request *request,
		goto out;
	}
	for (i = 0; i < req.portal_list.num_portals; i++) {
		if (req.portal_list.portals[i].cpumask) {
			SPDK_WARNLOG("A portal was specified with a CPU mask which is no longer supported.\n");
			SPDK_WARNLOG("Ignoring the cpumask.\n");
		}

		portal = spdk_iscsi_portal_create(req.portal_list.portals[i].host,
						  req.portal_list.portals[i].port,
						  req.portal_list.portals[i].cpumask);
						  req.portal_list.portals[i].port);
		if (portal == NULL) {
			SPDK_ERRLOG("portal_create failed\n");
			goto out;
Loading