]> git.ipfire.org Git - thirdparty/suricata.git/commit
Allocate mPIPE packet ingress queue in each worker thread.
authorKen Steele <ken@tilera.com>
Tue, 12 Nov 2013 20:47:56 +0000 (15:47 -0500)
committerVictor Julien <victor@inliniac.net>
Tue, 19 Nov 2013 11:32:15 +0000 (12:32 +0100)
commitde6cbb01c85e7b3837f38f78367cfddc17cf8fd7
treeb3955a812ddfeb3a5c7925d8d573903404efdda7
parent601c7c8e3ced8bb6447da65a6062d37f42c39f54
Allocate mPIPE packet ingress queue in each worker thread.

Move the allocation of the mPipe ingress queue from a loop over
the number of workers in the main init function to being done inside
each worker thread. This allows allocating the memory locally on the
worker's CPU without needing to figure out ahead of time where that thread
will be running. This fixes one case of static mapping of workers to CPUs.

Use __thread to hold the queue rather than a global tables of queues.
src/source-mpipe.c