Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Jun 2009 16:50:49 +0000 (UTC)
From:      Marko Zec <zec@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src UPDATING src/sys/netgraph netgraph.h ng_base.c ng_eiface.c ng_ether.c ng_iface.c ng_ip_input.c src/sys/sys proc.h
Message-ID:  <200906111655.n5BGtbof002849@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
zec         2009-06-11 16:50:49 UTC

  FreeBSD src repository

  Modified files:
    .                    UPDATING 
    sys/netgraph         netgraph.h ng_base.c ng_eiface.c 
                         ng_ether.c ng_iface.c ng_ip_input.c 
    sys/sys              proc.h 
  Log:
  SVN rev 194012 on 2009-06-11 16:50:49Z by zec
  
  Introduce a mechanism for detecting calls from outbound path of the
  network stack when reentering the inbound path from netgraph, and
  force queueing of mbufs at the outbound netgraph node.
  
  The mechanism relies on two components.  First, in netgraph nodes
  where outbound path of the network stack calls into netgraph, the
  current thread has to be appropriately marked using the new
  NG_OUTBOUND_THREAD_REF() macro before proceeding to call further
  into the netgraph topology, and unmarked using the
  NG_OUTBOUND_THREAD_UNREF() macro before returning to the caller.
  Second, netgraph nodes which can potentially reenter the network
  stack in the inbound path have to mark their inbound hooks using
  NG_HOOK_SET_TO_INBOUND() macro.  The netgraph framework will then
  detect when there is a danger of a call graph looping back from
  outbound to inbound path via netgraph, and defer handing off the
  mbufs to the "inbound" node to a worker thread with a clean stack.
  
  In this first pass only the most obvious netgraph nodes have been
  updated to ensure no outbound to inbound calls can occur.  Nodes
  such as ng_ipfw, ng_gif etc. should be further examined whether a
  potential for outbound to inbound call looping exists.
  
  This commit changes the layout of struct thread, but due to
  __FreeBSD_version number shortage a version bump has been omitted
  at this time, nevertheless kernel and modules have to be rebuilt.
  
  Reviewed by:    julian, rwatson, bz
  Approved by:    julian (mentor)
  
  Revision  Changes    Path
  1.617     +4 -0      src/UPDATING
  1.83      +31 -2     src/sys/netgraph/netgraph.h
  1.175     +5 -1      src/sys/netgraph/ng_base.c
  1.48      +3 -0      src/sys/netgraph/ng_eiface.c
  1.70      +3 -0      src/sys/netgraph/ng_ether.c
  1.60      +4 -2      src/sys/netgraph/ng_iface.c
  1.7       +5 -1      src/sys/netgraph/ng_ip_input.c
  1.533     +1 -0      src/sys/sys/proc.h



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