Hey all,
We have been attempting to troubleshoot an issue with the interface
hanging when using PF_RING with the TNAPI driver.
Everything in /var/log/messages appears as normal:
---SNIP---
kernel: [ 2113.940087] igb 0000:06:00.1: PCI INTB disabled
kernel: [ 2114.030088] igb 0000:06:00.0: PCI INTA disabled
Kernel: [ 2124.021606] Intel(R) Gigabit Ethernet Network Driver -
version 1.3.19.3
kernel: [ 2124.021610] Copyright (c) 2007-2008 Intel Corporation.
kernel: [ 2124.021664] igb 0000:06:00.0: PCI INT A -> GSI 32 (level,
low) -> IRQ 32
kernel: [ 2124.021861] igb: 0000:06:00.0: igb_validate_option: Interrupt
Mode set to 3
kernel: [ 2124.253167] igb: eth1: igb_probe: Intel(R) Gigabit Ethernet
Network Connection
kernel: [ 2124.253172] igb: eth1: igb_probe: (PCIe:2.5Gb/s:Width x4)
00:1b:21:37:a7:74
kernel: [ 2124.253176] igb: eth1: igb_probe: Using MSI-X interrupts. 4
rx queue(s), 4 tx queue(s)
kernel: [ 2124.253196] igb 0000:06:00.1: PCI INT B -> GSI 32 (level,
low) -> IRQ 32
kernel: [ 2124.483177] igb: eth2: igb_probe: Intel(R) Gigabit Ethernet
Network Connection
kernel: [ 2124.483181] igb: eth2: igb_probe: (PCIe:2.5Gb/s:Width x4)
00:1b:21:37:a7:75
kernel: [ 2124.483185] igb: eth2: igb_probe: Using MSI-X interrupts. 1
rx queue(s), 1 tx queue(s)
kernel: [ 2124.483212] igb-TNAPI - (C) 2006-09 ntop.org
kernel: [ 2289.222725] TNAPI: configure_tnapi
kernel: [ 2289.222729] TNAPI: init_tnapi(eth1)
kernel: [ 2289.222732] ---- TNAPI: eth1 added at device slot 0
kernel: [ 2289.222733] TNAPI: init_tnapi num_rx_queues=4
kernel: [ 2289.222815] TNAPI: spawn thread [eth1], 0
kernel: [ 2289.222859] TNAPI: spawn thread [eth1], 1
kernel: [ 2289.222901] TNAPI: spawn thread [eth1], 2
kernel: [ 2289.222938] TNAPI: spawn thread [eth1], 3
kernel: [ 2289.227089] ADDRCONF(NETDEV_UP): eth1: link is not ready
kernel: [ 2289.234889] igb: eth1: igb_watchdog_task: NIC Link is Up 1000
Mbps Full Duplex, Flow Control: None
kernel: [ 2289.237885] ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
kernel: [ 2342.011141] [PF_RING] successfully allocated 1454080 bytes
at 0xffffc200040e2000
kernel: [ 2342.011146] [PF_RING] allocated 4106 slots
[slot_len=354][tot_mem=1454080]
kernel: [ 2342.011629] device eth1 entered promiscuous mode
kernel: [ 2352.873183] device eth1 left promiscuous mode
kernel: [ 2352.901278] [PF_RING] removed /proc/net/pf_ring/5125-eth1.29
---SNIP---
However, when we are running any libpcap application it only captures
traffic for a few seconds and then the interface locks and sees no
further traffic until the network driver (IGB) is unloaded and reloaded
through rmmod and insmod. Below is an example of the interface hanging
with the supplied pcount utility:
[r...@danzig]# /usr/src/PF_RING/userland/examples/pcount -i e...@1
Capturing from e...@1
=========================
Absolute Stats: [1204 pkts rcvd][0 pkts dropped]
Total Pkts=1204/Dropped=0.0 %
1204 pkts [1204.3 pkt/sec] - 531703 bytes [4.25 Mbit/sec]
=========================
=========================
Absolute Stats: [2408 pkts rcvd][0 pkts dropped]
Total Pkts=2408/Dropped=0.0 %
1204 pkts [602.0 pkt/sec] - 531703 bytes [2.13 Mbit/sec]
=========================
Actual Stats: 2408 pkts [1000.1 ms][2407.7 pkt/sec]
=========================
=========================
Absolute Stats: [3612 pkts rcvd][0 pkts dropped]
Total Pkts=3612/Dropped=0.0 %
1204 pkts [401.3 pkt/sec] - 531703 bytes [1.42 Mbit/sec]
=========================
Actual Stats: 1204 pkts [1000.0 ms][1203.9 pkt/sec]
=========================
=========================
Absolute Stats: [4816 pkts rcvd][0 pkts dropped]
Total Pkts=4816/Dropped=0.0 %
1204 pkts [301.0 pkt/sec] - 531703 bytes [1.06 Mbit/sec]
=========================
Actual Stats: 1204 pkts [1000.0 ms][1203.9 pkt/sec]
=========================
=========================
Absolute Stats: [6020 pkts rcvd][0 pkts dropped]
Total Pkts=6020/Dropped=0.0 %
1204 pkts [240.8 pkt/sec] - 531703 bytes [0.85 Mbit/sec]
=========================
Actual Stats: 1204 pkts [1000.0 ms][1203.9 pkt/sec]
=========================
<control-c>
You may note that the "Absolute Stats" and "Total pkts" continues to increment,
but the last line does not for number of packets or bytes. It also does appear to be odd that this
happens immediately after receiving 1024 packets so some buffer may not be getting flushed? This
appears to happen for any libpcap application so we are thinking the issue may reside within the
igb TNAPI driver or PF_RING. Any insight would be much appreciated.
-- Eoin
_______________________________________________
Ntop-dev mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop-dev