cvs commit: src/sys/net netisr.h src/sys/net/bridge if_bridge.c

Sepherosa Ziehau sephe at
Sat Jun 16 08:28:22 PDT 2007

sephe       2007/06/16 08:27:27 PDT

DragonFly src repository

  Modified files:
    sys/net              netisr.h 
    sys/net/bridge       if_bridge.c 
  - In bridge_enqueue(), dispatch the mbuf to the current cpu's netisr, instead
    of calling member iface's handoff directly, so we don't need to release
    bridge's serializer to avoid possible bridge/member iface serializer dead
    lock.  Add bridge_handoff(), which calls member iface's handoff directly.
  - Add bridge_pfil_enqueue(), which dispatches the mbuf to the current cpu's
    netisr.  Its netisr handler runs pfil on destination before calling member
    iface's handoff.  With the help of this fucntion, bridge's serializer no
    longer needs to be released during bridge_broadcast()'s member iface
    iteration.  Originally the serializer was released mainly to:
    o  Avoid possible bridge/member iface serializer dead lock
    o  Avoid possible recursion introduced by pfil
    These are no longer applicable to the new code.
  - Factor out bridge_enqueue_internal(), which dispatches the mbuf to the
    current cpu's netisr and strips MT_TAG mbufs before the dispatching.  It
    is used by bridge_{enqueue,pfil_enqueue}()
  - In bridge_forward(), reorganize pfil code to minimize bridge's temporary
    serializer releasing period:
    o  For broadcast or multicast packets, push bridge_pfil(bifp, src_if) down
       into bridge_broadcast().
    o  For unicast packets, delay bridge_pfil(bifp, src_if) until we have made
       sure that the destination interface is in working state.
  - In bridge_input(), if the input iface is not changed, don't go through
    the upper half of ether_input() again.
  - Declare netisr_apanic_port in netisr.h, since netmsg is embedded in mbuf,
    this declaration probably will become more useful than netisr_afree_port.
  Reviewed-by: dillon@
  Tested-by: dillon@
  Revision  Changes    Path
  1.27      +1 -0      src/sys/net/netisr.h
  1.25      +167 -74   src/sys/net/bridge/if_bridge.c

More information about the Commits mailing list