I am attempting to leverage the PF_RING library with a Napatech NIC. When
attempting to run example code (userland/examples/pcount) from PF_RING a
seg fault occurs. I am able to successfully run this example code with any
other NIC. This only happens on the Napatech device. I am able to use
tcpdump with the Napatech NIC. What am I doing wrong?
This is what I see when I execute the example code (after enabling some
additional debug info).
$ sudo ./pcount -i nt0
Capturing from nt0
[PF_RING] Attempting to pfring_open(nt0)
[PF_RING] pfring_open: device_name=nt0
[PF_RING] pfring_open: found module nt
This is the stack trace that I can see with GDB.
$ sudo gdb ./pcount
…
(gdb) run -i nt0
Starting program: /home/nick/PF_RING/userland/examples/pcount -i nt0
[Thread debugging using libthread_db enabled]
Capturing from nt0
[PF_RING] Attempting to pfring_open(nt0)
[PF_RING] pfring_open: device_name=nt0
[PF_RING] pfring_open: found module nt
[New Thread 0x7ffff4953700 (LWP 22292)]
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff52a3565 in __strstr_sse42 () from /lib64/libc.so.6
Missing separate debuginfos, use: debuginfo-install
glibc-2.12-1.149.el6_6.9.x86_64 numactl-2.0.9-2.el6.x86_64
(gdb) bt
#0 0x00007ffff52a3565 in __strstr_sse42 () from /lib64/libc.so.6
#1 0x00000000004436e4 in pfring_nt_open ()
#2 0x0000000000428ed4 in pfring_open ()
#3 0x000000000040e473 in pcap_activate_linux (handle=0x68a4a0) at
./pcap-linux.c:1316
#4 0x000000000040f849 in pcap_activate (p=0x68a4a0) at ./pcap.c:732
#5 0x00000000004102d0 in pcap_open_live (source=0x689920 "nt0",
snaplen=256, promisc=1, to_ms=500,
errbuf=0x7fffffffe4e0 "\210\341\377\367\377\177") at ./pcap.c:786
#6 0x0000000000409109 in main ()
These are the commands I run to compile PF_RING to work with the Napatech
device.
$ cd PF_RING/kernel
$ make
$ sudo insmod pf_ring.ko
$ cd ../userland/lib
$ ./configure --enable-nt
$ make
$ cd ../libpcap
$ ./configure
$ make
$ cd ../examples
$ make
$ sudo ./pfcount -i nt:0
Any tips or tricks would be much appreciated.
Cheers
--
Nick Allen <[email protected]>
_______________________________________________
Ntop-misc mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop-misc