From owner-freebsd-net@FreeBSD.ORG Fri Jun 15 13:10:28 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (unknown [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D9E261065674; Fri, 15 Jun 2012 13:10:28 +0000 (UTC) (envelope-from darernr@freebsd.org) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by mx1.freebsd.org (Postfix) with ESMTP id 9FFA38FC1F; Fri, 15 Jun 2012 13:10:28 +0000 (UTC) Received: from compute2.internal (compute2.nyi.mail.srv.osa [10.202.2.42]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 873EA21211; Fri, 15 Jun 2012 09:10:22 -0400 (EDT) Received: from frontend1.nyi.mail.srv.osa ([10.202.2.160]) by compute2.internal (MEProxy); Fri, 15 Jun 2012 09:10:22 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:date:from:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; s=smtpout; bh=RY7b7d/cRV0lGMBVY5ycbR 0tRs8=; b=Mo90MmzHJKEf3UWeQWD95o4VVnyb5gL6ADBNJkt/jlP0+jY510PTwq 7xWmtU0GDgqcSs+h7AC5doxKuiaNeuLU3FlFDJuQ6OAtg8POhDXVKnd/2a9daYbT jusmZNluoaD0MULUU1dwUwh0z0wbeGTEdX5AviCQqYHFhU9EtqjnQ= X-Sasl-enc: kqxjK8/ryWOOkY1bFIzT7UTWNLHCwrbYX2mj8y/3a6XH 1339765822 Received: from [192.168.1.23] (unknown [202.45.110.141]) by mail.messagingengine.com (Postfix) with ESMTPA id 1EE698E01C3; Fri, 15 Jun 2012 09:10:20 -0400 (EDT) Message-ID: <4FDB4276.9020402@freebsd.org> Date: Sat, 16 Jun 2012 00:11:02 +1000 From: Darren Reed User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: Andre Oppermann References: <4F75C1A3.4030401@freebsd.org> <4F75D9ED.7080707@freebsd.org> <4F780373.6030107@freebsd.org> <4F7AFEEF.60708@freebsd.org> <4F7B1981.1050009@freebsd.org> <4F7B80CE.90805@freebsd.org> In-Reply-To: <4F7B80CE.90805@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: darrenr@freebsd.org, freebsd-net@freebsd.org Subject: Re: FreeBSD TCP ignores zero window size 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: Fri, 15 Jun 2012 13:10:29 -0000 Andre Oppermann wrote: > On 03.04.2012 17:38, Darren Reed wrote: >> On 3/04/2012 11:45 PM, Andre Oppermann wrote: >>> On 01.04.2012 09:27, Darren Reed wrote: >>>> The problem here is that it only tracks the window size as >>>> it grows, not as it shrinks. Thus the remote end setting its >>>> window size to 0 is ignored. >>> >>> My patch is wrong as the acked count is already integrated >>> by the time we reach this spot. I'm working on a better >>> implementation. >> >> Ok, I'll look forward to seeing and testing it. > > Please test this patch: > http://people.freebsd.org/~andre/tcp_input.c-windowupdate-2012040.diff > > I just completed a number of tests and inspected the debug output as > well as the corresponding tcpdumps. In all could simulate it behaved > correctly now with regard to tracking the window and updates. Today I ran a similar workload to what I had done previously and it seemed to progress without incident. I had tcpdump running to capture the entire session and upon review of that, there are indeed instances where the window from the remote end is advertised as 0. For now at least, that patch seems to do the magic trick. Cheers, Darren