iscsi: remove configuration for unsupported parameters
Our iSCSI target does not support disabling InitialR2T, DataPDUInOrder and DataSequenceInOrder, and will fail if someone tries to disable them in the config file. So instead, just do not support these parameters at all. This simplifies the code and reduces confusion. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: Icf1e01a6d12b758404769f77aa3f6221e6e3ee0d Reviewed-on: https://review.gerrithub.io/385489 Reviewed-by: Ben Walker <benjamin.walker@intel.com> Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
cce7b3078d
commit
ed2f2d9d0e
@ -4493,10 +4493,10 @@ spdk_create_iscsi_sess(struct spdk_iscsi_conn *conn,
|
||||
sess->DefaultTime2Retain = g_spdk_iscsi.DefaultTime2Retain;
|
||||
sess->FirstBurstLength = g_spdk_iscsi.FirstBurstLength;
|
||||
sess->MaxBurstLength = g_spdk_iscsi.MaxBurstLength;
|
||||
sess->InitialR2T = g_spdk_iscsi.InitialR2T;
|
||||
sess->InitialR2T = DEFAULT_INITIALR2T;
|
||||
sess->ImmediateData = g_spdk_iscsi.ImmediateData;
|
||||
sess->DataPDUInOrder = g_spdk_iscsi.DataPDUInOrder;
|
||||
sess->DataSequenceInOrder = g_spdk_iscsi.DataSequenceInOrder;
|
||||
sess->DataPDUInOrder = DEFAULT_DATAPDUINORDER;
|
||||
sess->DataSequenceInOrder = DEFAULT_DATASEQUENCEINORDER;
|
||||
sess->ErrorRecoveryLevel = g_spdk_iscsi.ErrorRecoveryLevel;
|
||||
|
||||
if (target != NULL)
|
||||
|
@ -282,10 +282,7 @@ struct spdk_iscsi_globals {
|
||||
uint32_t FirstBurstLength;
|
||||
uint32_t MaxBurstLength;
|
||||
uint32_t MaxRecvDataSegmentLength;
|
||||
uint32_t InitialR2T;
|
||||
uint32_t ImmediateData;
|
||||
uint32_t DataPDUInOrder;
|
||||
uint32_t DataSequenceInOrder;
|
||||
uint32_t ErrorRecoveryLevel;
|
||||
uint32_t AllowDuplicateIsid;
|
||||
|
||||
|
@ -75,8 +75,6 @@
|
||||
" DefaultTime2Retain %d\n" \
|
||||
"\n" \
|
||||
" ImmediateData %s\n" \
|
||||
" DataPDUInOrder %s\n" \
|
||||
" DataSequenceInOrder %s\n" \
|
||||
" ErrorRecoveryLevel %d\n" \
|
||||
"\n" \
|
||||
" # Defines whether iSCSI target will enable configuration via RPC\n" \
|
||||
@ -109,8 +107,6 @@ spdk_iscsi_config_dump_section(FILE *fp)
|
||||
g_spdk_iscsi.MaxConnections,
|
||||
g_spdk_iscsi.DefaultTime2Wait, g_spdk_iscsi.DefaultTime2Retain,
|
||||
(g_spdk_iscsi.ImmediateData == 1) ? "Yes" : "No",
|
||||
(g_spdk_iscsi.DataPDUInOrder == 1) ? "Yes" : "No",
|
||||
(g_spdk_iscsi.DataSequenceInOrder == 1) ? "Yes" : "No",
|
||||
g_spdk_iscsi.ErrorRecoveryLevel);
|
||||
}
|
||||
|
||||
@ -536,10 +532,7 @@ spdk_iscsi_app_read_parameters(void)
|
||||
int MaxConnectionsPerSession;
|
||||
int DefaultTime2Wait;
|
||||
int DefaultTime2Retain;
|
||||
int InitialR2T;
|
||||
int ImmediateData;
|
||||
int DataPDUInOrder;
|
||||
int DataSequenceInOrder;
|
||||
int ErrorRecoveryLevel;
|
||||
int timeout;
|
||||
int nopininterval;
|
||||
@ -685,26 +678,6 @@ spdk_iscsi_app_read_parameters(void)
|
||||
return -1;
|
||||
}
|
||||
|
||||
val = spdk_conf_section_get_val(sp, "InitialR2T");
|
||||
if (val == NULL) {
|
||||
InitialR2T = DEFAULT_INITIALR2T;
|
||||
} else if (strcasecmp(val, "Yes") == 0) {
|
||||
InitialR2T = 1;
|
||||
} else if (strcasecmp(val, "No") == 0) {
|
||||
#if 0
|
||||
InitialR2T = 0;
|
||||
#else
|
||||
SPDK_ERRLOG("not supported value %s\n", val);
|
||||
return -1;
|
||||
#endif
|
||||
} else {
|
||||
SPDK_ERRLOG("unknown value %s\n", val);
|
||||
return -1;
|
||||
}
|
||||
g_spdk_iscsi.InitialR2T = InitialR2T;
|
||||
SPDK_DEBUGLOG(SPDK_TRACE_ISCSI, "InitialR2T %s\n",
|
||||
g_spdk_iscsi.InitialR2T ? "Yes" : "No");
|
||||
|
||||
val = spdk_conf_section_get_val(sp, "ImmediateData");
|
||||
if (val == NULL) {
|
||||
ImmediateData = DEFAULT_IMMEDIATEDATA;
|
||||
@ -720,26 +693,6 @@ spdk_iscsi_app_read_parameters(void)
|
||||
SPDK_DEBUGLOG(SPDK_TRACE_ISCSI, "ImmediateData %s\n",
|
||||
g_spdk_iscsi.ImmediateData ? "Yes" : "No");
|
||||
|
||||
val = spdk_conf_section_get_val(sp, "DataPDUInOrder");
|
||||
if (val == NULL) {
|
||||
DataPDUInOrder = DEFAULT_DATAPDUINORDER;
|
||||
} else if (strcasecmp(val, "Yes") == 0) {
|
||||
DataPDUInOrder = 1;
|
||||
} else if (strcasecmp(val, "No") == 0) {
|
||||
#if 0
|
||||
DataPDUInOrder = 0;
|
||||
#else
|
||||
SPDK_ERRLOG("not supported value %s\n", val);
|
||||
return -1;
|
||||
#endif
|
||||
} else {
|
||||
SPDK_ERRLOG("unknown value %s\n", val);
|
||||
return -1;
|
||||
}
|
||||
g_spdk_iscsi.DataPDUInOrder = DataPDUInOrder;
|
||||
SPDK_DEBUGLOG(SPDK_TRACE_ISCSI, "DataPDUInOrder %s\n",
|
||||
g_spdk_iscsi.DataPDUInOrder ? "Yes" : "No");
|
||||
|
||||
/* This option is only for test.
|
||||
* If AllowDuplicateIsid is enabled, it allows different connections carrying
|
||||
* TSIH=0 login the target within the same session.
|
||||
@ -759,26 +712,6 @@ spdk_iscsi_app_read_parameters(void)
|
||||
SPDK_DEBUGLOG(SPDK_TRACE_ISCSI, "AllowDuplicateIsid %s\n",
|
||||
g_spdk_iscsi.AllowDuplicateIsid ? "Yes" : "No");
|
||||
|
||||
val = spdk_conf_section_get_val(sp, "DataSequenceInOrder");
|
||||
if (val == NULL) {
|
||||
DataSequenceInOrder = DEFAULT_DATASEQUENCEINORDER;
|
||||
} else if (strcasecmp(val, "Yes") == 0) {
|
||||
DataSequenceInOrder = 1;
|
||||
} else if (strcasecmp(val, "No") == 0) {
|
||||
#if 0
|
||||
DataSequenceInOrder = 0;
|
||||
#else
|
||||
SPDK_ERRLOG("not supported value %s\n", val);
|
||||
return -1;
|
||||
#endif
|
||||
} else {
|
||||
SPDK_ERRLOG("unknown value %s\n", val);
|
||||
return -1;
|
||||
}
|
||||
g_spdk_iscsi.DataSequenceInOrder = DataSequenceInOrder;
|
||||
SPDK_DEBUGLOG(SPDK_TRACE_ISCSI, "DataSequenceInOrder %s\n",
|
||||
g_spdk_iscsi.DataSequenceInOrder ? "Yes" : "No");
|
||||
|
||||
ErrorRecoveryLevel = spdk_conf_section_get_intval(sp, "ErrorRecoveryLevel");
|
||||
if (ErrorRecoveryLevel < 0) {
|
||||
ErrorRecoveryLevel = DEFAULT_ERRORRECOVERYLEVEL;
|
||||
|
Loading…
Reference in New Issue
Block a user