Subject: kern/16070: gsip(4) suffering from FIFO underruns
To: None <gnats-bugs@gnats.netbsd.org>
From: Matthias Scheler <tron@colwyn.zhadum.de>
List: netbsd-bugs
Date: 03/26/2002 19:25:21
>Number:         16070
>Category:       kern
>Synopsis:       gsip(4) suffering from FIFO underruns
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 26 10:26:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        NetBSD 1.5ZC 2002-03-22 sources
>Organization:
Matthias Scheler                                  http://scheler.de/~matthias/
>Environment:
System: NetBSD colwyn.zhadum.de 1.5ZC NetBSD 1.5ZC (COLWYN) #2: Fri Mar 22 22:47:20 CET 2002 tron@colwyn.zhadum.de:/src/sys/compile/COLWYN i386
Architecture: i386
Machine: i386

>Description:
I've got a D-Link DGE500TX in a Celeron 1.1GHZ system with a BX chipset
motherboard:

NetBSD 1.5ZC (COLWYN) #2: Fri Mar 22 22:47:20 CET 2002
    tron@colwyn.zhadum.de:/src/sys/compile/COLWYN
cpu0: Intel Pentium III (Coppermine) Celeron (686-class), 1102.54 MHz
cpu0: I-cache 16 KB 32b/line 4-way, D-cache 16 KB 32b/line 2-way
cpu0: L2 cache 128 KB 32b/line 4-way
cpu0: features 383f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR>
cpu0: features 383f9ff<PGE,MCA,CMOV,FGPAT,PSE36,MMX>
cpu0: features 383f9ff<FXSR,SSE>
total memory = 511 MB
avail memory = 470 MB
using 6144 buffers containing 26292 KB of memory
BIOS32 rev. 0 found at 0xf06c0
mainbus0 (root)
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
pchb0 at pci0 dev 0 function 0
pchb0: Intel 82443BX Host Bridge/Controller (rev. 0x03)
agp0 at pchb0: aperture at 0xe4000000, size 0x4000000
ppb0 at pci0 dev 1 function 0: Intel 82443BX AGP Interface (rev. 0x03)
pci1 at ppb0 bus 1
pci1: i/o space, memory space enabled
vga1 at pci1 dev 0 function 0: Matrox MGA G400 AGP (rev. 0x03)
wsdisplay0 at vga1 kbdmux 1: console (80x25, vt100 emulation)
wsmux1: connecting to wsdisplay0
pcib0 at pci0 dev 4 function 0
pcib0: Intel 82371AB PCI-to-ISA Bridge (PIIX4) (rev. 0x02)
pciide0 at pci0 dev 4 function 1: Intel 82371AB IDE controller (PIIX4) (rev. 0x01)
pciide0: bus-master DMA support present
pciide0: primary channel wired to compatibility mode
wd0 at pciide0 channel 0 drive 0: <IBM-DJNA-352030>
wd0: drive supports 16-sector PIO transfers, LBA addressing
wd0: 19470 MB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 39876480 sectors
wd0: 32-bit data port
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 4 (Ultra/66)
pciide0: primary channel interrupting at irq 14
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2 (Ultra/33) (using DMA data transfers)
pciide0: secondary channel wired to compatibility mode
pciide0: disabling secondary channel (no drives)
uhci0 at pci0 dev 4 function 2: Intel 82371AB USB Host Controller (PIIX4) (rev. 0x01)
uhci0: interrupting at irq 9
usb0 at uhci0: USB revision 1.0
uhub0 at usb0
uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
Intel 82371AB Power Management Controller (PIIX4) (miscellaneous bridge, revision 0x02) at pci0 dev 4 function 3 not configured
pciide1 at pci0 dev 7 function 0: CMD Technology PCI0648 (rev. 0x01)
pciide1: bus-master DMA support present
pciide1: primary channel configured to native-PCI mode
pciide1: using irq 10 for native-PCI interrupt
wd1 at pciide1 channel 0 drive 0: <IC35L040AVER07-0>
wd1: drive supports 16-sector PIO transfers, LBA addressing
wd1: 39266 MB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 80418240 sectors
wd1: 32-bit data port
wd1: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
wd1(pciide1:0:0): using PIO mode 4, Ultra-DMA mode 4 (Ultra/66) (using DMA data transfers)
pciide1: secondary channel configured to native-PCI mode
wd2 at pciide1 channel 1 drive 0: <IC35L040AVER07-0>
wd2: drive supports 16-sector PIO transfers, LBA addressing
wd2: 39266 MB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 80418240 sectors
wd2: 32-bit data port
wd2: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
wd2(pciide1:1:0): using PIO mode 4, Ultra-DMA mode 4 (Ultra/66) (using DMA data transfers)
isic0 at pci0 dev 9 function 0: Fritz!Card
isic0: interrupting at irq 9
isic0: ISAC 2085 Version A1/A2 or 2086/2186 Version 1.1 (IOM-2)
BRI 0 at isic0: some isic card
eap0 at pci0 dev 10 function 0: Ensoniq AudioPCI (rev. 0x01)
eap0: interrupting at irq 12
audio0 at eap0: full duplex, mmap, independent
midi0 at eap0: AudioPCI MIDI UART
ppb1 at pci0 dev 11 function 0: IBM 82351 PCI-PCI Bridge (rev. 0x01)
pci2 at ppb1 bus 2
pci2: i/o space, memory space enabled, rd/line, wr/inv ok
tl0 at pci2 dev 0 function 0
tl0: Compaq Dual Port Netelligent 10/100 TX
tl0: Ethernet address 00:08:c7:5d:66:80
tl0: interrupting at irq 10
nsphy0 at tl0 phy 1: DP83840 10/100 media interface, rev. 1
nsphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
tlphy0 at tl0 phy 31: ThunderLAN 10BASE-T media interface, rev. 5
tlphy0: 10base5
tl1 at pci2 dev 1 function 0
tl1: Compaq Dual Port Netelligent 10/100 TX
tl1: Ethernet address 00:08:c7:5d:66:00
tl1: interrupting at irq 12
nsphy1 at tl1 phy 1: DP83840 10/100 media interface, rev. 1
nsphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
tlphy1 at tl1 phy 31: ThunderLAN 10BASE-T media interface, rev. 5
tlphy1: 10base5
siop0 at pci0 dev 12 function 0: Symbios Logic 53c875 (ultra-wide scsi)
siop0: using on-board RAM
siop0: interrupting at irq 11
scsibus0 at siop0: 16 targets, 8 luns per target
gsip0 at pci0 dev 13 function 0: NatSemi DP83820 Gigabit Ethernet
gsip0: interrupting at irq 9
gsip0: Ethernet address 00:50:ba:38:97:be
gphyter0 at gsip0 phy 1: DP83861 1000BASE-T media interface, rev. 2
gphyter0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
gphyter0: strapped to slave mode, pre-C5 BCM5400 compat enabled
isa0 at pcib0
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
pckbc0 at isa0 port 0x60-0x64
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
ast0 at isa0 port 0x1a0-0x1bf irq 5
com2 at ast0 slave 0: ns16550a, working fifo
com3 at ast0 slave 1: ns16550a, working fifo
com4 at ast0 slave 2: ns16550a, working fifo
com5 at ast0 slave 3: ns16550a, working fifo
lpt0 at isa0 port 0x378-0x37b irq 7
pcppi0 at isa0 port 0x61
sysbeep0 at pcppi0
npx0 at isa0 port 0xf0-0xff: using exception 16
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB, 80 cyl, 2 head, 18 sec
apm0 at mainbus0: Power Management spec V1.2
biomask ef45 netmask ff45 ttymask ffc7
scsibus0: waiting 2 seconds for devices to settle...
cd0 at scsibus0 target 2 lun 0: <PIONEER, DVD-ROM DVD-303, 1.09> SCSI2 5/cdrom removable
cd0: sync (50.0ns offset 8), 8-bit (20.000MB/s) transfers
st0 at scsibus0 target 4 lun 0: <SONY, SDT-9000, 0400> SCSI2 1/sequential removable
st0: drive empty
st0: sync (100.0ns offset 15), 8-bit (10.000MB/s) transfers
Kernelized RAIDframe activated
cd0: no disk label
IPsec: Initialized Security Association Processing.
uhub1 at uhub0 port 2
uhub1: ALCOR Generic USB Hub, class 9/0, rev 1.10/1.00, addr 2
uhub1: 4 ports with 4 removable, self powered
boot device: wd0
root on wd0a dumps on wd0b
root file system type: ffs
IP Filter: v3.4.25 initialized.  Default = pass all, Logging = enabled
wsdisplay0: screen 1 added (80x25, vt100 emulation)
wsdisplay0: screen 2 added (80x25, vt100 emulation)
wsdisplay0: screen 3 added (80x25, vt100 emulation)
wsdisplay0: screen 4 added (80x25, vt100 emulation)
wsdisplay0: screen 5 added (80x25, vt100 emulation)
wsdisplay0: screen 6 added (80x25, vt100 emulation)
wsdisplay0: screen 7 added (80x25, vt100 emulation)
in6_ifattach: irip0 is not multicast capable, IPv6 not enabled
in6_ifattach: irip0 is not multicast capable, IPv6 not enabled
in6_ifattach: irip0 is not multicast capable, IPv6 not enabled
i4b: bri 0, assigned TEI = 125 = 0x7d
ippp0: pap failure
i4b-L2 isdn_layer2_status_ind: bri 0, persistent deactivation!
i4b-L3 i4b_mdl_status_ind: STI_PDEACT: bri 0 TEI = 0 = 0x00
IP Filter: v3.4.25 unloaded
IP Filter: v3.4.25 initialized.  Default = pass all, Logging = enabled

