From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16086 invoked by alias); 9 Jul 2002 20:40:12 -0000 Mailing-List: contact ecos-discuss-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@sources.redhat.com Received: (qmail 16065 invoked from network); 9 Jul 2002 20:40:11 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 9 Jul 2002 20:40:11 -0000 Received: from deneb.localdomain (chunnel.redhat.com [172.16.48.220] (may be forged)) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id g69KTd903579; Tue, 9 Jul 2002 16:29:39 -0400 Received: (from msalter@localhost) by deneb.localdomain (8.11.6/8.11.6) id g69Kc9d21236; Tue, 9 Jul 2002 16:38:09 -0400 Date: Tue, 09 Jul 2002 13:40:00 -0000 Message-Id: <200207092038.g69Kc9d21236@deneb.localdomain> From: Mark Salter To: grante@visi.com CC: gary@chez-thomas.org, ecos-discuss@sources.redhat.com In-reply-to: <20020709111644.A856@visi.com> (message from Grant Edwards on Tue, 9 Jul 2002 11:16:45 -0500) References: <20020708181640.A31952@visi.com> <1026170335.15020.1426.camel@hermes.chez-thomas.org> <20020708183316.A31984@visi.com> <200207090136.g691aOf18638@deneb.localdomain> <20020709111644.A856@visi.com> Subject: Re: [ECOS] TCP stack not delaying/piggybacking ACKs? X-SW-Source: 2002-07/txt/msg00110.txt.bz2 >>>>> 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