Subject: kern/29978: tlp driver bad performance (transmit underrun) especially ANA-6944A
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <tino@wildenhain.de>
List: netbsd-bugs
Date: 04/15/2005 11:13:00
>Number:         29978
>Category:       kern
>Synopsis:       tlp driver bad performance (transmit underrun) especially ANA-6944A
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Apr 15 11:13:00 +0000 2005
>Originator:     Tino Wildenhain
>Release:        NetBSD 3.0_BETA
>Organization:
>Environment:
NetBSD fw.bln.thecampus.de 3.0_BETA NetBSD 3.0_BETA (FW_IDE) #0: Fri Apr 15 08:29:48 UTC 2005  root@fw.bln.thecampus.de:/usr/src/sys/arch/i386/compile/FW_IDE i386
>Description:
after boot, beginning use of the network interfaces causes
these messages:
tlp0: transmit underrun; new threshold: 96/256 bytes
tlp0: transmit underrun; new threshold: 128/512 bytes
tlp0: transmit underrun; new threshold: 160/1024 bytes

this is immediately after few packets, ttcp measures
about 5MB/s

after some MB of traffic:
tlp0: transmit underrun; new threshold: store and forward mode

now performance drops to around 4MB/s

I compared with linux2.6.8 on that hardware, where 
no problem appears in the log (may depend on the
driver) and performance is around 8-9MB/s
>How-To-Repeat:
dmesg output:

tlp0 at pci2 dev 4 function 0: DECchip 21140A Ethernet, pass 2.2
tlp0: interrupting at irq 5
tlp0: Adaptec ANA-6944A, Ethernet address 00:00:d1:1f:09:54
nsphy0 at tlp0 phy 1: DP83840 10/100 media interface, rev. 1
nsphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
tlp1 at pci2 dev 5 function 0: DECchip 21140A Ethernet, pass 2.2
tlp1: sharing interrupt with tlp0
tlp1: Adaptec ANA-6944A, Ethernet address 00:00:d1:1f:09:55
nsphy1 at tlp1 phy 1: DP83840 10/100 media interface, rev. 1
nsphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
tlp2 at pci2 dev 6 function 0: DECchip 21140A Ethernet, pass 2.2
tlp2: sharing interrupt with tlp0
tlp2: Adaptec ANA-6944A, Ethernet address 00:00:d1:1f:09:56
nsphy2 at tlp2 phy 1: DP83840 10/100 media interface, rev. 1
nsphy2: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
tlp3 at pci2 dev 7 function 0: DECchip 21140A Ethernet, pass 2.2
tlp3: sharing interrupt with tlp0
tlp3: Adaptec ANA-6944A, Ethernet address 00:00:d1:1f:09:57
nsphy3 at tlp3 phy 1: DP83840 10/100 media interface, rev. 1
nsphy3: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto

NB: "dribbling bits" were noticed with other tlp-cards
as well.
>Fix:
may be ideas can be ripped from linux driver?