Moving ethernet VLAN tags into the mbuf packet header (from mtags)

Andre Oppermann andre at freebsd.org
Thu Sep 7 08:07:37 PDT 2006


With the recent addition of a 16bit field for TSO into the mbuf packet
header we've got 16bits left over.  I've reserved these bits for the
ethernet VLAN tagging of packet to do away with the allocated mbuf mtag.

The change is rather mechanical.  Patch available here:

  http://people.freebsd.org/~andre/vlan_pkthdr-20060907.diff

The big advantage is that we don't have to do a UMA zalloc for very incoming
vlan tagged packet.  The m_pkthdr.ether_vlan field is always present and its
validity depends on the M_VLANTAG flag.

Testing & reviews encouraged. :-)

-- 
Andre


More information about the freebsd-arch mailing list