The gigabit card work without any problem in 100MBit/Sec mode but as soon
as I try to use gigabit I get lots and lots of FIFO underruns:

gsip0: transmit FIFO underrun; increasing Tx drain threshold to 544 bytes
gsip0: transmit FIFO underrun; increasing Tx drain threshold to 576 bytes
gsip0: transmit FIFO underrun; increasing Tx drain threshold to 608 bytes
gsip0: transmit FIFO underrun; increasing Tx drain threshold to 640 bytes
gsip0: transmit FIFO underrun; increasing Tx drain threshold to 672 bytes
gsip0: transmit FIFO underrun; increasing Tx drain threshold to 704 bytes
gsip0: transmit FIFO underrun; increasing Tx drain threshold to 736 bytes
gsip0: transmit FIFO underrun; increasing Tx drain threshold to 768 bytes
gsip0: transmit FIFO underrun; increasing Tx drain threshold to 800 bytes
gsip0: transmit FIFO underrun; increasing Tx drain threshold to 832 bytes
gsip0: transmit FIFO underrun; increasing Tx drain threshold to 864 bytes
gsip0: transmit FIFO underrun; increasing Tx drain threshold to 896 bytes
gsip0: transmit FIFO underrun; increasing Tx drain threshold to 928 bytes
gsip0: transmit FIFO underrun; increasing Tx drain threshold to 960 bytes
gsip0: transmit FIFO underrun; increasing Tx drain threshold to 992 bytes
gsip0: transmit FIFO underrun; increasing Tx drain threshold to 1024 bytes
gsip0: transmit FIFO underrun; increasing Tx drain threshold to 1056 bytes
gsip0: transmit FIFO underrun; increasing Tx drain threshold to 1088 bytes
gsip0: transmit FIFO underrun; increasing Tx drain threshold to 1120 bytes
gsip0: transmit FIFO underrun; increasing Tx drain threshold to 1152 bytes
gsip0: transmit FIFO underrun; increasing Tx drain threshold to 1184 bytes
gsip0: transmit FIFO underrun; increasing Tx drain threshold to 1216 bytes
gsip0: transmit FIFO underrun; increasing Tx drain threshold to 1248 bytes
gsip0: transmit FIFO underrun; increasing Tx drain threshold to 1280 bytes
gsip0: transmit FIFO underrun; increasing Tx drain threshold to 1312 bytes
gsip0: transmit FIFO underrun; increasing Tx drain threshold to 1344 bytes
gsip0: transmit FIFO underrun; increasing Tx drain threshold to 1376 bytes
gsip0: transmit FIFO underrun; increasing Tx drain threshold to 1408 bytes
gsip0: transmit FIFO underrun; increasing Tx drain threshold to 1440 bytes
gsip0: transmit FIFO underrun; increasing Tx drain threshold to 1472 bytes

The come very fast initially and get unfrequent with increased
threshold values. The remote system, another NetBSD box with a D-Link
DGE500TX but a faster CPU (PIV Northwood 2.0GHZ), doesn't suffer any
FIFO underruns. When I tried that a few weeks ago with between a P3
700MHz and exactly the Celeron mentioned above it was the P3 where the
underruns happened. My guess would be that gsip(4) has some kind of
flow control problem which causes this.

>How-To-Repeat:
Try to use NFS/FTP or run "ttcp".

>Fix:
Sorry, I don't know. Perhaps use a bigger default if the card is not
running in 64Bit or 66MHz mode.

>Release-Note:
>Audit-Trail:
>Unformatted: