inliniac/suricata — pull request #845 by inliniac (2014-02-20 17:02:42+00:00)
Title: [rfc, no-merge] WIP Packet multi queue: new queue type

New queue type for less contention. A series of packet queues that are
self-balancing and work hard to keep contention low.

The Get function does 2 passes: one with trylock, which skips over
locked and empty queues quicky. Then a 2nd pass which does use the
regular lock. The approach is not exact and non-deterministic. It is
possible that during the Get passes, packets are added to the queues
that we miss. This is a trade off for performance.

Setup a pseudo packet 'pool' using this method, where the various
pseudo packet users will now rely on this method for getting and
discarding packets.