Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Sep 2006 17:26:26 +1000
From:      Peter Jeremy <peterjeremy@optushome.com.au>
To:        Jung-uk Kim <jkim@freebsd.org>
Cc:        cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org, John Baldwin <jhb@freebsd.org>
Subject:   Re: cvs commit: src/sys/dev/bge if_bge.c
Message-ID:  <20060920072626.GA738@turion.vk2pj.dyndns.org>
In-Reply-To: <200609191535.08184.jkim@FreeBSD.org>
References:  <200609182218.k8IMIMUT059300@repoman.freebsd.org> <200609191431.01649.jkim@FreeBSD.org> <20060919190449.GC720@turion.vk2pj.dyndns.org> <200609191535.08184.jkim@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--Q68bSM7Ycu6FN28Q
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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=20
>BPF_MTAP() instead of 'teaching' bpf?  I think it is more logical=20
>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.

--=20
Peter Jeremy

--Q68bSM7Ycu6FN28Q
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (FreeBSD)

iD8DBQFFEO0i/opHv/APuIcRAuNSAJ0XAFeUznlXYBKCpAxM3GM/pBALdQCeMOz9
JO0pLra3AhjtfufsAT8z+1Y=
=Ekb2
-----END PGP SIGNATURE-----

--Q68bSM7Ycu6FN28Q--



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