From owner-freebsd-current@FreeBSD.ORG Sat Aug 27 18:49:43 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 90BFA16A41F; Sat, 27 Aug 2005 18:49:43 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.village.org (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 073B943D48; Sat, 27 Aug 2005 18:49:42 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1]) by harmony.village.org (8.13.3/8.13.3) with ESMTP id j7RInMtG018111; Sat, 27 Aug 2005 12:49:22 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sat, 27 Aug 2005 12:49:41 -0600 (MDT) Message-Id: <20050827.124941.14976142.imp@bsdimp.com> To: rwatson@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <20050827184153.A24510@fledge.watson.org> References: <20050827181827.O24510@fledge.watson.org> <20050827.114013.35047360.imp@bsdimp.com> <20050827184153.A24510@fledge.watson.org> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.village.org [127.0.0.1]); Sat, 27 Aug 2005 12:49:27 -0600 (MDT) 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: Sat, 27 Aug 2005 18:49:43 -0000 In message: <20050827184153.A24510@fledge.watson.org> Robert Watson writes: : : On Sat, 27 Aug 2005, M. Warner Losh wrote: : : > : Generally speaking, network interface device driver locks follow network : > : stack locks in the lock order. However, I've not really looked much at : > : the route table locking so can't speak to whether that is the case : > : specifically for routing locks. If it is, the below traces reflect the : > : correct order, and you might want to add a hard-coded entry to witness in : > : order to catch the reverse order. : > : > Can you pose a quickie summary on how to do that? I tried last night and : > was unsuccessful... : : You need to add an entry to subr_witness.c creating a graph edge between : the softc lock and the routing lock. An example of an entry in : subr_witness.c: : : /* : * TCP/IP : */ : { "tcp", &lock_class_mtx_sleep }, : { "tcpinp", &lock_class_mtx_sleep }, : { "so_snd", &lock_class_mtx_sleep }, : { NULL, NULL }, : : 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 you have to have locks of type tcp BEFORE you take out tcpinp type locks? Warner