[PATCH] Part 2 of low level 802.1p priority support
Andrew Thompson
thompsa at freebsd.org
Sun Feb 11 06:21:50 UTC 2007
On Sat, Feb 10, 2007 at 06:28:41PM +0000, Bruce M. Simpson wrote:
> This updated patch moves VLAN tag decapsulation into if_ethersubr.c and
> always uses M_VLANTAG, which is also passed to the upper layer.
>
> Tests with ping:
> fxp (no VLAN_HWTAGGING support) OK
> msk (VLAN_HWTAGGING enabled) OK
> msk (VLAN_HWTAGGING disanabled) FAIL
>
> I am concerned that this may need review and testing to support
> situations where we do nested VLANs or with bridge(4) before it can be
> committed.
This is great for the bridge, it has needed to take the vlan tag into
account when deciding to forward or not. Having m_pkthdr.ether_vtag
always set makes this much easier to implement.
> Index: if_vlan.c
> ===================================================================
> RCS file: /home/ncvs/src/sys/net/if_vlan.c,v
>
> - if (m->m_flags & M_VLANTAG) {
> - /*
> - * Packet is tagged, but m contains a normal
> - * Ethernet frame; the tag is stored out-of-band.
> - */
> - tag = EVL_VLANOFTAG(m->m_pkthdr.ether_vtag);
> - m->m_flags &= ~M_VLANTAG;
^^^^^^^^^^^^^^^^^^^^^^^^
> - } else {
...
> + tag = EVL_VLANOFTAG(m->m_pkthdr.ether_vtag);
In the deleted code M_VLANTAG is cleared but is not done anymore, is
this right?
Andrew
More information about the freebsd-net
mailing list