Commit af8affd1 authored by Ben Walker's avatar Ben Walker Committed by Jim Harris
Browse files

iscsi: Deprecate MinConnectionsPerCore



iSCSI is currently being adapted to SPDK's new threading model,
and this parameter doesn't make sense anymore. Remove it for
now until something functionally equivalent is added later.

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


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 1f41fb36
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -2379,7 +2379,6 @@ first_burst_length | Optional | number | Session specific parameter, F
immediate_data              | Optional | boolean | Session specific parameter, ImmediateData (default: `true`)
error_recovery_level        | Optional | number  | Session specific parameter, ErrorRecoveryLevel (default: 0)
allow_duplicated_isid       | Optional | boolean | Allow duplicated initiator session ID (default: `false`)
min_connections_per_core    | Optional | number  | Allocation unit of connections per core (default: 4)

To load CHAP shared secret file, its path is required to specify explicitly in the parameter `auth_file`.

@@ -2462,7 +2461,6 @@ Example response:
    "max_sessions": 128,
    "error_recovery_level": 0,
    "auth_file": "/usr/local/etc/spdk/auth.conf",
    "min_connections_per_core": 4,
    "disable_chap": true,
    "default_time2wait": 2,
    "require_chap": false
+0 −2
Original line number Diff line number Diff line
@@ -40,8 +40,6 @@

  AuthFile /usr/local/etc/spdk/auth.conf

  MinConnectionsPerCore 4

  # Socket I/O timeout sec. (0 is infinite)
  Timeout 30

+1 −19
Original line number Diff line number Diff line
@@ -62,7 +62,6 @@
	memset(&(conn)->portal, 0, sizeof(*(conn)) -	\
		offsetof(struct spdk_iscsi_conn, portal));

static int g_connections_per_lcore;
static uint32_t *g_num_connections;

struct spdk_iscsi_conn *g_conns_array = MAP_FAILED;
@@ -1490,18 +1489,6 @@ spdk_iscsi_conn_schedule(struct spdk_iscsi_conn *conn)
	spdk_event_call(event);
}

void
spdk_iscsi_conn_set_min_per_core(int count)
{
	g_connections_per_lcore = count;
}

int
spdk_iscsi_conn_get_min_per_core(void)
{
	return g_connections_per_lcore;
}

static uint32_t
iscsi_conn_allocate_reactor(const struct spdk_cpuset *cpumask)
{
@@ -1519,12 +1506,7 @@ iscsi_conn_allocate_reactor(const struct spdk_cpuset *cpumask)
		/* This core is running. Check how many pollers it already has. */
		num_pollers = g_num_connections[i];

		if ((num_pollers > 0) && (num_pollers < g_connections_per_lcore)) {
			/* Fewer than the maximum connections per core,
			 * but at least 1. Use this core.
			 */
			return i;
		} else if (num_pollers < min_pollers) {
		if (num_pollers < min_pollers) {
			/* Track the core that has the minimum number of pollers
			 * to be used if no cores meet our criteria
			 */
+0 −2
Original line number Diff line number Diff line
@@ -182,8 +182,6 @@ void spdk_iscsi_conn_schedule(struct spdk_iscsi_conn *conn);
void spdk_iscsi_conn_logout(struct spdk_iscsi_conn *conn);
int spdk_iscsi_drop_conns(struct spdk_iscsi_conn *conn,
			  const char *conn_match, int drop_all);
void spdk_iscsi_conn_set_min_per_core(int count);
int spdk_iscsi_conn_get_min_per_core(void);

int spdk_iscsi_conn_read_data(struct spdk_iscsi_conn *conn, int len, void *buf);
int spdk_iscsi_conn_readv_data(struct spdk_iscsi_conn *conn,
+1 −2
Original line number Diff line number Diff line
@@ -75,7 +75,6 @@
#define DEFAULT_TIMEOUT 60
#define MAX_NOPININTERVAL 60
#define DEFAULT_NOPININTERVAL 30
#define DEFAULT_CONNECTIONS_PER_LCORE 4

/*
 * SPDK iSCSI target currently only supports 64KB as the maximum data segment length
@@ -307,7 +306,7 @@ struct spdk_iscsi_opts {
	bool ImmediateData;
	uint32_t ErrorRecoveryLevel;
	bool AllowDuplicateIsid;
	uint32_t min_connections_per_core;
	uint32_t min_connections_per_core; /* Deprecated */
};

struct spdk_iscsi_globals {
Loading