cvs commit: src/sys/net ethernet.h if_ethersubr.c

Christian S.J. Peron csjp at FreeBSD.org
Sat Nov 18 23:17:23 UTC 2006


csjp        2006-11-18 23:17:22 UTC

  FreeBSD src repository

  Modified files:
    sys/net              ethernet.h if_ethersubr.c 
  Log:
  Currently, drivers that support hardware offload of VLAN tag
  processing are forced to toggle this functionality when the card
  is put in and out of promiscuous mode.  The main reason for this
  is because the hardware strips the VLAN tag, making it impossible
  for the tag information to show up in network diagnostic tools like
  tcpdump(1).
  
  This change introduces ether_vlan_mtap(), which is called if the
  mbuf has M_VLANTAG set.  VLAN information is extracted from the
  mbuf and inserted into a stack allocated ether vlan header which
  is then inserted through the bpf machinery via bpf_mtap2(). The
  original mbuf's data pointer and lengths are temporarily adjusted
  to eliminate the original Ethernet header for the duration of the
  tap operation. This should have no long term effects on the mbuf.
  
  Also, define a new macro, ETHER_BPF_MTAP which should be used
  by drivers which support hardware offload of VLAN tag processing.
  
  The fixes for the relevant drivers will follow shortly.
  
  Discussed with:         rwatson, andre, jhb (and others)
  Much feedback from:     sam, ru
  MFC after:      1 month [1]
  
  [1] The version that is eventually MFCed will be somewhat
      different then this, as there has been significant work
      done to the VLAN code in HEAD.
  
  Revision  Changes    Path
  1.26      +19 -0     src/sys/net/ethernet.h
  1.220     +40 -0     src/sys/net/if_ethersubr.c


More information about the cvs-all mailing list