Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Nov 2006 23:17:22 +0000 (UTC)
From:      "Christian S.J. Peron" <csjp@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/net ethernet.h if_ethersubr.c
Message-ID:  <200611182317.kAINHMLB010431@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



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