From owner-cvs-all@FreeBSD.ORG Wed Jun 9 02:48:24 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 48D5516A4CE; Wed, 9 Jun 2004 02:48:24 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4303043D2F; Wed, 9 Jun 2004 02:48:24 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i592mOmx063931; Wed, 9 Jun 2004 02:48:24 GMT (envelope-from rwatson@repoman.freebsd.org) Received: (from rwatson@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i592mOfX063930; Wed, 9 Jun 2004 02:48:24 GMT (envelope-from rwatson) Message-Id: <200406090248.i592mOfX063930@repoman.freebsd.org> From: Robert Watson Date: Wed, 9 Jun 2004 02:48:24 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/sys mbuf.h src/sys/net netisr.h rtsock.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jun 2004 02:48:24 -0000 rwatson 2004-06-09 02:48:23 UTC FreeBSD src repository Modified files: sys/sys mbuf.h sys/net netisr.h rtsock.c Log: Introduce a netisr to deliver kernel-generated routing, avoiding recursive entering of the socket code from the routing code: - Modify rt_dispatch() to bundle up the sockaddr family, if any, associated with a pending mbuf to dispatch to routing sockets, in an m_tag on the mbuf. - Allocate NETISR_ROUTE for use by routing sockets. - Introduce rtsintrq, an ifqueue to be used by the netisr, and introduce rts_input(), a function to unbundle the tagged sockaddr and inject the mbuf and address into raw_input(), which previously occurred in rt_dispatch(). - Introduce rts_init() to initialize rtsintrq, its mutex, and register the netisr. Perform this at the same point in system initialization as setup of the domains. This change introduces asynchrony between the generation of a pending routing socket message and delivery to sockets for use by userspace. It avoids socket->routing->rtsock->socket use and helps to avoid lock order reversals between the routing code and socket code (in particular, raw socket control blocks), as route locks are held over calls to rt_dispatch(). Reviewed by: "George V.Neville-Neil" Conceptual head nod by: sam Revision Changes Path 1.32 +1 -0 src/sys/net/netisr.h 1.111 +52 -4 src/sys/net/rtsock.c 1.149 +1 -0 src/sys/sys/mbuf.h