From owner-freebsd-net@FreeBSD.ORG Thu Jul 19 08:48:21 2007 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 862DF16A40A for ; Thu, 19 Jul 2007 08:48:21 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from pobox.codelabs.ru (pobox.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id 3953613C4DA for ; Thu, 19 Jul 2007 08:48:21 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) DomainKey-Signature: a=rsa-sha1; q=dns; c=simple; s=one; d=codelabs.ru; h=Received:Date:From:To:Cc:Message-ID:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:Sender:X-Spam-Status:Subject; b=UPu7RNH8ANeoqgEKOz5jNjPTL+DweN8OMG1EvxI6Gmdr4yl8C5guLVYlBoNuhFoKG0ECQP13bixG1bFC2QRS4AOa/WD2mg3TD3elmGBNFdq71DUfdXzgBtE7cRmc9Or3YpKAmXIDaTEywq1aFygUGcwKefH747HunmSQ5BoJvR8=; Received: from void.codelabs.ru (void.codelabs.ru [144.206.177.25]) by pobox.codelabs.ru with esmtpsa (TLSv1:AES256-SHA:256) id 1IBRgH-00008Q-Ay; Thu, 19 Jul 2007 12:48:17 +0400 Date: Thu, 19 Jul 2007 12:48:12 +0400 From: Eygene Ryabinkin To: Julian Elischer Message-ID: <20070719084812.GS4053@void.codelabs.ru> References: <469D4C9D.7090302@ironport.com> <469D4FB6.9040609@elischer.org> <3DBBD4E3-ABEA-451A-8E6A-02E9CBAD6A37@mac.com> <20070718055228.GA4053@void.codelabs.ru> <469E660F.8000109@ironport.com> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <469E660F.8000109@ironport.com> Sender: rea-fbsd@codelabs.ru X-Spam-Status: No, score=-3.1 required=4.0 tests=ALL_TRUSTED,AWL,BAYES_00 Cc: FreeBSD Net , Julian Elischer Subject: Re: Wierd networking. X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2007 08:48:21 -0000 Julian, good day. Wed, Jul 18, 2007 at 12:12:15PM -0700, Julian Elischer wrote: > >Seems like it is the effect of the SS_NOFDREF check in the > >netinet/tcp_input.c, at least it is present in the rev. 1.281.2.5. > > > >See the post > > http://lists.freebsd.org/pipermail/freebsd-current/2007-July/074837.html > > > > That makes perfect sense.. > thankyou. You're welcome ;))) > I will check this avenue of inquiry. possibly we should do a shutdown() > and let the file descriptor exist for a few seconds. Yes, it is a way to do it. And we may even calculate the amount of time: as I understand, the time estimate is roughly equal to the (TCP window)/(connection bandwidth). The BW is not determined well, but we can try to extract this from the time interval between two successive packets that came from the remote side and the size of these packets. >From the other hand, we may not want to have the per-connection estimate and set it to some small amount of MSLs. Another way to deal with the problem is not to send the FIN's after the one provoked by the closed descriptor. As I understand, the SS_NOFDREF check is a optimization to avoid processing unneeded data in the TCP stack. So we may just silently blackhole the successive packets, at least some of them. -- Eygene