lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] TCP Send Queue


From: Zschocke, Florian
Subject: Re: [lwip-users] TCP Send Queue
Date: Tue, 18 Mar 2003 07:29:16 +0100

Kieran Mansley wrote on Montag, 17. März 2003 11:57:

> It would probably make most sense to limit the amount of data
> on the queue rather than the number of pbufs.  The queue is
> there to deal with the difference in size between application
> writes() and what is efficient for the TCP stack to send.  

I'm not entirely sure I'm following you there. The first limiting factor for
sending data is the send buffer. If the application tries to write more data
than free space is available in the send buffer, the write will fail. (More
precisely, tcp_write() would fail.) Since all data to be sent is queued the
total amount of data on the queue is already limited by the buffer size.

The next limit is the queue length. Due to the limited queue length a write
may fail even if there is space left in the send buffer. I thought that
maybe the queue length limit was necessary since there can only be a limited
number of segments (due to memeory limitations). The queue length is define
as the send buffer size divided by the MSS (scaled by a factor X). That
would mean that the queue length is X times the minimum number of segments
needed to send the data from the send buffer. 

But since the queue length is counted in pbufs and not segments that can't
be it either since there may well be segments left when the queue is full.

So what am I missing here? Why impose a limit on the queue length at all
when the send buffer space is already limited?

Florian.




reply via email to

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