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

David Malone dwmalone at
Wed Sep 20 01:52:40 PDT 2006

On Wed, Sep 20, 2006 at 05:26:26PM +1000, Peter Jeremy wrote:
> 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().

Putting ethernet specific code in bpf_* feels like a bad idea. It
should be possible to leave hardware assisted VLAN tagging on and
get ether input to reinsert the tag only in cases where there is a
bpf listener. 4.X's ether_input already puts the ethernet header
back on the mbuf. In 6.X and later it will require a little more
work, but not much.

(It's interesting to note that as ethernet cards introduce more
features it is getting harder for us to tell what we put on the
wire. With checksum offloading we can no longer trust the checksum.
With VLAN tagging we can't trust the VLAN tag. With TSO we can't
trust the IP ID, TCP sequence number, TCP timestamps, ... We've
seen some interesting things on Linux recently because with TSO the
RTT esitmation for TCP doesn't work at all the way you expect.)


More information about the cvs-src mailing list