Decouple MaxBurstLength and FirstBurstLength from MaxRecvDataSegmentLength
reported by the ICL module in iscsid(8). This harmed performance and was just wrong. MFC after: 1 month
This commit is contained in:
parent
2317fdfa8c
commit
03b521d4dc
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=301721
@ -42,8 +42,10 @@
|
||||
#define CONN_DIGEST_NONE 0
|
||||
#define CONN_DIGEST_CRC32C 1
|
||||
|
||||
#define CONN_MUTUAL_CHALLENGE_LEN 1024
|
||||
#define CONN_MUTUAL_CHALLENGE_LEN 1024
|
||||
#define SOCKBUF_SIZE 1048576
|
||||
#define MAX_BURST_LENGTH (256 * 1024)
|
||||
#define FIRST_BURST_LENGTH (128 * 1024)
|
||||
|
||||
struct connection {
|
||||
int conn_iscsi_fd;
|
||||
|
@ -395,16 +395,24 @@ login_negotiate_key(struct connection *conn, const char *name,
|
||||
}
|
||||
conn->conn_max_data_segment_length = tmp;
|
||||
} else if (strcmp(name, "MaxBurstLength") == 0) {
|
||||
if (conn->conn_immediate_data) {
|
||||
tmp = strtoul(value, NULL, 10);
|
||||
if (tmp <= 0)
|
||||
log_errx(1, "received invalid MaxBurstLength");
|
||||
conn->conn_max_burst_length = tmp;
|
||||
tmp = strtoul(value, NULL, 10);
|
||||
if (tmp <= 0)
|
||||
log_errx(1, "received invalid MaxBurstLength");
|
||||
if (tmp > MAX_BURST_LENGTH) {
|
||||
log_debugx("capping MaxBurstLength "
|
||||
"from %d to %d", tmp, MAX_BURST_LENGTH);
|
||||
tmp = MAX_BURST_LENGTH;
|
||||
}
|
||||
conn->conn_max_burst_length = tmp;
|
||||
} else if (strcmp(name, "FirstBurstLength") == 0) {
|
||||
tmp = strtoul(value, NULL, 10);
|
||||
if (tmp <= 0)
|
||||
log_errx(1, "received invalid FirstBurstLength");
|
||||
if (tmp > FIRST_BURST_LENGTH) {
|
||||
log_debugx("capping FirstBurstLength "
|
||||
"from %d to %d", tmp, FIRST_BURST_LENGTH);
|
||||
tmp = FIRST_BURST_LENGTH;
|
||||
}
|
||||
conn->conn_first_burst_length = tmp;
|
||||
} else if (strcmp(name, "DefaultTime2Wait") == 0) {
|
||||
/* Ignore */
|
||||
@ -489,10 +497,8 @@ login_negotiate(struct connection *conn)
|
||||
keys_add(request_keys, "DataDigest", "None");
|
||||
|
||||
keys_add(request_keys, "ImmediateData", "Yes");
|
||||
keys_add_int(request_keys, "MaxBurstLength",
|
||||
2 * conn->conn_limits.isl_max_data_segment_length);
|
||||
keys_add_int(request_keys, "FirstBurstLength",
|
||||
conn->conn_limits.isl_max_data_segment_length);
|
||||
keys_add_int(request_keys, "MaxBurstLength", MAX_BURST_LENGTH);
|
||||
keys_add_int(request_keys, "FirstBurstLength", FIRST_BURST_LENGTH);
|
||||
keys_add(request_keys, "InitialR2T", "Yes");
|
||||
keys_add(request_keys, "MaxOutstandingR2T", "1");
|
||||
if (conn->conn_conf.isc_iser == 1) {
|
||||
|
Loading…
Reference in New Issue
Block a user