K 10 svn:author V 7 glebius K 8 svn:date V 27 2012-06-06T09:44:57.740443Z K 7 svn:log V 742 When "flush" rule triggers we need to run through the entire table and clean all matching states. First, in the current locking scheme this leads to duplicate acquiring of state hash lock, which isn't allowed. Second, this is extremely expensive task, and performing it right now in the forwarding path is a very bad idea. Thus, offload this task to a taskqueue(9). We allocate some temporary memory and place all needed for matching there, put it on queue, and schedule taskqueue run. Code is quite common to the one that emits packets from the pf_intr(). Also here: - Rename PF_QUEUE_LOCK() macro to PF_SENDQ_LOCK() in order get in one style with PF_FLUSHQ_LOCK(). - Take rev. 1.715 from OpenBSD, which fixes the "flush" functionality. END