diff options
author | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2016-06-09 07:19:02 +0000 |
---|---|---|
committer | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2016-06-09 07:19:02 +0000 |
commit | 2317fdfa8c001ea418817acb140707be547feaf2 (patch) | |
tree | 735cf3a930c34bd839121b1a6145fba23a6a83b5 /usr.sbin/ctld | |
parent | 16e3675494a9e93e2866ac80d5e4fbe46de45792 (diff) | |
download | src-test2-2317fdfa8c001ea418817acb140707be547feaf2.tar.gz src-test2-2317fdfa8c001ea418817acb140707be547feaf2.zip |
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
Notes
Notes:
svn path=/head/; revision=301720
Diffstat (limited to 'usr.sbin/ctld')
-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 705da33a6dc8..20864a71f570 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 c450b5c107ee..a7a4f7d8f872 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); |