- In bridge_enqueue(), dispatch the mbuf to the current cpu's netisr, instead
commit9e5702e2d44b7f3eb6115c4bcff2c34099e455c3
authorsephe <sephe>
Sat, 16 Jun 2007 15:27:27 +0000 (16 15:27 +0000)
committersephe <sephe>
Sat, 16 Jun 2007 15:27:27 +0000 (16 15:27 +0000)
treee1ace464337e4029ac3e64c8d5c0f58555fcd66c
parent38d9f2bc3db5811bf8d2f292fbad04cc95eac0d7
- 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@
sys/net/bridge/if_bridge.c
sys/net/netisr.h