freebsd-dev/sys/netgraph
Andre Oppermann 78ba57b9e1 Move ethernet VLAN tags from mtags to its own mbuf packet header field
m_pkthdr.ether_vlan.  The presence of the M_VLANTAG flag on the mbuf
signifies the presence and validity of its content.

Drivers that support hardware VLAN tag stripping fill in the received
VLAN tag (containing both vlan and priority information) into the
ether_vtag mbuf packet header field:

	m->m_pkthdr.ether_vtag = vlan_id;	/* ntohs()? */
	m->m_flags |= M_VLANTAG;

to mark the packet m with the specified VLAN tag.

On output the driver should check the mbuf for the M_VLANTAG flag to
see if a VLAN tag is present and valid:

	if (m->m_flags & M_VLANTAG) {
		... = m->m_pkthdr.ether_vtag;	/* htons()? */
		... pass tag to hardware ...
	}

VLAN tags are stored in host byte order.  Byte swapping may be necessary.

(Note: This driver conversion was mechanic and did not add or remove any
byte swapping in the drivers.)

Remove zone_mtag_vlan UMA zone and MTAG_VLAN definition.  No more tag
memory allocation have to be done.

Reviewed by:	thompsa, yar
Sponsored by:	TCP/IP Optimization Fundraise 2005
2006-09-17 13:33:30 +00:00
..
atm
bluetooth s/USBDEVNAME/device_get_nameunit/g 2006-09-07 23:38:09 +00:00
netflow
netgraph.h Use NET_CALLOUT_MPSAFE for netgraph callout initializer. 2006-06-06 08:05:27 +00:00
ng_async.c
ng_async.h
ng_atmllc.c
ng_atmllc.h
ng_base.c When counting nodes second time, use the same criteria as for 2006-06-07 12:42:15 +00:00
ng_bpf.c
ng_bpf.h
ng_bridge.c
ng_bridge.h
ng_cisco.c
ng_cisco.h
ng_device.c
ng_device.h
ng_echo.c
ng_echo.h
ng_eiface.c SIOCSIFFLAGS doesn't require an argument in kernel land; instead, flags 2006-09-15 15:53:09 +00:00
ng_eiface.h
ng_etf.c
ng_etf.h
ng_ether.c Turn off by default "feature" that overwrites MAC address 2006-08-04 13:36:27 +00:00
ng_ether.h
ng_fec.c Fix input byte counting. Now the sum of the ipackets/ibytes counters 2006-09-15 20:17:45 +00:00
ng_fec.h
ng_frame_relay.c
ng_frame_relay.h
ng_gif_demux.c
ng_gif_demux.h
ng_gif.c
ng_gif.h
ng_hole.c
ng_hole.h
ng_hub.c
ng_hub.h
ng_iface.c add missed calls to bpf_peers_present 2006-06-02 23:14:40 +00:00
ng_iface.h
ng_ip_input.c
ng_ip_input.h
ng_ipfw.c
ng_ipfw.h
ng_ksocket.c soreceive_generic(), and sopoll_generic(). Add new functions sosend(), 2006-07-24 15:20:08 +00:00
ng_ksocket.h
ng_l2tp.c
ng_l2tp.h
ng_lmi.c
ng_lmi.h
ng_message.h
ng_mppc.c
ng_mppc.h
ng_nat.c
ng_nat.h
ng_one2many.c
ng_one2many.h
ng_parse.c
ng_parse.h
ng_ppp.c
ng_ppp.h
ng_pppoe.c Some perfectionizm against last revision. 2006-08-10 11:07:11 +00:00
ng_pppoe.h Fix ng_pppoe(4) after turning off "autosrc feature" on ng_ether(4). 2006-08-09 09:56:58 +00:00
ng_pptpgre.c
ng_pptpgre.h
ng_rfc1490.c
ng_rfc1490.h
ng_sample.c
ng_sample.h
ng_socket.c Change semantics of socket close and detach. Add a new protocol switch 2006-07-21 17:11:15 +00:00
ng_socket.h
ng_socketvar.h
ng_source.c
ng_source.h
ng_split.c
ng_split.h
ng_sppp.c
ng_sppp.h
ng_tag.c A netgraph node that can do different manipulations with 2006-06-27 12:45:28 +00:00
ng_tag.h A netgraph node that can do different manipulations with 2006-06-27 12:45:28 +00:00
ng_tcpmss.c
ng_tcpmss.h
ng_tee.c
ng_tee.h
ng_tty.c
ng_tty.h
ng_UI.c
ng_UI.h
ng_vjc.c
ng_vjc.h
ng_vlan.c Move ethernet VLAN tags from mtags to its own mbuf packet header field 2006-09-17 13:33:30 +00:00
ng_vlan.h
NOTES