freebsd-dev/sys
Christian S.J. Peron 52f1277eea 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.
2006-11-18 23:17:22 +00:00
..
amd64 Add support for 8 byte hardware watches in long mode. Kernel hardware 2006-11-17 20:27:01 +00:00
arm Erm we really want to mask all interrupts in the range, just not the first 2006-11-17 11:56:56 +00:00
boot Remove an unused variable. 2006-11-16 13:32:30 +00:00
bsm Merge OpenBSM 1.0 alpha 12 import changes into src/sys/bsm. New events 2006-09-25 12:22:07 +00:00
cam XPT_GET_TRAN_SETTINGS can fail- so check for an error and 2006-11-07 23:06:00 +00:00
coda change vop_lock handling to allowing tracking of callers' file and line for 2006-11-13 05:51:22 +00:00
compat Add missed ")". Fix the build. 2006-11-18 17:27:39 +00:00
conf Remove two more duplicated files 2006-11-18 07:24:56 +00:00
contrib Sweep kernel replacing suser(9) calls with priv(9) calls, assigning 2006-11-06 13:42:10 +00:00
crypto Initialize T1 to silent gcc warning. 2006-10-22 02:19:33 +00:00
ddb Fix the output format of MI ddb watches in 'show watch' on 64-bit 2006-11-17 16:41:56 +00:00
dev Change the internal API for polled commands. Calling mfi_polled_command 2006-11-18 07:33:53 +00:00
fs Wake up PIOCWAIT handler on the process exit in addition to the stop 2006-11-17 14:52:38 +00:00
gdb Convert to new console api 2006-05-26 13:54:27 +00:00
geom Fix ia64 build breakage. 2006-11-02 16:24:18 +00:00
gnu Previously, the mount_ext2fs binary listed the acceptable mount 2006-11-18 18:22:11 +00:00
i4b Sweep kernel replacing suser(9) calls with priv(9) calls, assigning 2006-11-06 13:42:10 +00:00
i386 - Add macro constants for the various fields in %dr7 and use them in place 2006-11-17 19:20:32 +00:00
ia64 Since printf also has at least one critical section, we need to 2006-11-18 23:15:25 +00:00
isa Use calendaric calculation support from subr_clock.c instead of home-rolled. 2006-10-02 16:18:40 +00:00
isofs/cd9660 Sweep kernel replacing suser(9) calls with priv(9) calls, assigning 2006-11-06 13:42:10 +00:00
kern Fix msgsnd(3)/msgrcv(3) deadlock under heavy resource pressure by timing out 2006-11-17 20:43:01 +00:00
libkern Add strstr() function to the libkern. 2006-08-12 15:28:39 +00:00
modules o Add uark(4), a driver for Arkmicro Technologies ARK3116 based serial 2006-11-15 09:13:25 +00:00
net Currently, drivers that support hardware offload of VLAN tag 2006-11-18 23:17:22 +00:00
net80211 Sweep kernel replacing suser(9) calls with priv(9) calls, assigning 2006-11-06 13:42:10 +00:00
netatalk Sweep kernel replacing suser(9) calls with priv(9) calls, assigning 2006-11-06 13:42:10 +00:00
netatm Sweep kernel replacing suser(9) calls with priv(9) calls, assigning 2006-11-06 13:42:10 +00:00
netgraph Sweep kernel replacing suser(9) calls with priv(9) calls, assigning 2006-11-06 13:42:10 +00:00
netinet Add SCTP as a known upper layer protocol over v6. 2006-11-13 19:07:32 +00:00
netinet6 -Fixes first of all the getcred on IPv6 and V4. The 2006-11-08 00:21:13 +00:00
netipsec Add priv.h include required to build FAST_IPSEC, which is not present in 2006-11-07 08:58:06 +00:00
netipx Sweep kernel replacing suser(9) calls with priv(9) calls, assigning 2006-11-06 13:42:10 +00:00
netkey With exception of the if_name() macro, all definitions in net_osdep.h 2006-08-04 21:27:40 +00:00
netnatm Change semantics of socket close and detach. Add a new protocol switch 2006-07-21 17:11:15 +00:00
netncp Sweep kernel replacing suser(9) calls with priv(9) calls, assigning 2006-11-06 13:42:10 +00:00
netsmb Sweep kernel replacing suser(9) calls with priv(9) calls, assigning 2006-11-06 13:42:10 +00:00
nfs
nfs4client Fixes up the handling of shared vnode lock lookups in the NFS client, 2006-09-13 18:39:09 +00:00
nfsclient vfs_hash_insert() vputs() the losing vnode before returning, in the event of 2006-11-16 23:03:46 +00:00
nfsserver Sweep kernel replacing suser(9) calls with priv(9) calls, assigning 2006-11-06 13:42:10 +00:00
opencrypto When DIAGNOSTIC is defined, verify if we don't free crypto requests from 2006-06-06 15:04:52 +00:00
pc98 MFi386: revisions 1.634 and 1.639. 2006-11-09 08:03:37 +00:00
pccard I don't believe these are used at all, and can be safely removed 2006-01-15 06:49:28 +00:00
pci - Don't bother to include IDs of PCnet chips which are not supported 2006-11-07 19:44:41 +00:00
powerpc Make pmap_enter() responsible for setting PG_WRITEABLE instead 2006-11-12 21:48:34 +00:00
rpc Fix up some cut-n-paste damage and some out-of-date comments. 2006-01-20 15:20:41 +00:00
security Merge posix4/* into normal kernel hierarchy. 2006-11-11 16:26:58 +00:00
sparc64 remove 13 (largely) redundant files and switch to the sparc64/sparc64 version 2006-11-18 07:10:52 +00:00
sun4v remove unused fields 2006-11-18 19:23:37 +00:00
sys Change sleepq_add(9) argument from 'struct mtx *' to 'struct lock_object *', 2006-11-16 01:02:00 +00:00
tools Check for errors when registering and unregistering firmware modules. This 2006-06-16 21:06:03 +00:00
ufs change vop_lock handling to allowing tracking of callers' file and line for 2006-11-13 05:51:22 +00:00
vm There is no point in setting PG_REFERENCED on kmem_object pages because 2006-11-13 00:27:02 +00:00
Makefile Merge posix4/* into normal kernel hierarchy. 2006-11-11 16:26:58 +00:00