CVSROOT: /cvs Module name: src Changes by: henn...@cvs.openbsd.org 2014/04/22 05:43:07
Modified files: sys/net : if_ethersubr.c if_vlan.c Log message: we used to handle the vlan tag etc insertion very very very late, on al already ass embed ethernet frame, which meant: -copy (most of) the existing ethernet header into a ether_vlan_header on the stack -fill the extra fields in ether_vlan_header -set the ether type -m_adj() to make room for the extra space ether_vlan_header needs -m_copyback the ether_vlan_header into the mbuf that involves moving data around, which isn't all that cheap. cleaner & easier to have ether_output prepend the ether_vlan_header instead of the regular ethernet header, which makes the vlan tagging essentially free in most cases. help & ok reyk, naddy; waste of time bikeshedding tech@