Subject: hw ip4csum-tx bug on ex(4)? (Re: RTL8169 hw IP4CSUM_Tx workaround)
To: None <tech-kern@NetBSD.org, tech-net@NetBSD.org>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: tech-kern
Date: 11/04/2006 21:47:48
I wrote:

> yamt@mwd.biglobe.ne.jp wrote:
> 
> > btw, i vaguely remember the bug in question is only triggered with
> > very small packets like ip header + a few octets.
> > ie. the threshold is not ETHER_MIN_LEN.
> 
> Finally I've managed to confirm this value today
> (well, I was hit by many other bugs when I tried to do this :-/),

BTW, does anyone see the similar hardware ip4csum-tx problem
with short IP packets on ex(4)?

On my ex(4):
---
ex0 at pci1 dev 4 function 0: 3Com 3c980C-TXM 10/100 Ethernet (rev. 0x78)
ex0: interrupting at int B
ex0: MAC address 00:01:03:ce:74:48
bmtphy0 at ex0 phy 24: Broadcom 3c905C internal PHY, rev. 7
---
"tcpdump -vn | grep 'bad cksum'"  on the destination host
during "ping -f -s 1473 desthost" on ex(4) host complains:

---
# tcpdump -vn | grep 'bad cksum'
tcpdump: listening on tlp0, link-type EN10MB (Ethernet), capture size 96 bytes
21:31:23.282784 IP (tos 0x0, ttl 255, id 8113, offset 1480, flags [none], length: 21, bad cksum f2ff (->f1ff)!) 192.168.20.17 > 192.168.20.28: icmp
21:31:23.305993 IP (tos 0x0, ttl 255, id 8114, offset 1480, flags [none], length: 21, bad cksum f2fe (->f1fe)!) 192.168.20.17 > 192.168.20.28: icmp
21:31:23.325984 IP (tos 0x0, ttl 255, id 8115, offset 1480, flags [none], length: 21, bad cksum f2fd (->f1fd)!) 192.168.20.17 > 192.168.20.28: icmp
21:31:23.326425 IP (tos 0x0, ttl 255, id 8116, offset 1480, flags [none], length: 21, bad cksum f2fc (->f1fc)!) 192.168.20.17 > 192.168.20.28: icmp
21:31:23.345965 IP (tos 0x0, ttl 255, id 8117, offset 1480, flags [none], length: 21, bad cksum f2fb (->f1fb)!) 192.168.20.17 > 192.168.20.28: icmp
 :
---
(not all packets cause this problem though)

This doesn't happen after "ifconfig ex0 -ip4csum".

I wonder if my previous change against elinkxl.c was wrong...
---
Izumi Tsutsui