cvs commit: src/sys/dev/bge if_bge.c

Peter Jeremy peterjeremy at
Wed Sep 20 00:26:56 PDT 2006

On Tue, 2006-Sep-19 15:35:06 -0400, Jung-uk Kim wrote:
[VLAN tagging]
>Why don't we just fake it up from ether_input() and pass it to 
>BPF_MTAP() instead of 'teaching' bpf?  I think it is more logical 
>thing to do.

As Andre points out, this negates the benefit of IFCAP_VLAN_HWTAGGING.

In addition, the code necessary to correctly re-insert the VLAN tag
(to provide a fully valid mbuf chain for further processing) will be
larger and slower than the code necessary to kludge a mbuf that is
adequate for bpf_filter().  bpf_mtap2() provides an example of
kludging an mbuf header to allow data to be pre-pended.  The code to
kludge up the VLAN tag insertion would be similar (though somewhat
more complex).

Overall, I believe this approach is probably preferable to just
disabling hardware VLAN tagging if there is a bpf filter.

Peter Jeremy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url :

More information about the cvs-src mailing list