- Embed ether vlan tag in mbuf packet header. Add an mbuf flag to mark that
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Mon, 10 Mar 2008 10:47:57 +0000 (10:47 +0000)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Mon, 10 Mar 2008 10:47:57 +0000 (10:47 +0000)
commit83790f8590ff69bef66e49b9be70f35b019bcd39
treeb65703c79ce2ba1dd1d20c3311d4de7a268699f6
parent0f453d01fbf3fa9208be7678058699af4d26cb9c
- Embed ether vlan tag in mbuf packet header.  Add an mbuf flag to mark that
  this field is valid.
- Hide ifvlan after the above change; drivers support hardware vlan tagging
  only need to check ether_vlantag in mbuf packet header.
- Convert all drivers that support hardware vlan tagging to use vlan tag field
  in mbug packet header.

Obtained-from: FreeBSD

Change the vlan/parent serializer releasing/holding sequences into mbuf
dispatching.  There are several reasons to do so:
- Avoid excessive vlan interface serializer releasing/holding
- Touching parent interface if_snd without holding parent's serializer is
  unsafe
- vlan's parent may disappear or be changed after vlan's serializer is released

# This dispatching could be further optimized by packing all mbufs into one
# netmsg using m_nextpkt to:
# - Amortize netmsg sending cost
# - Reduce the time that parent interface spends on serializer releasing/holding
15 files changed:
sys/conf/files
sys/dev/netif/bce/if_bce.c
sys/dev/netif/bge/if_bge.c
sys/dev/netif/em/if_em.c
sys/dev/netif/nfe/if_nfe.c
sys/dev/netif/nge/if_nge.c
sys/dev/netif/re/if_re.c
sys/dev/netif/stge/if_stge.c
sys/dev/netif/ti/if_ti.c
sys/dev/netif/txp/if_txp.c
sys/dev/netif/vge/if_vge.c
sys/net/vlan/if_vlan.c
sys/net/vlan/if_vlan_ether.c [new file with mode: 0644]
sys/net/vlan/if_vlan_var.h
sys/sys/mbuf.h