nvmf: remove MaxInCapsuleData configuration option
The maximum in-capsule data size is determined by the I/O queue bounce buffer size, and there is no point in limiting it beyond that, so remove the need to configure it. Change-Id: I64806516b847e819f57ac9f62a162f7a04805b57 Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
4946c154c2
commit
196dfe4278
@ -36,16 +36,6 @@
|
||||
# Users can optionally change this to fit their environment.
|
||||
NodeBase "nqn.2016-06.io.spdk"
|
||||
|
||||
# Set the optional in-capsule data byte length for I/O queue capsule size.
|
||||
# Accepted values must be divisible by 16 and less than or equal to
|
||||
# the default maximum transfer length NVMF_MAX_RECV_DATA_TRANSFER_SIZE.
|
||||
# A minimum recommended value of 1024 bytes allows NVMf connect
|
||||
# commands to use in-capsule data. Specifying a value greater than 4096
|
||||
# will allow NVMf write requests <= 4096 in length to use in-capsule
|
||||
# immediate data and bypass the need to perfrom an rdma_read operation
|
||||
# to pull the data from the host.
|
||||
MaxInCapsuleData 1024
|
||||
|
||||
# Set the maximum number of NVMf logical controller sessions allowed
|
||||
# for each subsystem provisioned below. The default value (1) is used if
|
||||
# not set here.
|
||||
|
@ -48,7 +48,6 @@ spdk_nvmf_parse_nvmf_tgt(void)
|
||||
{
|
||||
struct spdk_conf_section *sp;
|
||||
char *nodebase;
|
||||
int max_in_capsule_data;
|
||||
int max_sessions_per_subsystem;
|
||||
int max_queue_depth;
|
||||
int max_conn_per_sess;
|
||||
@ -67,11 +66,6 @@ spdk_nvmf_parse_nvmf_tgt(void)
|
||||
nodebase = SPDK_NVMF_DEFAULT_NODEBASE;
|
||||
}
|
||||
|
||||
max_in_capsule_data = spdk_conf_section_get_intval(sp, "MaxInCapsuleData");
|
||||
if (max_in_capsule_data < 0) {
|
||||
max_in_capsule_data = SPDK_NVMF_DEFAULT_IN_CAPSULE_DATA_SIZE;
|
||||
}
|
||||
|
||||
max_sessions_per_subsystem = spdk_conf_section_get_intval(sp, "MaxSessionsPerSubsystem");
|
||||
if (max_sessions_per_subsystem < 0) {
|
||||
max_sessions_per_subsystem = SPDK_NVMF_DEFAULT_MAX_SESSIONS_PER_SUBSYSTEM;
|
||||
@ -90,7 +84,7 @@ spdk_nvmf_parse_nvmf_tgt(void)
|
||||
max_recv_seg_len = SPDK_NVMF_MAX_RECV_DATA_TRANSFER_SIZE;
|
||||
listen_port = SPDK_NVMF_DEFAULT_SIN_PORT;
|
||||
|
||||
rc = nvmf_tgt_init(nodebase, max_in_capsule_data, max_sessions_per_subsystem,
|
||||
rc = nvmf_tgt_init(nodebase, max_sessions_per_subsystem,
|
||||
max_queue_depth, max_conn_per_sess, max_recv_seg_len, listen_port);
|
||||
|
||||
return rc;
|
||||
|
@ -368,8 +368,7 @@ nvmf_init_conn_properites(struct spdk_nvmf_conn *conn,
|
||||
|
||||
/* increase the I/O recv capsule size for in_capsule data */
|
||||
lcdata = (struct spdk_nvmf_extended_identify_ctrlr_data *)&session->vcdata.reserved5[1088];
|
||||
lcdata->ioccsz += (g_nvmf_tgt.MaxInCapsuleData / 16);
|
||||
|
||||
lcdata->ioccsz += (SPDK_NVMF_MAX_RECV_DATA_TRANSFER_SIZE / 16);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -137,7 +137,7 @@ spdk_nvmf_check_pools(void)
|
||||
}
|
||||
|
||||
int
|
||||
nvmf_tgt_init(char *nodebase, int max_in_capsule_data,
|
||||
nvmf_tgt_init(char *nodebase,
|
||||
int max_sessions_per_subsystem,
|
||||
int max_queue_depth, int max_conn_per_sess, int max_recv_seg_len, int listen_port)
|
||||
{
|
||||
@ -150,17 +150,6 @@ nvmf_tgt_init(char *nodebase, int max_in_capsule_data,
|
||||
}
|
||||
SPDK_TRACELOG(SPDK_TRACE_DEBUG, "NodeBase: %s\n", g_nvmf_tgt.nodebase);
|
||||
|
||||
if (max_in_capsule_data >= 16 &&
|
||||
max_in_capsule_data % 16 == 0 &&
|
||||
max_in_capsule_data <= SPDK_NVMF_MAX_RECV_DATA_TRANSFER_SIZE) {
|
||||
g_nvmf_tgt.MaxInCapsuleData = max_in_capsule_data;
|
||||
SPDK_TRACELOG(SPDK_TRACE_DEBUG, "MaxInCapsuleData: to %d\n",
|
||||
g_nvmf_tgt.MaxInCapsuleData);
|
||||
} else {
|
||||
SPDK_ERRLOG("Invalid MaxInCapsuleData: %d\n", max_in_capsule_data);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (max_sessions_per_subsystem >= 1 &&
|
||||
max_sessions_per_subsystem <= SPDK_NVMF_DEFAULT_MAX_SESSIONS_PER_SUBSYSTEM) {
|
||||
g_nvmf_tgt.MaxSessionsPerSubsystem = max_sessions_per_subsystem;
|
||||
|
@ -57,7 +57,6 @@
|
||||
|
||||
#define SPDK_NVMF_DEFAULT_NUM_SESSIONS_PER_LCORE 1
|
||||
#define SPDK_NVMF_DEFAULT_NODEBASE "nqn.2016-06.io.spdk"
|
||||
#define SPDK_NVMF_DEFAULT_IN_CAPSULE_DATA_SIZE 1024
|
||||
#define SPDK_NVMF_DEFAULT_MAX_SESSIONS_PER_SUBSYSTEM 1
|
||||
#define SPDK_NVMF_DEFAULT_MAX_QUEUE_DEPTH 128
|
||||
#define SPDK_NVMF_DEFAULT_MAX_CONNECTIONS_PER_SESSION 4
|
||||
@ -105,7 +104,6 @@ struct spdk_nvmf_globals {
|
||||
|
||||
pthread_mutex_t mutex;
|
||||
|
||||
int MaxInCapsuleData;
|
||||
int MaxSessionsPerSubsystem;
|
||||
int MaxQueueDepth;
|
||||
int MaxConnectionsPerSession;
|
||||
@ -119,7 +117,7 @@ void
|
||||
nvmf_complete_cmd(void *rsp, const struct spdk_nvme_cpl *cmp);
|
||||
|
||||
|
||||
int nvmf_tgt_init(char *nodebase, int max_in_capsule_data, int max_sessions, int max_queue_depth,
|
||||
int nvmf_tgt_init(char *nodebase, int max_sessions, int max_queue_depth,
|
||||
int max_conn_per_sess, int max_recv_seg_len, int listen_port);
|
||||
|
||||
int nvmf_initialize(void);
|
||||
|
Loading…
x
Reference in New Issue
Block a user