From 01839b9c1498480a78305ae4d322633a68bd1440 Mon Sep 17 00:00:00 2001 From: Simon Goldschmidt Date: Tue, 18 Oct 2011 20:22:09 +0200 Subject: [PATCH] fixed default values of TCP_SNDLOWAT and TCP_SNDQUEUELOWAT for small windows (bug #34176 select after non-blocking send times out) --- CHANGELOG | 4 ++++ src/include/lwip/opt.h | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index a93d34c3..7848ee68 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -69,6 +69,10 @@ HISTORY ++ Bugfixes: + 2011-10-18: Simon Goldschmidt + * opt.h: fixed default values of TCP_SNDLOWAT and TCP_SNDQUEUELOWAT for small + windows (bug #34176 select after non-blocking send times out) + 2011-10-18: Simon Goldschmidt * tcp_impl.h, tcp_out.c: fixed bug #34587: TCP_BUILD_MSS_OPTION doesn't consider netif->mtu, causes slow network diff --git a/src/include/lwip/opt.h b/src/include/lwip/opt.h index 2565022c..9b03e75a 100644 --- a/src/include/lwip/opt.h +++ b/src/include/lwip/opt.h @@ -989,7 +989,7 @@ * TCP snd_buf for select to return writable (combined with TCP_SNDQUEUELOWAT). */ #ifndef TCP_SNDLOWAT -#define TCP_SNDLOWAT ((TCP_SND_BUF)/2) +#define TCP_SNDLOWAT LWIP_MAX(((TCP_SND_BUF)/2), (2 * TCP_MSS) + 1) #endif /** @@ -998,7 +998,7 @@ * this number, select returns writable (combined with TCP_SNDLOWAT). */ #ifndef TCP_SNDQUEUELOWAT -#define TCP_SNDQUEUELOWAT ((TCP_SND_QUEUELEN)/2) +#define TCP_SNDQUEUELOWAT LWIP_MAX(((TCP_SND_QUEUELEN)/2), 5) #endif /**