freebsd-dev/sys/net
Christian S.J. Peron 604afec496 Somewhat re-factor the read/write locking mechanism associated with the packet
filtering mechanisms to use the new rwlock(9) locking API:

- Drop the variables stored in the phil_head structure which were specific to
  conditions and the home rolled read/write locking mechanism.
- Drop some includes which were used for condition variables
- Drop the inline functions, and convert them to macros. Also, move these
  macros into pfil.h
- Move pfil list locking macros intp phil.h as well
- Rename ph_busy_count to ph_nhooks. This variable will represent the number
  of IN/OUT hooks registered with the pfil head structure
- Define PFIL_HOOKED macro which evaluates to true if there are any
  hooks to be ran by pfil_run_hooks
- In the IP/IP6 stacks, change the ph_busy_count comparison to use the new
  PFIL_HOOKED macro.
- Drop optimization in pfil_run_hooks which checks to see if there are any
  hooks to be ran, and returns if not. This check is already performed by the
  IP stacks when they call:

        if (!PFIL_HOOKED(ph))
                goto skip_hooks;

- Drop in assertion which makes sure that the number of hooks never drops
  below 0 for good measure. This in theory should never happen, and if it
  does than there are problems somewhere
- Drop special logic around PFIL_WAITOK because rw_wlock(9) does not sleep
- Drop variables which support home rolled read/write locking mechanism from
  the IPFW firewall chain structure.
- Swap out the read/write firewall chain lock internal to use the rwlock(9)
  API instead of our home rolled version
- Convert the inlined functions to macros

