lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] tcp_output does not flush


From: Luke Trowbridge
Subject: Re: [lwip-users] tcp_output does not flush
Date: Tue, 4 May 2010 11:05:59 -0400

Thank you so much for the reply! Yet, I suppose I am still somewhat convinced that I have setup something incorrectly. The inefficiency of such an algorithm (Nagle's) seems mind-boggling. Take the following example, assuming TCP_MSS = 500:

1. Client requests data from host (expecting 700 bytes)
2. Host enqueues 700 bytes, but responds with 500 bytes (because of Nagle's
algorithm?)
3. Host waits for acknowledgment from client
4. Client sends delayed acknowledgment (~200ms later) from socket layer
5. Host sends remaining 200 bytes

I have attached a Wireshark capture of this.
Is it really Nagle's algorithm causing the delay seen at step 4?
If so, it seems that such a delay will occur at the end of every transfer whose length is not an even multiple of TCP_MSS.

Luke


--------------------------------------------------
From: "Kieran Mansley" <address@hidden>
Sent: Tuesday, May 04, 2010 9:56 AM
To: "Mailing list for lwIP users" <address@hidden>
Subject: Re: [lwip-users] tcp_output does not flush

On Tue, 2010-05-04 at 09:45 -0400, Luke Trowbridge wrote:
I suspect I am misunderstanding how I can force a flush of all
enqueued data

With TCP fundamentally you can't.  You can disable Nagle's algorithm if
you wish (by setting the NODELAY flag on the pcb->flags) but it's a good
idea to read up on this before doing so so you understand the trade-offs
involved.

Kieran



_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users





reply via email to

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