diff options
author | trasz <trasz@FreeBSD.org> | 2016-06-09 07:19:02 +0000 |
---|---|---|
committer | trasz <trasz@FreeBSD.org> | 2016-06-09 07:19:02 +0000 |
commit | 38c5e8c6804867f45eaab20259568573851d4b9e (patch) | |
tree | 735cf3a930c34bd839121b1a6145fba23a6a83b5 | |
parent | d477060046fe76cede4a87ae4fc119f40b578a7c (diff) | |
download | FreeBSD-src-38c5e8c6804867f45eaab20259568573851d4b9e.zip FreeBSD-src-38c5e8c6804867f45eaab20259568573851d4b9e.tar.gz |
Don't cap FirstBurstLength to maximum MaxRecvDataSegmentLength claimed
by the offload driver; there is no reason to do so, and it actually
harms performance.
MFC after: 1 month
-rw-r--r-- | usr.sbin/ctld/ctld.h | 1 | ||||
-rw-r--r-- | usr.sbin/ctld/login.c | 11 |
2 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/ctld/ctld.h b/usr.sbin/ctld/ctld.h index 705da33..20864a7 100644 --- a/usr.sbin/ctld/ctld.h +++ b/usr.sbin/ctld/ctld.h @@ -49,6 +49,7 @@ #define MAX_NAME_LEN 223 #define MAX_DATA_SEGMENT_LENGTH (128 * 1024) #define MAX_BURST_LENGTH 16776192 +#define FIRST_BURST_LENGTH (128 * 1024) #define SOCKBUF_SIZE 1048576 struct auth { diff --git a/usr.sbin/ctld/login.c b/usr.sbin/ctld/login.c index c450b5c..a7a4f7d 100644 --- a/usr.sbin/ctld/login.c +++ b/usr.sbin/ctld/login.c @@ -574,13 +574,12 @@ login_negotiate_key(struct pdu *request, const char *name, tmp = strtoul(value, NULL, 10); if (tmp <= 0) { login_send_error(request, 0x02, 0x00); - log_errx(1, "received invalid " - "FirstBurstLength"); + log_errx(1, "received invalid FirstBurstLength"); } - if (tmp > conn->conn_data_segment_limit) { - log_debugx("capping FirstBurstLength from %zd to %zd", - tmp, conn->conn_data_segment_limit); - tmp = conn->conn_data_segment_limit; + if (tmp > FIRST_BURST_LENGTH) { + log_debugx("capping FirstBurstLength from %zd to %d", + tmp, FIRST_BURST_LENGTH); + tmp = FIRST_BURST_LENGTH; } conn->conn_first_burst_length = tmp; keys_add_int(response_keys, name, tmp); |