From owner-freebsd-net@FreeBSD.ORG Mon Jun 13 16:47:20 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 34D7D1065670; Mon, 13 Jun 2011 16:47:20 +0000 (UTC) (envelope-from kip.macy@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id C6F438FC08; Mon, 13 Jun 2011 16:47:19 +0000 (UTC) Received: by vws18 with SMTP id 18so5451291vws.13 for ; Mon, 13 Jun 2011 09:47:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=NEXLBnGo+sRZtC9zk8UfILwgu79ev2Kb7mSySpwvKdc=; b=rbh/JtxMghTpvjYvnDouG5HbJ+89zMEOCVq2rd3NZLBNeIj+od64x9J9zcevJmfOwH MsjhPwrRJ1dz6ADZKrkmFfwiBfujfytd7e9LEM4xii4TBxlGTh3lrWMaRQgtkWEIT7eh qFoe9EcbeTkUICak2LTWVGNObFGfKbaStUclI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=gwrxxNfpKTS9sn/jO3ByriTOyJA9CwRjr396t4Ka8tu/ijsbCDmlh8qKS6PoHD3tHC j9t3bbpn1nTsCCvzvVYmA46ISHypgPxBES6Se3NvRRnbjnUi9tA1igbzDzWPhWnm5pJm FA2t6big2eE1eL7yZ/aPuLHqnOXbQBIZ+yXu8= MIME-Version: 1.0 Received: by 10.52.179.202 with SMTP id di10mr7920343vdc.225.1307983638415; Mon, 13 Jun 2011 09:47:18 -0700 (PDT) Received: by 10.52.181.225 with HTTP; Mon, 13 Jun 2011 09:47:18 -0700 (PDT) In-Reply-To: <86mxhleq1q.fsf@kopusha.home.net> References: <86mxhleq1q.fsf@kopusha.home.net> Date: Mon, 13 Jun 2011 18:47:18 +0200 Message-ID: From: Kip Macy To: Mikolaj Golub Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-net@freebsd.org, andre@freebsd.org Subject: Re: Automatic receive buffer sizing works only for connections in ESTABLISHED state 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: Mon, 13 Jun 2011 16:47:20 -0000 On Mon, Jun 13, 2011 at 4:58 PM, Mikolaj Golub wrote: > Hi, > > Automatic receive buffer sizing works only for connections in ESTABLISHED > state. In tcp_input() auto resizing code is under "if (tp->t_state == > TCPS_ESTABLISHED && ...)" branch. > > This is unfortunate for HAST, which uses one direction connections and > shutdown another direction, so the receiving socket is in FIN_WAIT_2 and auto > resizing does not work here. > > Is there some reason why it should be only for connections in ESTABLISHED > state or this should be considered as a bug? Andre wrote the socket buffer auto-sizing, so I am CC'ing him. -Kip