freebsd-nq/sys/net80211
Marko Zec 21ca7b57bd Change the curvnet variable from a global const struct vnet *,
previously always pointing to the default vnet context, to a
dynamically changing thread-local one.  The currvnet context
should be set on entry to networking code via CURVNET_SET() macros,
and reverted to previous state via CURVNET_RESTORE().  Recursions
on curvnet are permitted, though strongly discuouraged.

This change should have no functional impact on nooptions VIMAGE
kernel builds, where CURVNET_* macros expand to whitespace.

The curthread->td_vnet (aka curvnet) variable's purpose is to be an
indicator of the vnet context in which the current network-related
operation takes place, in case we cannot deduce the current vnet
context from any other source, such as by looking at mbuf's
m->m_pkthdr.rcvif->if_vnet, sockets's so->so_vnet etc.  Moreover, so
far curvnet has turned out to be an invaluable consistency checking
aid: it helps to catch cases when sockets, ifnets or any other
vnet-aware structures may have leaked from one vnet to another.

The exact placement of the CURVNET_SET() / CURVNET_RESTORE() macros
was a result of an empirical iterative process, whith an aim to
reduce recursions on CURVNET_SET() to a minimum, while still reducing
the scope of CURVNET_SET() to networking only operations - the
alternative would be calling CURVNET_SET() on each system call entry.
In general, curvnet has to be set in three typicall cases: when
processing socket-related requests from userspace or from within the
kernel; when processing inbound traffic flowing from device drivers
to upper layers of the networking stack, and when executing
timer-driven networking functions.

This change also introduces a DDB subcommand to show the list of all
vnet instances.

Approved by:	julian (mentor)
2009-05-05 10:56:12 +00:00
..
_ieee80211.h
ieee80211_acl.c
ieee80211_adhoc.c whitespace 2009-05-02 20:18:18 +00:00
ieee80211_adhoc.h
ieee80211_amrr.c
ieee80211_amrr.h
ieee80211_crypto_ccmp.c
ieee80211_crypto_none.c
ieee80211_crypto_tkip.c
ieee80211_crypto_wep.c
ieee80211_crypto.c
ieee80211_crypto.h
ieee80211_ddb.c don't say "ac WME_AC_BE"; remove "ac" 2009-05-02 20:28:55 +00:00
ieee80211_dfs.c
ieee80211_dfs.h
ieee80211_freebsd.c Change the curvnet variable from a global const struct vnet *, 2009-05-05 10:56:12 +00:00
ieee80211_freebsd.h Create a taskqueue for each wireless interface which provides a serialised 2009-05-02 15:14:18 +00:00
ieee80211_hostap.c print both fc bytes when hitting a protocol version mismatch 2009-04-26 21:50:21 +00:00
ieee80211_hostap.h
ieee80211_ht.c allow drivers to hook ampdu rx start/stop 2009-04-26 22:54:51 +00:00
ieee80211_ht.h promote ieee80211_seq typedef 2009-05-02 20:25:22 +00:00
ieee80211_input.c split Atheros SuperG support out into it's own file that's included only 2009-03-24 20:39:08 +00:00
ieee80211_input.h split Atheros SuperG support out into it's own file that's included only 2009-03-24 20:39:08 +00:00
ieee80211_ioctl.c Create a taskqueue for each wireless interface which provides a serialised 2009-05-02 15:14:18 +00:00
ieee80211_ioctl.h Hoist 802.11 encapsulation up into net80211: 2009-03-30 21:53:27 +00:00
ieee80211_monitor.c
ieee80211_monitor.h
ieee80211_node.c Create a taskqueue for each wireless interface which provides a serialised 2009-05-02 15:14:18 +00:00
ieee80211_node.h promote ieee80211_seq typedef 2009-05-02 20:25:22 +00:00
ieee80211_output.c Store the tx seq# of an 802.11 frame in the mbuf pkthdr; this will be 2009-04-27 17:39:41 +00:00
ieee80211_phy.c
ieee80211_phy.h
ieee80211_power.c
ieee80211_power.h
ieee80211_proto.c Relax the condition for printing the lost state transition message. The new 2009-05-03 18:29:04 +00:00
ieee80211_proto.h Change if_output to take a struct route as its fourth argument in order 2009-04-16 20:30:28 +00:00
ieee80211_radiotap.h
ieee80211_regdomain.c
ieee80211_regdomain.h
ieee80211_rssadapt.c
ieee80211_rssadapt.h
ieee80211_scan_sta.c Create a taskqueue for each wireless interface which provides a serialised 2009-05-02 15:14:18 +00:00
ieee80211_scan.c Create a taskqueue for each wireless interface which provides a serialised 2009-05-02 15:14:18 +00:00
ieee80211_scan.h Create a taskqueue for each wireless interface which provides a serialised 2009-05-02 15:14:18 +00:00
ieee80211_sta.c whitespace 2009-04-26 22:44:23 +00:00
ieee80211_sta.h
ieee80211_superg.c make superg/fast-frames state dynamically-allocated (and indirect off 2009-05-02 20:16:55 +00:00
ieee80211_superg.h make superg/fast-frames state dynamically-allocated (and indirect off 2009-05-02 20:16:55 +00:00
ieee80211_tdma.c setup turboA/G fixed rate parameters too; this is needed, in particular, 2009-04-13 20:53:12 +00:00
ieee80211_tdma.h o move tdma+superg protocol defs out of public view 2009-03-26 21:29:03 +00:00
ieee80211_var.h make superg/fast-frames state dynamically-allocated (and indirect off 2009-05-02 20:16:55 +00:00
ieee80211_wds.c print both fc bytes when hitting a protocol version mismatch 2009-04-26 21:50:21 +00:00
ieee80211_wds.h
ieee80211_xauth.c
ieee80211.c Create a taskqueue for each wireless interface which provides a serialised 2009-05-02 15:14:18 +00:00
ieee80211.h promote ieee80211_seq typedef 2009-05-02 20:25:22 +00:00