Browse Source

Fixed bug #31535: TCP_SND_QUEUELEN must be at least 2 or else no-copy TCP writes will never succeed.

STABLE-2_1_x
goldsimon 16 years ago
parent
commit
e3817cd549
  1. 6
      CHANGELOG
  2. 3
      src/core/init.c
  3. 2
      src/include/lwip/opt.h

6
CHANGELOG

@ -229,10 +229,14 @@ HISTORY
++ Bugfixes:
2010-11-20: Simon Goldschmidt
* dns.c: Fixed bug #31535: TCP_SND_QUEUELEN must be at least 2 or else
no-copy TCP writes will never succeed.
2010-11-20: Simon Goldschmidt
* dns.c: Fixed bug #31701: Error return value from dns_gethostbyname() does
not match documentation: return ERR_ARG instead of ERR_VAL if not
initialized or wrong argument.
initialized or wrong argument.
2010-10-20: Simon Goldschmidt
* sockets.h: Fixed bug #31385: sizeof(struct sockaddr) is 30 but should be 16

3
src/core/init.c

@ -105,6 +105,9 @@
#if (LWIP_TCP && (TCP_SND_QUEUELEN > 0xffff))
#error "If you want to use TCP, TCP_SND_QUEUELEN must fit in an u16_t, so, you have to reduce it in your lwipopts.h"
#endif
#if (LWIP_TCP && (TCP_SND_QUEUELEN < 2))
#error "TCP_SND_QUEUELEN must be at least 2 for no-copy TCP writes to work"
#endif
#if (LWIP_TCP && ((TCP_MAXRTX > 12) || (TCP_SYNMAXRTX > 12)))
#error "If you want to use TCP, TCP_MAXRTX and TCP_SYNMAXRTX must less or equal to 12 (due to tcp_backoff table), so, you have to reduce them in your lwipopts.h"
#endif

2
src/include/lwip/opt.h

@ -954,7 +954,7 @@
* as much as (2 * TCP_SND_BUF/TCP_MSS) for things to work.
*/
#ifndef TCP_SND_QUEUELEN
#define TCP_SND_QUEUELEN (4 * (TCP_SND_BUF)/(TCP_MSS))
#define TCP_SND_QUEUELEN ((4 * (TCP_SND_BUF) + (TCP_MSS - 1))/(TCP_MSS))
#endif
/**

Loading…
Cancel
Save