ifnet: Make ifnet and ifindex2ifnet MPSAFE
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Thu, 22 Jan 2015 13:28:43 +0000 (21:28 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 8 Feb 2015 11:34:59 +0000 (19:34 +0800)
commitb4051e25526dea89b12de0bacd6b8e84e3c7dd96
tree8095035b919bf0581da462a926a79640fc16b1cc
parentca2c5fcebc65d020e7be194395695125b49882d6
ifnet: Make ifnet and ifindex2ifnet MPSAFE

- Accessing to these two global variables from non-netisr threads uses
  ifnet lock.  This kind of accessing is from
- Accessing to ifindex2ifnet from netisrs are lockless MPSAFE.
- Netisrs no longer access ifnet, instead they access ifnet array as of
  this commit, which is lockless MPSAFE.

Rules for accessing ifnet and ifindex2ifnet is commented near the
declaration of the related global variables/functions in net/if_var.h.
37 files changed:
sys/emulation/linux/i386/linprocfs/linprocfs_misc.c
sys/emulation/linux/linux_ioctl.c
sys/kern/lwkt_token.c
sys/net/altq/altq_cbq.c
sys/net/altq/altq_fairq.c
sys/net/altq/altq_hfsc.c
sys/net/altq/altq_priq.c
sys/net/altq/altq_subr.c
sys/net/bpf.c
sys/net/bridge/if_bridge.c
sys/net/if.c
sys/net/if_clone.c
sys/net/if_mib.c
sys/net/if_var.h
sys/net/lagg/if_lagg.c
sys/net/netmap/netmap.c
sys/net/netmap/netmap_vale.c
sys/net/pf/if_pfsync.c
sys/net/pf/pf_if.c
sys/net/pf/pf_ioctl.c
sys/net/rtsock.c
sys/net/vlan/if_vlan.c
sys/netgraph/ether/ng_ether.c
sys/netgraph/fec/ng_fec.c
sys/netgraph7/ng_source.c
sys/netinet/ip_icmp.c
sys/netinet/ip_output.c
sys/netinet/raw_ip.c
sys/netinet6/icmp6.c
sys/netinet6/in6.c
sys/netinet6/in6_ifattach.c
sys/netinet6/nd6.c
sys/netinet6/raw_ip6.c
sys/netproto/802_11/wlan/ieee80211_dragonfly.c
sys/platform/pc64/x86_64/autoconf.c
sys/sys/thread.h
sys/vfs/nfs/bootp_subr.c