Andre Oppermann wrote:
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. :-)
You are adding these fields to the mbuf pktheader in an unconditional
manner.
This means that even protocols that have no need or understanding of
these fields are paying the price.
I understand that at this point in history 99.999% of packets are for
protocols for which these make sense
but I wonder if we should consider whether mbufs should have some
'protocol specific' fields.
mbuf tags are one way of doing this but maybe we can work out some
method of doing this that doesn't
require as much overhead (no extra allocations). Possibly by making some
scheme whereby tags
are allocated as part of the mbuf. I would suggest that each protocol
have its own mbuf allocator that
does preallocations according to what the active protocols might require.
just vague ideas.
_______________________________________________
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "[EMAIL PROTECTED]"