cvs commit: src/sys/sys mbuf.h src/sys/net netisr.h rtsock.c

Robert Watson rwatson at FreeBSD.org
Wed Jun 9 02:48:24 GMT 2004


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 at 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


More information about the cvs-src mailing list