From owner-freebsd-bugs@FreeBSD.ORG Wed Jan 9 06:10:01 2013 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id EB2C7D2A for ; Wed, 9 Jan 2013 06:10:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id B94E232B for ; Wed, 9 Jan 2013 06:10:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r096A1nq063222 for ; Wed, 9 Jan 2013 06:10:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r096A1pF063221; Wed, 9 Jan 2013 06:10:01 GMT (envelope-from gnats) Resent-Date: Wed, 9 Jan 2013 06:10:01 GMT Resent-Message-Id: <201301090610.r096A1pF063221@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Zhouyi Zhou Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E3DE3CE2 for ; Wed, 9 Jan 2013 06:05:10 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id C0597305 for ; Wed, 9 Jan 2013 06:05:10 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.5/8.14.5) with ESMTP id r096592a030526 for ; Wed, 9 Jan 2013 06:05:09 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.5/8.14.5/Submit) id r09659J8030525; Wed, 9 Jan 2013 06:05:09 GMT (envelope-from nobody) Message-Id: <201301090605.r09659J8030525@red.freebsd.org> Date: Wed, 9 Jan 2013 06:05:09 GMT From: Zhouyi Zhou To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: kern/175153: will there miss a FIN when do TSO? X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2013 06:10:02 -0000 >Number: 175153 >Category: kern >Synopsis: will there miss a FIN when do TSO? >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Jan 09 06:10:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Zhouyi Zhou >Release: FreeBSD current >Organization: ICT CAS >Environment: FreeBSD host48 8.2-RELEASE FreeBSD 8.2-RELEASE root@host48:/usr/src/sys.orig/amd64/compile/GENERIC >Description: Hi, I guess there will miss a FIN when do TSO in function tcp_output, following is the code piece from CVS: /* * Adjust data length if insertion of options will * bump the packet length beyond the t_maxopd length. * Clear the FIN bit because we cut off the tail of * the segment. */ if (len + optlen + ipoptlen > tp->t_maxopd) { flags &= ~TH_FIN; if (tso) { .... if (tp->t_flags & TF_NEEDFIN) sendalot = 1; /////////////////////////////////////////////////////// My question is when the FreeBSD close the established tcp connection actively, the TF_NEEDFIN will not be set (am I got wrong?), and when previous computation has not set sendalot to 1, the the tsoed packet will be the last packet to send out in this round, so a FIN is missed. Thanks for your time >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: