lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] TCP_SND_QUEUELEN vs TCP_SNDQUEUELEN_OVERFLOW


From: address@hidden
Subject: Re: [lwip-users] TCP_SND_QUEUELEN vs TCP_SNDQUEUELEN_OVERFLOW
Date: Wed, 26 Mar 2008 08:03:56 +0100
User-agent: Thunderbird 2.0.0.12 (Macintosh/20080213)

Hmm, that bit of code was rather a quick fix for the problem that queuelen was an u8_t and was overflowing very fast and the maximum increasement for one call of tcp_enqueue is 3. But that could be done better, I agree. Especially care must be taken for misconfiguration (TCP_SND_QUEUELEN < 3). In fact, this can be take care of completely by checking the configuration.I'll take a look at it for 1.3.1. Thanks for reporting.

Simon


Art R. schrieb:
Greetings,

I was reading the current 1.3.0 release code and ran across something I find
puzzling.

tcp_out.c line 164-6: queuelen = pcb->snd_queuelen;
  /* check for configured max queuelen and possible overflow */
  if ((queuelen >= TCP_SND_QUEUELEN) || (queuelen >
TCP_SNDQUEUELEN_OVERFLOW)) {

tcp.h
lines 333-334:
#define TCP_SNDQUEUELEN_OVERFLOW (0xffff-3)
  u16_t snd_queuelen; /* Available buffer space for sending (in tcp_segs).
*/

The default value for TCP_SND_QUEUELEN in opt.h is 8, if I read it
correctly. In our tests, it typically has values in the range of 20 or so.

The setting for TCP_SNDQUEUELEN_OVERFLOW is 65532  (FFFF-3).
It does not seem sensible to be comparing pcb->snd_queuelen to both
TCP_SND_QUEUELEN and TCP_SNDQUEUELEN_OVERFLOW.
Is this intended? A bug? What is the intended purpose for
TCP_SNDQUEUELEN_OVERFLOW?

HTH...

Art R.










reply via email to

[Prev in Thread] Current Thread [Next in Thread]