inliniac/suricata — pull request #881 by inliniac (2014-03-10 08:21:02+00:00)
Title: pfring: call enable_ring after set_cluster

Move pfring_enable_ring to the start of ReceivePfringLoop() so that
it's guaranteed to be called after all threads have called
pfring_set_cluster first.

This is necessary because pfring will already make packets available
to thread N, while thread N+1 is still registering itself. This leads
to cases where the first packet(s) of a flow are processed by a
different thread in Suricata than the later ones.

This is a race condition only at start up. New flows after the pfring
initialization is complete will not be influenced by this.

Bug #1129. https://redmine.openinfosecfoundation.org/issues/1129

Prscript:
- PR build: https://buildbot.suricata-ids.org/builders/inliniac/builds/224
- PR pcaps: https://buildbot.suricata-ids.org/builders/inliniac-pcap/builds/144

Cc: @regit