cvs commit: src/sys/net if_ethersubr.c

Bruce M Simpson bms at FreeBSD.org
Mon Mar 19 18:39:36 UTC 2007


bms         2007-03-19 18:39:36 UTC

  FreeBSD src repository

  Modified files:
    sys/net              if_ethersubr.c 
  Log:
  Clean up the ether_input() path by using the M_PROMISC flag.
  
  Main points of this change:
   * Drop frames immediately if the interface is not marked IFF_UP.
   * Always trim off the frame checksum if present.
   * Always use M_VLANTAG in preference to passing 802.1Q frames
     to consumers.
   * Use __func__ consistently for KASSERT().
   * Use the M_PROMISC flag to detect situations where ether_input()
     may reenter itself on the same call graph with the same mbuf which
     was promiscuously received on behalf of subsystems such as
     netgraph, carp, and vlan.
   * 802.1P frames (that is, VLAN frames with an ID of 0) will now be
     passed to layer 3 input paths.
   * Deal with the special case for CARP in a sane way.
  
  This is a significant rewrite of code on the critical path. Please report
  any issues to me if they arise. Frames will now only pass through dummynet
  if M_PROMISC is cleared, to avoid problems with re-entry.
  
  The handling of CARP needs to be revisited architecturally. The M_PROMISC
  flag may potentially be demoted to a link-layer flag only as it is in
  NetBSD, where the idea originated.
  
  Discussed on:   net
  Idea from:      NetBSD
  Reviewed by:    yar
  MFC after:      1 month
  
  Revision  Changes    Path
  1.224     +125 -120  src/sys/net/if_ethersubr.c


More information about the cvs-src mailing list