From owner-freebsd-current@FreeBSD.ORG Thu Jan 11 10:15:59 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B846616A407; Thu, 11 Jan 2007 10:15:59 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from sj-iport-6.cisco.com (sj-iport-6.cisco.com [171.71.176.117]) by mx1.freebsd.org (Postfix) with ESMTP id 8F6F013C45A; Thu, 11 Jan 2007 10:15:59 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from sj-dkim-2.cisco.com ([171.71.179.186]) by sj-iport-6.cisco.com with ESMTP; 11 Jan 2007 02:15:59 -0800 X-IronPort-AV: i="4.13,171,1167638400"; d="scan'208"; a="100413410:sNHT43849107" Received: from sj-core-1.cisco.com (sj-core-1.cisco.com [171.71.177.237]) by sj-dkim-2.cisco.com (8.12.11/8.12.11) with ESMTP id l0BAFxsT011703; Thu, 11 Jan 2007 02:15:59 -0800 Received: from xbh-sjc-221.amer.cisco.com (xbh-sjc-221.cisco.com [128.107.191.63]) by sj-core-1.cisco.com (8.12.10/8.12.6) with ESMTP id l0BAFsDk002616; Thu, 11 Jan 2007 02:15:59 -0800 (PST) Received: from xfe-sjc-211.amer.cisco.com ([171.70.151.174]) by xbh-sjc-221.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 11 Jan 2007 02:15:54 -0800 Received: from [127.0.0.1] ([171.68.225.134]) by xfe-sjc-211.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 11 Jan 2007 02:15:54 -0800 Message-ID: <45A60E2A.6000407@cisco.com> Date: Thu, 11 Jan 2007 05:15:06 -0500 From: Randall Stewart User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.8) Gecko/20061029 FreeBSD/i386 SeaMonkey/1.0.6 MIME-Version: 1.0 To: John Baldwin References: <20070107171034.GA13836@crodrigues.org> <200701101431.57695.jhb@freebsd.org> <45A54682.9040503@cisco.com> <200701101515.30385.jhb@freebsd.org> In-Reply-To: <200701101515.30385.jhb@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 11 Jan 2007 10:15:54.0479 (UTC) FILETIME=[7A677FF0:01C73569] DKIM-Signature: v=0.5; a=rsa-sha256; q=dns/txt; l=1075; t=1168510559; x=1169374559; c=relaxed/simple; s=sjdkim2002; h=Content-Type:From:Subject:Content-Transfer-Encoding:MIME-Version; d=cisco.com; i=rrs@cisco.com; z=From:=20Randall=20Stewart=20 |Subject:=20Re=3A=20Witness=20warning=20with=20SCTP |Sender:=20; bh=1Fph6leqm84X+JL9VvxwmVWqfpGDaeM46O93EOCZp88=; b=DxO8UFGbHfNvzqPDuJzgVP9MicMHhVm7FukU/tdMvT7+4sVjD/PlESLgQbilmr3plCunusj4 Wec1neQnRku0MRgGH4Jnp5Fte1bCP6p70wA8nyTjzk+wdNKHE3r2OTOv; Authentication-Results: sj-dkim-2; header.From=rrs@cisco.com; dkim=pass (sig from cisco.com/sjdkim2002 verified; ); Cc: Craig Rodrigues , freebsd-current@freebsd.org, Robert Watson Subject: Re: Witness warning with SCTP X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jan 2007 10:15:59 -0000 John Baldwin wrote: > > Ah, you must have missed the part where it does: > > if (someone else created the pcb) { > free(pcb I just created); > use the other pcb; > } > > :-P That is, explicitly handling the race. However: Yep.. sorry about that.. > >> I am NOT willing to sleep. the normal allocation of the PCB is done >> with a WAIT type option.. I had not realized that hashinit() >> did an allocation and could sleep.. thats the issue. > > In that case a hashinit_flags() is the way to go I guess. What happens if > the hashinit fails, connection dropped? > Yep.. its the same thing that happens if the pcb create fails (we allocate with NOWAIT as well). And in actuality this should not happen... if it does we are getting near the limit of the number of associations (you will see me often use the term association.. same thing as connection) thats allowed. We drop before allocating if we have hit this limit of course :-0 R -- Randall Stewart NSSTG - Cisco Systems Inc. 803-345-0369 803-317-4952 (cell)