Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Jun 2004 02:48:24 +0000 (UTC)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/sys mbuf.h src/sys/net netisr.h rtsock.c
Message-ID:  <200406090248.i592mOfX063930@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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" <gnn@neville-neil.com>
  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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200406090248.i592mOfX063930>