[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: XL driver checksum producing corrupted but checksum-correct packets (fwd)



On Sat, 24 Jan 2004, Sam Smith wrote:
> This below issue from Dillon with Free/DFBSD seems to also
> affect OpenBSD's XL driver for the 3C905B card at 100Mb full
> duplex (at 10/half it's slow but correct). I'm getting
> silent data corruption on large (200MB to 1GB) FTP downloads
> -- file sizes are the same, md5 checksums of the files
> aren't. SCP downloads abort with checksum errors. 
> It is very repeatable (I can't get a correct download at
> 100/full).
> 
> This is a fresh install from yesterday's snapshot. (ifconfig
> output, dmesg at the bottom along with netstat -p tcp and
> scanpci -v output).
> 
> Anyone got any ideas on turning off hardware checksums or
> fixing this?  Google/list archives weren't helpful.

The below patch seems to fix the problem; although I'm not
sure why, as hardware checksums still seem to be enabled.
Anyone?

Index: sys/dev/ic/xl.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/xl.c,v
retrieving revision 1.51
diff -u -r1.51 xl.c
--- sys/dev/ic/xl.c	21 Oct 2003 18:58:50 -0000	1.51
+++ sys/dev/ic/xl.c	24 Jan 2004 20:13:37 -0000
@@ -1309,7 +1309,7 @@
 #endif
 
 		if (sc->xl_type == XL_TYPE_905B) {
-			if (rxstat & XL_RXSTAT_IPCKERR)
+		/*	if (rxstat & XL_RXSTAT_IPCKERR)
 				sumflags |= M_IPV4_CSUM_IN_BAD;
 			else if (rxstat & XL_RXSTAT_IPCKOK)
 				sumflags |= M_IPV4_CSUM_IN_OK;
@@ -1323,7 +1323,7 @@
 				sumflags |= M_UDP_CSUM_IN_BAD;
 			else if (rxstat & XL_RXSTAT_UDPCKOK)
 				sumflags |= M_UDP_CSUM_IN_OK;
-
+*/
 			m->m_pkthdr.csum = sumflags;
 		}
 		ether_input_mbuf(ifp, m);
@@ -2681,8 +2681,8 @@
 	ifp->if_output = ether_output;
 	if (sc->xl_type == XL_TYPE_905B) {
 		ifp->if_start = xl_start_90xB;
-		ifp->if_capabilities = IFCAP_CSUM_IPv4|IFCAP_CSUM_TCPv4|
-		    IFCAP_CSUM_UDPv4;
+		/* ifp->if_capabilities = IFCAP_CSUM_IPv4|IFCAP_CSUM_TCPv4|
+		    IFCAP_CSUM_UDPv4; */
 	} else
 		ifp->if_start = xl_start;
 	ifp->if_watchdog = xl_watchdog;




ifconfig xl0 output

xl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	address: 00:b0:d0:21:0b:00
	media: Ethernet autoselect (100baseTX full-duplex)
	status: active
	inet 130.88.34.46 netmask 0xffffff00 broadcast 130.88.34.255
	inet6 fe80::2b0:d0ff:fe21:b00%xl0 prefixlen 64 scopeid 0x1


dmesg:

OpenBSD 3.4-current (GENERIC) #1: Sat Jan 24 19:52:44 GMT 2004
    msfssss3_(_at_)_undercount_(_dot_)_ccsr_(_dot_)_ac_(_dot_)_uk:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Intel Pentium III ("GenuineIntel" 686-class, 512KB L2 cache) 499 MHz
cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SIMD
real mem  = 133808128 (130672K)
avail mem = 117960704 (115196K)
using 1659 buffers containing 6795264 bytes (6636K) of memory
mainbus0 (root)
bios0 at mainbus0: AT/286+(00) BIOS, date 08/01/01, BIOS32 rev. 0 @ 0xffe90
apm0 at bios0: Power Management spec V1.2
apm0: AC on, battery charge unknown
pcibios0 at bios0: rev. 2.1 @ 0xf0000/0x10000
pcibios0: PCI IRQ Routing Table rev. 1.0 @ 0xfc670/128 (6 entries)
pcibios0: PCI Interrupt Router at 000:07:0 ("Intel 82371AB PIIX4 ISA" rev 0x00)
pcibios0: PCI bus #1 is the last bus
bios0: ROM list: 0xc0000/0x8000 0xc8000/0x8000
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
pchb0 at pci0 dev 0 function 0 "Intel 82443BX AGP" rev 0x03
ppb0 at pci0 dev 1 function 0 "Intel 82443BX AGP" rev 0x03
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 "ATI Rage Pro" rev 0x5c
wsdisplay0 at vga1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
pcib0 at pci0 dev 7 function 0 "Intel 82371AB PIIX4 ISA" rev 0x02
pciide0 at pci0 dev 7 function 1 "Intel 82371AB IDE" rev 0x01: DMA, channel 0 wired to compatibility, channel 1 wired to compatibility
wd0 at pciide0 channel 0 drive 0: <IC35L120AVV207-0>
wd0: 16-sector PIO, LBA48, 117800MB, 241254720 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2
atapiscsi0 at pciide0 channel 1 drive 0
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0: <SAMSUNG, CD-ROM SC-140F, fn10> SCSI0 5/cdrom removable
cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2
uhci0 at pci0 dev 7 function 2 "Intel 82371AB USB" rev 0x01: irq 11
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 Mgmt" rev 0x02 at pci0 dev 7 function 3 not configured
xl0 at pci0 dev 17 function 0 "3Com 3c905B 100Base-TX" rev 0x24: irq 11 address 00:b0:d0:21:0b:00
exphy0 at xl0 phy 24: 3Com internal media interface
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: <PC speaker>
sysbeep0 at pcppi0
lpt0 at isa0 port 0x378/4 irq 7
npx0 at isa0 port 0xf0/16: using exception 16
pccom0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
pccom1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
isapnp0 at isa0 port 0x279: read port 0x203
wss1 at isapnp0 "CS4236B, CSC0000, , WSS/SB" port 0x534/4,0x388/4,0x220/16 irq 5 drq 1,0: CS4236/CS4236B (vers 0)
audio0 at wss1
joy0 at isapnp0 "CS4236B, CSC000F, , Game" port 0x3a0/8
"CS4236B, CSC0010, , Ctrl" at isapnp0 port 0xf00/8 not configured
"CS4236B, CSC0003, , MPU" at isapnp0 port 0x330/2 not configured
biomask c840 netmask c840 ttymask c8c2
pctr: 686-class user-level performance counters enabled
mtrr: Pentium Pro MTRR support
dkcsum: wd0 matched BIOS disk 80
root on wd0a
rootdev=0x0 rrootdev=0x300 rawdev=0x302




tcp:
	1275010 packets sent
		3373 data packets (522992 bytes)
		1 data packet (128 bytes) retransmitted
		2 fast retransmitted packets
		795264 ack-only packets (876062 delayed)
		0 URG only packets
		0 window probe packets
		476320 window update packets
		52 control packets
		0 packets hardware-checksummed
	1676598 packets received
		3044 acks (for 518632 bytes)
		39 duplicate acks
		0 acks for unsent data
		1610932 packets (2319206493 bytes) received in-sequence
		0 completely duplicate packets (0 bytes)
		0 old duplicate packets
		0 packets with some duplicate data (0 bytes duplicated)
		55824 out-of-order packets (80725992 bytes)
		0 packets (0 bytes) of data after window
		0 window probes
		8 window update packets
		0 packets received after close
		7574 discarded for bad checksums
		0 discarded for bad header offset fields
		0 discarded because packet too short
		0 discarded for missing IPsec protection
		0 packets hardware-checksummed
		0 bad/missing md5 checksums
		0 good md5 checksums
	26 connection requests
	5 connection accepts
	29 connections established (including accepts)
	35 connections closed (including 0 drops)
	2 embryonic connections dropped
	3068 segments updated rtt (of 2861 attempts)
	1 retransmit timeout
		0 connections dropped by rexmit timeout
	0 persist timeouts
	0 keepalive timeouts
		0 keepalive probes sent
		0 connections dropped by keepalive
	702 correct ACK header predictions
	1609971 correct data packet header predictions
	25 PCB cache misses
	0 ECN connections accepted
		0 ECE packets received
		0 CWR packets received
		0 CE packets received
		0 ECT packets sent
		0 ECE packets sent
		0 CWR packets sent
			cwr by fastrecovery: 2
			cwr by timeout: 1
			cwr by ecn: 0
	0 bad connection attempts
	5 SYN cache entries added
		0 hash collisions
		5 completed
		0 aborted (no space to build PCB)
		0 timed out
		0 dropped due to overflow
		0 dropped due to bucket overflow
		0 dropped due to RST
		0 dropped due to ICMP unreachable
	0 SYN,ACKs retransmitted
	0 duplicate SYNs received for entries already in the cache
	0 SYNs dropped (no route or no space)