Re: LOR route vr0

From: M. Warner Losh <imp_at_bsdimp.com>
Date: Sat, 27 Aug 2005 12:49:41 -0600 (MDT)
In message: <20050827184153.A24510_at_fledge.watson.org>
            Robert Watson <rwatson_at_FreeBSD.org> 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
Received on Sat Aug 27 2005 - 16:49:43 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:42 UTC