From owner-freebsd-current@FreeBSD.ORG Sun Aug 28 01:57:18 2005 Return-Path: X-Original-To: freebsd-current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B3EF116A41F for ; Sun, 28 Aug 2005 01:57:18 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [204.156.12.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6617B43D45 for ; Sun, 28 Aug 2005 01:57:18 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by cyrus.watson.org (Postfix) with ESMTP id DAD0946B86; Sat, 27 Aug 2005 21:57:17 -0400 (EDT) Date: Sun, 28 Aug 2005 02:57:17 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: "M. Warner Losh" In-Reply-To: <20050827.120448.37592601.imp@bsdimp.com> Message-ID: <20050828025428.V43518@fledge.watson.org> References: <20050827181827.O24510@fledge.watson.org> <20050827.114013.35047360.imp@bsdimp.com> <20050827184153.A24510@fledge.watson.org> <20050827.120448.37592601.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: bzeeb-lists@lists.zabbadoz.net, freebsd-current@FreeBSD.org, dandee@volny.cz Subject: Re: LOR route vr0 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: Sun, 28 Aug 2005 01:57:18 -0000 On Sat, 27 Aug 2005, M. Warner Losh wrote: > : Note that sets of ordered entries are terminated with a double-null. This > : declares that locks of type "tcp" preceed "tcpinp" which preceed > : "so_snd". > > So would I add "ed1" to the list or "network driver"? 'ed1' I think, but to be honest, I'm not sure how lock classes interact with WITNESS. John should be able to tell us, but you can take a look at the WITNESS tables by breaking into DDB and running "show witness", and see what it identifies it as? In some ways, "network driver" might actually be better as it would let us make universal assertions across drivers. > : If I had to guess, you do a media status update, which can cause routing > : socket events indicating the link went up or down. > > No link moditoring, since the ED card I'm testing has no mii bus. That > might be ANOTHER problem, but it isn't this one :-). Okidoki. > : I think this case should be OK, and we should document that as being the > : case using a hard-coded witness entry. > > rearranging the code in this case would be at the very least awkward. > Maybe quite difficult, but likely doable. I think we need to make the if_addr_mtx follow device driver mutexes in the lock order because device drivers have an explicit need to acquire it while frobbing state. I'll peruse the if_addr_mtx consuming code in the network stack and see if we accidentally call into anything (specifically device drivers) while holding the mutex. I meant not to, but I may have done. I think I was fairly careful to avoid calling the routing code while holding it. Robert N M Watson