From owner-freebsd-net Thu Jan 25 8:19:24 2001 Delivered-To: freebsd-net@freebsd.org Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (Postfix) with ESMTP id 510FD37B6A8 for ; Thu, 25 Jan 2001 08:19:05 -0800 (PST) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.9.3/8.9.3) id LAA83006; Thu, 25 Jan 2001 11:17:51 -0500 (EST) (envelope-from wollman) Date: Thu, 25 Jan 2001 11:17:51 -0500 (EST) From: Garrett Wollman Message-Id: <200101251617.LAA83006@khavrinen.lcs.mit.edu> To: jayanth Cc: net@FreeBSD.ORG Subject: Re: I have delayed ACK problems In-Reply-To: <20010125002509.A77051@yahoo-inc.com> References: <77394.980367750@winston.osd.bsdi.com> <20010125002509.A77051@yahoo-inc.com> Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org < said: > could you test this patch and compare the results. > By generating an ACK for every segment with the TH_PSH flag set > I found a significant increase in throughput. I don't think this is right. I think what we want to do is: if (callout_pending(tp->tt_delack)) { callout_stop(tp->tt_delack); tp->t_flags |= TF_ACKNOW; } else callout_reset(...) This has the effect of ACKing every other packet. This should probably be encapsulated in a macro: #define MAYBE_DELAYED_ACK(tp) \ do { \ if (tcp_delack_enabled) { \ if (callout_pending(tp->tt_delack)) { \ callout_stop(tp->tt_delack); \ tp->t_flags |= TF_ACKNOW; \ } else \ callout_reset(tp->tt_delack, \ tcp_delacktime, \ tcp_timer_delack, tp); \ } else \ tp->t_flags |= TF_ACKNOW; \ while (0) (It may be possible to eliminate the callout_stop() call and one of the `if' statements.) -GAWollman To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message