This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: TCP stack not delaying/piggybacking ACKs?


>>>>> Grant Edwards writes:

> On Mon, Jul 08, 2002 at 09:36:24PM -0400, Mark Salter wrote:
>> >>>>> Grant Edwards writes:
>> 
>> > I've been browsing around the sources and haven't quite figured
>> > out how it's supposed to work.  I do have the TCP_NODELAY flag
>> > set on the socket, but I don't know if that has anything to do
>> > with it.  That is easy enough to test.
>> 
>> Try turning it off. TCP_NODELAY tells the stack to send ACKs without
>> waiting a bit for a possible packet to piggyback on.

> Turning off TCP_NODELAY doesn't make any difference.  ACKs are
> still sent out immediately.

> I've read through the TCP stack sources and AFAICT, the only
> place where NODELAY is checked is when tcp_output is trying to
> figure out how much data to send.  [This agrees with my reading
> of Stevens.]

> Why ACKs aren't being delayed is apparently a different issue...

Maybe there's something else at play with eCos, but TCP_NODELAY
certainly does control immediate sending of ACKs (and other packets)
on Solaris, Linux, and Windows. It turns off the Nagle algorithm.
In general, the Nagle algorithm causes small packets (including
ACK-only packets) to be held back in the hopes that they can be
coalesced with following packets. The delay is usually in the
neighborhood of a few 10s of milliseconds although I've seen WNT
wait ~200ms to send an ACK.

--Mark


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]