summaryrefslogtreecommitdiffstats
path: root/sys/net/pfil.h
Commit message (Collapse)AuthorAgeFilesLines
* Correct the definition of PFIL_HOOKED() so that it comparesgallatin2007-06-081-1/+1
| | | | | | | | | the value of ph_nhooks to zero, not the address. This removes extranious calls to pfil_run_hooks (and an rw lock) from the network stack's critical path when no pfil hooks are active. Reviewed by: csjp Sponsored by: Myricom Inc.
* define lock.h before rwlock.h for DEBUG_LOCKScsjp2006-02-021-0/+1
|
* Somewhat re-factor the read/write locking mechanism associated with the packetcsjp2006-02-021-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* /* -> /*- for license, minor formatting changesimp2005-01-071-1/+1
|
* Add an additional struct inpcb * argument to pfil(9) in order to enablemlaier2004-09-291-4/+5
| | | | | | | | | | | | | | | | | | | passing along socket information. This is required to work around a LOR with the socket code which results in an easy reproducible hard lockup with debug.mpsafenet=1. This commit does *not* fix the LOR, but enables us to do so later. The missing piece is to turn the filter locking into a leaf lock and will follow in a seperate (later) commit. This will hopefully be MT5'ed in order to fix the problem for RELENG_5 in forseeable future. Suggested by: rwatson A lot of work by: csjp (he'd be even more helpful w/o mentor-reviews ;) Reviewed by: rwatson, csjp Tested by: -pf, -ipfw, LINT, csjp and myself MFC after: 3 days LOR IDs: 14 - 17 (not fixed yet)
* Include <sys/_lock.h>'s prerequisite <sys/queue.h> before including thebde2004-06-191-1/+1
| | | | | | former, not after. Don't hide this bug by including <sys/queue.h> in <sys/_lock.h>.
* o update PFIL_HOOKS support to current API used by netbsdsam2003-09-231-18/+50
| | | | | | | | | | | o revamp IPv4+IPv6+bridge usage to match API changes o remove pfil_head instances from protosw entries (no longer used) o add locking o bump FreeBSD version for 3rd party modules Heavy lifting by: "Max Laier" <max@love2party.net> Supported by: FreeBSD Foundation Obtained from: NetBSD (bits of pfil.h and pfil.c)
* Fixed some style bugs in the removal of __P(()). The main ones werebde2002-03-241-2/+1
| | | | | | not removing tabs before "__P((", and not outdenting continuation lines to preserve non-KNF lining up of code with parentheses. Switch to KNF formatting and/or rewrap the whole prototype in some cases.
* Remove __P.alfred2002-03-191-7/+7
|
* Remove extra memory region kept by "struct pfil_head pfil_head_t;".ru2001-10-221-1/+1
| | | | | | | Seems to be a typo for typedef, but we don't want this non-style(9) typedef anyway. PR: kern/31356
* Replace nonexistent !defined(_LKM) by !defined(KLD_MODULE)ache2000-08-011-1/+1
|
* Check IPFILTER (options IPFILTER generates) instead of NIPFILTERache2000-08-011-2/+2
|
* Nonexistent "ipfilter.h" -> "opt_ipfilter.h"ache2000-07-311-1/+1
| | | | Kernel 'make depend' fails otherwise
* Back out the previous change to the queue(3) interface.jake2000-05-261-2/+2
| | | | | | It was not discussed and should probably not happen. Requested by: msmith and others
* Change the way that the queue(3) structures are declared; don't assume thatjake2000-05-231-2/+2
| | | | | | | | the type argument to *_HEAD and *_ENTRY is a struct. Suggested by: phk Reviewed by: phk Approved by: mdodd
* Add pfil(9) subroutines and manpage from NetBSD.darrenr2000-05-101-0/+81
OpenPOWER on IntegriCloud