From 776a8d3f8c1dd870dbaf93f2d7c8348a229f2d78 Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Thu, 27 Jun 2013 10:00:09 +0200 Subject: [PATCH] lwip: set to max snd window which is known to work The window scale option (http://tools.ietf.org/html/rfc1323) patch of lwIP definitely works solely for the receive window, not for the send window. Setting the send window size to the maximum of an 16bit value, 65535, or multiple of it (x * 65536 - 1) results in the same performance. Everything else decrease performance. We will have to check this window scale patch before using higher values. --- libports/include/lwip/lwipopts.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/libports/include/lwip/lwipopts.h b/libports/include/lwip/lwipopts.h index 29a1784a3d..f776ec5f31 100644 --- a/libports/include/lwip/lwipopts.h +++ b/libports/include/lwip/lwipopts.h @@ -66,7 +66,16 @@ #define TCP_MSS 1460 #define TCP_WND (96 * TCP_MSS) -#define TCP_SND_BUF (32 * TCP_MSS) + +/* + * The window scale option (http://tools.ietf.org/html/rfc1323) patch of lwIP + * definitely works solely for the receive window, not for the send window. + * Setting the send window size to the maximum of an 16bit value, 65535, + * or multiple of it (x * 65536 - 1) results in the same performance. + * Everything else decrease performance. + */ +#define TCP_SND_BUF (65535) + #define TCP_SND_QUEUELEN ((32 * (TCP_SND_BUF) + (TCP_MSS - 1))/(TCP_MSS)) #define RECV_BUFSIZE_DEFAULT 128 * 1024