<font size=2 face="sans-serif">I'm trying to get Suricata up and running
with PF_RING but I keep getting a pfring_recv error. Here is a snipped
from when Suricata starts up:</font>
<br>
<br><font size=2 face="sans-serif">[13373] 3/8/2011 -- 16:25:22 - (source-pfring.c:313)
<Info> (ReceivePfringThreadInit) -- (ReceivePfring) Using PF_RING
v.4.7.1, interface eth2, cluster-id 99</font>
<br><font size=2 face="sans-serif">[13354] 3/8/2011 -- 16:25:23 - (tm-threads.c:1485)
<Info> (TmThreadWaitOnThreadInit) -- all 11 packet processing threads,
3 management threads initialized, engine started.</font>
<br><font size=2 face="sans-serif">[13373] 3/8/2011 -- 16:25:23 - (source-pfring.c:232)
<Error> (ReceivePfring) -- [ERRCODE: SC_ERR_PF_RING_RECV(31)] - pfring_recv
error -1</font>
<br><font size=2 face="sans-serif">[13373] 3/8/2011 -- 16:25:23 - (source-pfring.c:332)
<Info> (ReceivePfringThreadExitStats) -- (ReceivePfring) Packets
0, bytes 0</font>
<br><font size=2 face="sans-serif">[13373] 3/8/2011 -- 16:25:23 - (source-pfring.c:336)
<Info> (ReceivePfringThreadExitStats) -- (ReceivePfring) Pfring Total:0
Recv:0 Drop:0 (nan%).</font>
<br><font size=2 face="sans-serif">[13354] 3/8/2011 -- 16:25:24 - (tm-threads.c:1400)
<Info> (TmThreadRestartThread) -- thread "ReceivePfring"
restarted</font>
<br><font size=2 face="sans-serif">[13387] 3/8/2011 -- 16:25:24 - (source-pfring.c:313)
<Info> (ReceivePfringThreadInit) -- (ReceivePfring) Using PF_RING
v.4.7.1, interface eth2, cluster-id 99</font>
<br><font size=2 face="sans-serif">[13387] 3/8/2011 -- 16:25:24 - (source-pfring.c:232)
<Error> (ReceivePfring) -- [ERRCODE: SC_ERR_PF_RING_RECV(31)] - pfring_recv
error -1</font>
<br><font size=2 face="sans-serif">[13387] 3/8/2011 -- 16:25:24 - (source-pfring.c:332)
<Info> (ReceivePfringThreadExitStats) -- (ReceivePfring) Packets
0, bytes 0</font>
<br><font size=2 face="sans-serif">[13387] 3/8/2011 -- 16:25:24 - (source-pfring.c:336)
<Info> (ReceivePfringThreadExitStats) -- (ReceivePfring) Pfring Total:0
Recv:0 Drop:0 (nan%).</font>
<br><font size=2 face="sans-serif">[13354] 3/8/2011 -- 16:25:24 - (tm-threads.c:1400)
<Info> (TmThreadRestartThread) -- thread "ReceivePfring"
restarted</font>
<br><font size=2 face="sans-serif">[13388] 3/8/2011 -- 16:25:24 - (source-pfring.c:313)
<Info> (ReceivePfringThreadInit) -- (ReceivePfring) Using PF_RING
v.4.7.1, interface eth2, cluster-id 99</font>
<br><font size=2 face="sans-serif">[13388] 3/8/2011 -- 16:25:24 - (source-pfring.c:232)
<Error> (ReceivePfring) -- [ERRCODE: SC_ERR_PF_RING_RECV(31)] - pfring_recv
error -1</font>
<br><font size=2 face="sans-serif">[13388] 3/8/2011 -- 16:25:24 - (source-pfring.c:332)
<Info> (ReceivePfringThreadExitStats) -- (ReceivePfring) Packets
0, bytes 0</font>
<br><font size=2 face="sans-serif">[13388] 3/8/2011 -- 16:25:24 - (source-pfring.c:336)
<Info> (ReceivePfringThreadExitStats) -- (ReceivePfring) Pfring Total:0
Recv:0 Drop:0 (nan%).</font>
<br><font size=2 face="sans-serif">[13354] 3/8/2011 -- 16:25:24 - (tm-threads.c:1400)
<Info> (TmThreadRestartThread) -- thread "ReceivePfring"
restarted</font>
<br><font size=2 face="sans-serif">[13389] 3/8/2011 -- 16:25:24 - (source-pfring.c:313)
<Info> (ReceivePfringThreadInit) -- (ReceivePfring) Using PF_RING
v.4.7.1, interface eth2, cluster-id 99</font>
<br><font size=2 face="sans-serif">[13389] 3/8/2011 -- 16:25:24 - (source-pfring.c:232)
<Error> (ReceivePfring) -- [ERRCODE: SC_ERR_PF_RING_RECV(31)] - pfring_recv
error -1</font>
<br><font size=2 face="sans-serif">[13389] 3/8/2011 -- 16:25:24 - (source-pfring.c:332)
<Info> (ReceivePfringThreadExitStats) -- (ReceivePfring) Packets
0, bytes 0</font>
<br><font size=2 face="sans-serif">[13389] 3/8/2011 -- 16:25:24 - (source-pfring.c:336)
<Info> (ReceivePfringThreadExitStats) -- (ReceivePfring) Pfring Total:0
Recv:0 Drop:0 (nan%).</font>
<br><font size=2 face="sans-serif">[13354] 3/8/2011 -- 16:25:24 - (tm-threads.c:1400)
<Info> (TmThreadRestartThread) -- thread "ReceivePfring"
restarted</font>
<br><font size=2 face="sans-serif">[13390] 3/8/2011 -- 16:25:24 - (source-pfring.c:313)
<Info> (ReceivePfringThreadInit) -- (ReceivePfring) Using PF_RING
v.4.7.1, interface eth2, cluster-id 99</font>
<br><font size=2 face="sans-serif">[13390] 3/8/2011 -- 16:25:24 - (source-pfring.c:232)
<Error> (ReceivePfring) -- [ERRCODE: SC_ERR_PF_RING_RECV(31)] - pfring_recv
error -1</font>
<br><font size=2 face="sans-serif">[13390] 3/8/2011 -- 16:25:24 - (source-pfring.c:332)
<Info> (ReceivePfringThreadExitStats) -- (ReceivePfring) Packets
0, bytes 0</font>
<br><font size=2 face="sans-serif">[13390] 3/8/2011 -- 16:25:24 - (source-pfring.c:336)
<Info> (ReceivePfringThreadExitStats) -- (ReceivePfring) Pfring Total:0
Recv:0 Drop:0 (nan%).</font>
<br><font size=2 face="sans-serif">[13354] 3/8/2011 -- 16:25:24 - (tm-threads.c:1400)
<Info> (TmThreadRestartThread) -- thread "ReceivePfring"
restarted</font>
<br><font size=2 face="sans-serif">[13391] 3/8/2011 -- 16:25:24 - (source-pfring.c:313)
<Info> (ReceivePfringThreadInit) -- (ReceivePfring) Using PF_RING
v.4.7.1, interface eth2, cluster-id 99</font>
<br><font size=2 face="sans-serif">[13391] 3/8/2011 -- 16:25:24 - (source-pfring.c:232)
<Error> (ReceivePfring) -- [ERRCODE: SC_ERR_PF_RING_RECV(31)] - pfring_recv
error -1</font>
<br><font size=2 face="sans-serif">[13391] 3/8/2011 -- 16:25:24 - (source-pfring.c:332)
<Info> (ReceivePfringThreadExitStats) -- (ReceivePfring) Packets
0, bytes 0</font>
<br><font size=2 face="sans-serif">[13391] 3/8/2011 -- 16:25:24 - (source-pfring.c:336)
<Info> (ReceivePfringThreadExitStats) -- (ReceivePfring) Pfring Total:0
Recv:0 Drop:0 (nan%).</font>
<br><font size=2 face="sans-serif">[13354] 3/8/2011 -- 16:25:24 - (tm-threads.c:1400)
<Info> (TmThreadRestartThread) -- thread "ReceivePfring"
restarted</font>
<br><font size=2 face="sans-serif">[13392] 3/8/2011 -- 16:25:24 - (source-pfring.c:313)
<Info> (ReceivePfringThreadInit) -- (ReceivePfring) Using PF_RING
v.4.7.1, interface eth2, cluster-id 99</font>
<br><font size=2 face="sans-serif">[13392] 3/8/2011 -- 16:25:24 - (source-pfring.c:232)
<Error> (ReceivePfring) -- [ERRCODE: SC_ERR_PF_RING_RECV(31)] - pfring_recv
error -1</font>
<br><font size=2 face="sans-serif">[13392] 3/8/2011 -- 16:25:24 - (source-pfring.c:332)
<Info> (ReceivePfringThreadExitStats) -- (ReceivePfring) Packets
0, bytes 0</font>
<br><font size=2 face="sans-serif">[13392] 3/8/2011 -- 16:25:24 - (source-pfring.c:336)
<Info> (ReceivePfringThreadExitStats) -- (ReceivePfring) Pfring Total:0
Recv:0 Drop:0 (nan%).</font>
<br><font size=2 face="sans-serif">[13354] 3/8/2011 -- 16:25:24 - (tm-threads.c:1400)
<Info> (TmThreadRestartThread) -- thread "ReceivePfring"
restarted</font>
<br><font size=2 face="sans-serif">[13393] 3/8/2011 -- 16:25:25 - (source-pfring.c:313)
<Info> (ReceivePfringThreadInit) -- (ReceivePfring) Using PF_RING
v.4.7.1, interface eth2, cluster-id 99</font>
<br><font size=2 face="sans-serif">[13393] 3/8/2011 -- 16:25:25 - (source-pfring.c:232)
<Error> (ReceivePfring) -- [ERRCODE: SC_ERR_PF_RING_RECV(31)] - pfring_recv
error -1</font>
<br><font size=2 face="sans-serif">[13393] 3/8/2011 -- 16:25:25 - (source-pfring.c:332)
<Info> (ReceivePfringThreadExitStats) -- (ReceivePfring) Packets
0, bytes 0</font>
<br><font size=2 face="sans-serif">[13393] 3/8/2011 -- 16:25:25 - (source-pfring.c:336)
<Info> (ReceivePfringThreadExitStats) -- (ReceivePfring) Pfring Total:0
Recv:0 Drop:0 (nan%).</font>
<br><font size=2 face="sans-serif">[13354] 3/8/2011 -- 16:25:25 - (tm-threads.c:1400)
<Info> (TmThreadRestartThread) -- thread "ReceivePfring"
restarted</font>
<br><font size=2 face="sans-serif">[13395] 3/8/2011 -- 16:25:25 - (source-pfring.c:307)
<Error> (ReceivePfringThreadInit) -- [ERRCODE: SC_ERR_PF_RING_SET_CLUSTER_FAILED(37)]
- pfring_set_cluster returned -1 for cluster-id: 99</font>
<br><font size=2 face="sans-serif">[13354] 3/8/2011 -- 16:25:25 - (suricata.c:1363)
<Info> (main) -- signal received</font>
<br><font size=2 face="sans-serif">[13354] 3/8/2011 -- 16:25:25 - (suricata.c:1414)
<Info> (main) -- time elapsed 3s</font>
<br><font size=2 face="sans-serif">[13384] 3/8/2011 -- 16:25:25 - (flow.c:1142)
<Info> (FlowManagerThread) -- 0 new flows, 0 established flows were
timed out, 0 flows in closed state</font>
<br><font size=2 face="sans-serif">[13354] 3/8/2011 -- 16:25:25 - (stream-tcp-reassemble.c:352)
<Info> (StreamTcpReassembleFree) -- Max memuse of the stream reassembly
engine 11220864 (in use 0)</font>
<br><font size=2 face="sans-serif">[13354] 3/8/2011 -- 16:25:25 - (stream-tcp.c:495)
<Info> (StreamTcpFreeConfig) -- Max memuse of stream engine 4063232
(in use 0)</font>
<br><font size=2 face="sans-serif">[13354] 3/8/2011 -- 16:25:26 - (detect.c:3403)
<Info> (SigAddressCleanupStage1) -- cleaning up signature grouping
structure... complete</font>
<br>
<br><font size=2 face="sans-serif">I am running PF_RING 4.7.1 ($Revision:
4753$) and Suricata version 1.1beta2.</font>
<br>
<br><font size=2 face="sans-serif">PF_RING seems to be installed OK and
I can run the pfcount program just fine:</font>
<br>
<br><font size=2 face="sans-serif"># cat /proc/net/pf_ring/info </font>
<br><font size=2 face="sans-serif">PF_RING Version : 4.7.1
($Revision: 4753$)</font>
<br><font size=2 face="sans-serif">Ring slots
: 4096</font>
<br><font size=2 face="sans-serif">Slot version :
13</font>
<br><font size=2 face="sans-serif">Capture TX
: Yes [RX+TX]</font>
<br><font size=2 face="sans-serif">IP Defragment :
No</font>
<br><font size=2 face="sans-serif">Socket Mode
: Standard</font>
<br><font size=2 face="sans-serif">Transparent mode : Yes
(mode 0)</font>
<br><font size=2 face="sans-serif">Total rings
: 0</font>
<br><font size=2 face="sans-serif">Total plugins :
0</font>
<br>
<br>
<br><font size=2 face="sans-serif"># ./pfcount -i eth2</font>
<br><font size=2 face="sans-serif">Using PF_RING v.4.7.1</font>
<br><font size=2 face="sans-serif">Capturing from eth2 [00:1B:78:31:F1:A4]</font>
<br><font size=2 face="sans-serif"># Device RX channels: 1</font>
<br><font size=2 face="sans-serif"># Polling threads: 1</font>
<br><font size=2 face="sans-serif">=========================</font>
<br><font size=2 face="sans-serif">Absolute Stats: [49859 pkts rcvd][0
pkts dropped]</font>
<br><font size=2 face="sans-serif">Total Pkts=49859/Dropped=0.0 %</font>
<br><font size=2 face="sans-serif">49'859 pkts - 28'713'541 bytes</font>
<br><font size=2 face="sans-serif">=========================</font>
<br>
<br><font size=2 face="sans-serif">=========================</font>
<br><font size=2 face="sans-serif">Absolute Stats: [102158 pkts rcvd][0
pkts dropped]</font>
<br><font size=2 face="sans-serif">Total Pkts=102158/Dropped=0.0 %</font>
<br><font size=2 face="sans-serif">102'158 pkts - 59'531'866 bytes [101'959.38
pkt/sec - 475.33 Mbit/sec]</font>
<br><font size=2 face="sans-serif">=========================</font>
<br><font size=2 face="sans-serif">Actual Stats: 52299 pkts [1'001.94 ms][52'197.37
pkt/sec]</font>
<br><font size=2 face="sans-serif">=========================</font>
<br>
<br>
<br><font size=2 face="sans-serif">Any ideas?</font>
<br>
<br><font size=2 face="sans-serif">Thanks.</font>
<br>
<br><font size=2 face="sans-serif">-David</font>
<br>
<br>