Reviewed by:	mlaier, andre, glebius
Thanks to:	jhb for the new locking API
2006-02-02 03:13:16 +00:00
..
bpf_compat.h Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00
bpf_filter.c Correctly check the filter length. I committed the wrong version. 2006-01-03 20:34:41 +00:00
bpf_jitter.c Add BPF Just-In-Time compiler support for ng_bpf(4). 2005-12-07 21:30:47 +00:00
bpf_jitter.h Add BPF Just-In-Time compiler support for ng_bpf(4). 2005-12-07 21:30:47 +00:00
bpf.c Add BPF Just-In-Time compiler support for ng_bpf(4). 2005-12-07 21:30:47 +00:00
bpf.h Introduce two new ioctl(2) commands, BIOCLOCK and BIOCSETWF. These commands 2005-08-22 19:35:48 +00:00
bpfdesc.h Add experimental BPF Just-In-Time compiler for amd64 and i386. 2005-12-06 02:58:12 +00:00
bridgestp.c Minor whitespace cleanup. 2005-12-17 10:03:48 +00:00
bsd_comp.c Eliminate MAC entry point mac_create_mbuf_from_mbuf(), which is 2005-07-05 23:39:51 +00:00
ethernet.h add ETHERTYPE_PAE for EAPOL/802.1x 2004-10-05 19:28:52 +00:00
fddi.h - Make IFP2ENADDR() a pointer to IF_LLADDR() rather than another 2005-11-11 07:36:14 +00:00
firewire.h Stop embedding struct ifnet at the top of driver softcs. Instead the 2005-06-10 16:49:24 +00:00
if_arc.h Stop embedding struct ifnet at the top of driver softcs. Instead the 2005-06-10 16:49:24 +00:00
if_arcsubr.c Return mbuf pointer or NULL from ip_fastforward() as the mbuf pointer 2006-01-18 14:24:39 +00:00
if_arp.h - Store pointer to the link-level address right in "struct ifnet" 2005-11-11 16:04:59 +00:00
if_atm.h Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
if_atmsubr.c o Make rt_check() function more strict: 2005-08-11 08:14:53 +00:00
if_bridge.c Fix two bugs with the bridge 2006-01-31 21:21:28 +00:00
if_bridgevar.h Add code that clears certain capabilities from the member interface, these are 2006-01-14 03:51:31 +00:00
if_clone.c Fix the following bugs: 2005-11-24 18:56:14 +00:00
if_clone.h Move the cloned interface list management in to if_clone. For some drivers the 2005-11-08 20:08:34 +00:00
if_disc.c Force this interface to be RUNNING. 2005-11-11 11:17:57 +00:00
if_dl.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
if_ef.c Return mbuf pointer or NULL from ip_fastforward() as the mbuf pointer 2006-01-18 14:24:39 +00:00
if_ethersubr.c Merge the //depot/user/yar/vlan branch into CVS. It contains some collective 2006-01-30 13:45:15 +00:00
if_faith.c Move the cloned interface list management in to if_clone. For some drivers the 2005-11-08 20:08:34 +00:00
if_fddisubr.c Return mbuf pointer or NULL from ip_fastforward() as the mbuf pointer 2006-01-18 14:24:39 +00:00
if_fwsubr.c Return mbuf pointer or NULL from ip_fastforward() as the mbuf pointer 2006-01-18 14:24:39 +00:00
if_gif.c Add some initial locking to gif(4). It doesn't covers the whole driver, 2006-01-30 08:39:09 +00:00
if_gif.h Add some initial locking to gif(4). It doesn't covers the whole driver, 2006-01-30 08:39:09 +00:00
if_gre.c Fix stack corruptions on amd64. 2006-01-21 10:44:34 +00:00
if_gre.h Stop embedding struct ifnet at the top of driver softcs. Instead the 2005-06-10 16:49:24 +00:00
if_iso88025subr.c Return mbuf pointer or NULL from ip_fastforward() as the mbuf pointer 2006-01-18 14:24:39 +00:00
if_llc.h Add hooks into the networking layer to support if_bridge. This changes struct 2005-06-05 03:13:13 +00:00
if_loop.c Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
if_media.c add a sysctl to turn debug msgs on/off when built with IFMEDIA_DEBUG 2005-12-25 23:28:23 +00:00
if_media.h Add CARP (Common Address Redundancy Protocol), which allows multiple 2005-02-22 13:04:05 +00:00
if_mib.c Add a new leaf to the net.link.generic.ifdata.%d sysctl to retrieve 2006-01-04 12:57:09 +00:00
if_mib.h Add a new leaf to the net.link.generic.ifdata.%d sysctl to retrieve 2006-01-04 12:57:09 +00:00
if_ppp.c Return mbuf pointer or NULL from ip_fastforward() as the mbuf pointer 2006-01-18 14:24:39 +00:00
if_ppp.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
if_pppvar.h Axe ppp_for_tty(). Use tty->t_lsc pointer to store sc. This 2005-08-12 08:27:15 +00:00
if_sl.c Use new (inline) functions for calls into driver. 2005-10-16 20:44:18 +00:00
if_slvar.h Stop embedding struct ifnet at the top of driver softcs. Instead the 2005-06-10 16:49:24 +00:00
if_sppp.h Stop embedding struct ifnet at the top of driver softcs. Instead the 2005-06-10 16:49:24 +00:00
if_spppfr.c Stop embedding struct ifnet at the top of driver softcs. Instead the 2005-06-10 16:49:24 +00:00
if_spppsubr.c Fix -Wundef from compiling the amd64 LINT. 2005-12-04 10:06:06 +00:00
if_stf.c Use sparse initializers for "struct domain" and "struct protosw", 2005-11-09 13:29:16 +00:00
if_stf.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
if_tap.c - Store pointer to the link-level address right in "struct ifnet" 2005-11-11 16:04:59 +00:00
if_tap.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
if_tapvar.h Stop embedding struct ifnet at the top of driver softcs. Instead the 2005-06-10 16:49:24 +00:00
if_tun.c Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
if_tun.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
if_types.h Stop embedding struct ifnet at the top of driver softcs. Instead the 2005-06-10 16:49:24 +00:00
if_var.h Merge the //depot/user/yar/vlan branch into CVS. It contains some collective 2006-01-30 13:45:15 +00:00
if_vlan_var.h Merge the //depot/user/yar/vlan branch into CVS. It contains some collective 2006-01-30 13:45:15 +00:00
if_vlan.c Set IFF_BROADCAST and IFF_MULTICAST on vlan interfaces from the 2006-01-31 16:41:05 +00:00
if.c Merge the //depot/user/yar/vlan branch into CVS. It contains some collective 2006-01-30 13:45:15 +00:00
if.h Merge the //depot/user/yar/vlan branch into CVS. It contains some collective 2006-01-30 13:45:15 +00:00
iso88025.h - Make IFP2ENADDR() a pointer to IF_LLADDR() rather than another 2005-11-11 07:36:14 +00:00
net_osdep.h we are not OLD_BPF system. 2005-01-11 07:08:15 +00:00
netisr.c - Don't pollute opt_global.h with DEVICE_POLLING and introduce 2005-10-05 10:09:17 +00:00
netisr.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
pfil.c Somewhat re-factor the read/write locking mechanism associated with the packet 2006-02-02 03:13:16 +00:00
pfil.h Somewhat re-factor the read/write locking mechanism associated with the packet 2006-02-02 03:13:16 +00:00
pfkeyv2.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ppp_comp.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ppp_deflate.c /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ppp_defs.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ppp_tty.c Use new (inline) functions for calls into driver. 2005-10-16 20:44:18 +00:00
radix.c /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
radix.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
raw_cb.c Acquire the raw_cb mutex around LIST_REMOVE() of a raw socket control 2005-01-24 22:56:09 +00:00
raw_cb.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
raw_usrreq.c /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
route.c - Store pointer to the link-level address right in "struct ifnet" 2005-11-11 16:04:59 +00:00
route.h Remove bogous semicolons at the end of the definitions of 2005-09-14 14:57:04 +00:00
rtsock.c - Store pointer to the link-level address right in "struct ifnet" 2005-11-11 16:04:59 +00:00
slcompress.c Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00
slcompress.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
slip.h Remove advertising clause from University of California Regent's 2004-04-07 20:46:16 +00:00
zlib.c Forward declare z_errmsg with static linkage since it is defined 2005-09-11 16:13:02 +00:00
zlib.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00