From owner-freebsd-net Thu May 10 15: 1: 6 2001 Delivered-To: freebsd-net@freebsd.org Received: from mrout1.yahoo.com (mrout1.yahoo.com [216.145.54.171]) by hub.freebsd.org (Postfix) with ESMTP id A262F37B422 for ; Thu, 10 May 2001 15:01:02 -0700 (PDT) (envelope-from jayanth@yahoo-inc.com) Received: from milk.yahoo.com (milk.yahoo.com [206.251.16.37]) by mrout1.yahoo.com (8.11.1/8.11.1/y.out) with ESMTP id f4AM0mL83514; Thu, 10 May 2001 15:00:48 -0700 (PDT) Received: (from root@localhost) by milk.yahoo.com (8.11.0/8.11.0) id f4AM0la49567; Thu, 10 May 2001 15:00:47 -0700 (PDT) (envelope-from jayanth) Date: Thu, 10 May 2001 15:00:47 -0700 From: jayanth To: net@FreeBSD.ORG Cc: jlemon@flugsvamp.com Subject: t/tcp behaviour has changed in -current and -stable Message-ID: <20010510150047.F45897@yahoo-inc.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org I would like to back out the DELAY_ACK macro changes for now. The ttcp code behaviour has changed because of the addition of the DELAY_ACK macro. The macro is forcing the ttcp code to send an immediate SYN, ACK for an initial ttcp segment which has the SYN/FIN/PSH flag set. Instead the SYN,ACK should be delayed such that next segment should be SYN/FIN/PSH from the server side. Change the macro to DELAY_ACK(tp) \ (tcp_delack_enabled) instead of #define DELAY_ACK(tp) \ (tcp_delack_enabled && !callout_pending(tp->tt_delack)) All version before r1.124 seem to work fine http://www.FreeBSD.org/cgi/cvsweb.cgi/src/sys/netinet/tcp_input.c.diff?r1=1.123 &r2=1.124&f=h > > /* TTCP Code in tcp_input.c*/ > if ((to.to_flag & TOF_CC) != 0) { > if (((tp->t_flags & TF_NOPUSH) != 0) && > taop->tao_cc != 0 && CC_GT(to.to_cc, taop->tao_cc)) { > taop->tao_cc = to.to_cc; > tp->t_starttime = ticks; > tp->t_state = TCPS_ESTABLISHED; > /* > * If there is a FIN, or if there is data and the > * connection is local, then delay SYN,ACK(SYN) in > * the hope of piggy-backing it on a response > * segment. Otherwise must send ACK now in case > * the other side is slow starting. > */ > if (DELAY_ACK(tp) && ((thflags & TH_FIN) || > (tlen != 0 && > in_localaddr(inp->inp_faddr)))) { > callout_reset(tp->tt_delack, tcp_delacktime, > tcp_timer_delack, tp); > tp->t_flags |= TF_NEEDSYN; > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > At this point NEEDSYN is set and so is the delack timer.... > > } else > tp->t_flags |= (TF_ACKNOW | TF_NEEDSYN); > > .................................................... > > if (thflags & TH_FIN) { > if (TCPS_HAVERCVDFIN(tp->t_state) == 0) { > socantrcvmore(so); > /* > * If connection is half-synchronized > * (ie NEEDSYN flag on) then delay ACK, > * so it may be piggybacked when SYN is sent. > * Otherwise, since we received a FIN then no > * more input can be expected, send ACK now. > */ > if (DELAY_ACK(tp) && (tp->t_flags & TF_NEEDSYN)) > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > At this point the DELAY_ACK macro returns false because there is a > callout_pending(). Hence the TF_ACKNOW will be set. > ^^^^^^^^^^^^^ > > callout_reset(tp->tt_delack, tcp_delacktime, > tcp_timer_delack, tp); > else > tp->t_flags |= TF_ACKNOW; > jayanth To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message