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: Ben Walker <benjamin.walker@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452779 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
1f41fb365b
commit
af8affd1a9
@ -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
|
||||
|
@ -40,8 +40,6 @@
|
||||
|
||||
AuthFile /usr/local/etc/spdk/auth.conf
|
||||
|
||||
MinConnectionsPerCore 4
|
||||
|
||||
# Socket I/O timeout sec. (0 is infinite)
|
||||
Timeout 30
|
||||
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -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,
|
||||
|
@ -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 {
|
||||
|
@ -376,9 +376,6 @@ iscsi_log_globals(void)
|
||||
"DiscoveryAuthGroup AuthGroup%d\n",
|
||||
g_spdk_iscsi.chap_group);
|
||||
}
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "MinConnectionsPerCore%d\n",
|
||||
spdk_iscsi_conn_get_min_per_core());
|
||||
}
|
||||
|
||||
static void
|
||||
@ -401,7 +398,7 @@ iscsi_opts_init(struct spdk_iscsi_opts *opts)
|
||||
opts->chap_group = 0;
|
||||
opts->authfile = NULL;
|
||||
opts->nodebase = NULL;
|
||||
opts->min_connections_per_core = DEFAULT_CONNECTIONS_PER_LCORE;
|
||||
opts->min_connections_per_core = 0;
|
||||
}
|
||||
|
||||
struct spdk_iscsi_opts *
|
||||
@ -474,7 +471,7 @@ spdk_iscsi_opts_copy(struct spdk_iscsi_opts *src)
|
||||
dst->require_chap = src->require_chap;
|
||||
dst->mutual_chap = src->mutual_chap;
|
||||
dst->chap_group = src->chap_group;
|
||||
dst->min_connections_per_core = src->min_connections_per_core;
|
||||
dst->min_connections_per_core = 0;
|
||||
|
||||
return dst;
|
||||
}
|
||||
@ -623,7 +620,7 @@ iscsi_read_config_file_params(struct spdk_conf_section *sp,
|
||||
}
|
||||
min_conn_per_core = spdk_conf_section_get_intval(sp, "MinConnectionsPerCore");
|
||||
if (min_conn_per_core >= 0) {
|
||||
opts->min_connections_per_core = min_conn_per_core;
|
||||
SPDK_WARNLOG("MinConnectionsPerCore is deprecated and will be ignored.\n");
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -778,7 +775,9 @@ iscsi_set_global_params(struct spdk_iscsi_opts *opts)
|
||||
g_spdk_iscsi.mutual_chap = opts->mutual_chap;
|
||||
g_spdk_iscsi.chap_group = opts->chap_group;
|
||||
|
||||
spdk_iscsi_conn_set_min_per_core(opts->min_connections_per_core);
|
||||
if (opts->min_connections_per_core) {
|
||||
SPDK_WARNLOG("iSCSI option 'min_connections_per_core' has been deprecated and will be ignored.\n");
|
||||
}
|
||||
|
||||
iscsi_log_globals();
|
||||
|
||||
@ -1428,9 +1427,6 @@ spdk_iscsi_opts_info_json(struct spdk_json_write_ctx *w)
|
||||
spdk_json_write_named_bool(w, "mutual_chap", g_spdk_iscsi.mutual_chap);
|
||||
spdk_json_write_named_int32(w, "chap_group", g_spdk_iscsi.chap_group);
|
||||
|
||||
spdk_json_write_named_uint32(w, "min_connections_per_core",
|
||||
spdk_iscsi_conn_get_min_per_core());
|
||||
|
||||
spdk_json_write_object_end(w);
|
||||
}
|
||||
|
||||
|
@ -509,7 +509,6 @@ def get_iscsi_options_json(config, section):
|
||||
['ImmediateData', 'immediate_data', bool, True],
|
||||
['ErrorRecoveryLevel', 'error_recovery_level', int, 0],
|
||||
['NopInInterval', 'nop_in_interval', int, 30],
|
||||
['MinConnectionsPerCore', 'min_connections_per_core', int, 4],
|
||||
['DefaultTime2Wait', 'default_time2wait', int, 2],
|
||||
['QueueDepth', 'max_queue_depth', int, 64],
|
||||
['', 'first_burst_length', int, 8192]
|
||||
|
@ -596,8 +596,7 @@ if __name__ == "__main__":
|
||||
first_burst_length=args.first_burst_length,
|
||||
immediate_data=args.immediate_data,
|
||||
error_recovery_level=args.error_recovery_level,
|
||||
allow_duplicated_isid=args.allow_duplicated_isid,
|
||||
min_connections_per_core=args.min_connections_per_core)
|
||||
allow_duplicated_isid=args.allow_duplicated_isid)
|
||||
|
||||
p = subparsers.add_parser('set_iscsi_options', help="""Set options of iSCSI subsystem""")
|
||||
p.add_argument('-f', '--auth-file', help='Path to CHAP shared secret file')
|
||||
@ -620,7 +619,6 @@ if __name__ == "__main__":
|
||||
p.add_argument('-i', '--immediate-data', help='Negotiated parameter, ImmediateData.', action='store_true')
|
||||
p.add_argument('-l', '--error-recovery-level', help='Negotiated parameter, ErrorRecoveryLevel', type=int)
|
||||
p.add_argument('-p', '--allow-duplicated-isid', help='Allow duplicated initiator session ID.', action='store_true')
|
||||
p.add_argument('-u', '--min-connections-per-core', help='Allocation unit of connections per core', type=int)
|
||||
p.set_defaults(func=set_iscsi_options)
|
||||
|
||||
def set_iscsi_discovery_auth(args):
|
||||
|
@ -18,8 +18,7 @@ def set_iscsi_options(
|
||||
first_burst_length=None,
|
||||
immediate_data=None,
|
||||
error_recovery_level=None,
|
||||
allow_duplicated_isid=None,
|
||||
min_connections_per_core=None):
|
||||
allow_duplicated_isid=None):
|
||||
"""Set iSCSI target options.
|
||||
|
||||
Args:
|
||||
@ -40,7 +39,6 @@ def set_iscsi_options(
|
||||
immediate_data: Negotiated parameter, ImmediateData
|
||||
error_recovery_level: Negotiated parameter, ErrorRecoveryLevel
|
||||
allow_duplicated_isid: Allow duplicated initiator session ID
|
||||
min_connections_per_core: Allocation unit of connections per core
|
||||
|
||||
Returns:
|
||||
True or False
|
||||
@ -81,8 +79,6 @@ def set_iscsi_options(
|
||||
params['error_recovery_level'] = error_recovery_level
|
||||
if allow_duplicated_isid:
|
||||
params['allow_duplicated_isid'] = allow_duplicated_isid
|
||||
if min_connections_per_core:
|
||||
params['min_connections_per_core'] = min_connections_per_core
|
||||
|
||||
return client.call('set_iscsi_options', params)
|
||||
|
||||
|
@ -422,7 +422,6 @@
|
||||
"error_recovery_level": 0,
|
||||
"disable_chap": false,
|
||||
"auth_file": "/usr/local/etc/spdk/auth.conf",
|
||||
"min_connections_per_core": 4,
|
||||
"default_time2wait": 2
|
||||
},
|
||||
"method": "set_iscsi_options"
|
||||
|
@ -123,7 +123,6 @@
|
||||
"max_sessions": 128,
|
||||
"error_recovery_level": 0,
|
||||
"disable_chap": false,
|
||||
"min_connections_per_core": 4,
|
||||
"default_time2wait": 2
|
||||
},
|
||||
"method": "set_iscsi_options"
|
||||
|
@ -18,7 +18,6 @@ o- iscsi .......................................................................
|
||||
| o- max_connections_per_session: 2 ........................................................................................ [...]
|
||||
| o- max_queue_depth: 64 ................................................................................................... [...]
|
||||
| o- max_sessions: 128 ..................................................................................................... [...]
|
||||
| o- min_connections_per_core: 4 ........................................................................................... [...]
|
||||
| o- mutual_chap: False .................................................................................................... [...]
|
||||
| o- node_base: iqn.2016-06.io.spdk ........................................................................................ [...]
|
||||
| o- nop_in_interval: 30 ................................................................................................... [...]
|
||||
|
Loading…
Reference in New Issue
Block a user