Date: Tue, 24 Aug 2004 16:57:05 -0700 From: "Li, Qing" <qing.li@bluecoat.com> To: "Mike Bristow" <mike@urgle.com>, <freebsd-current@freebsd.org> Subject: RE: IPv4 checksum oddness (gcc compiler bug?) Message-ID: <00CDF9AA240E204FA6E923BD35BC6436063B074A@bcs-mail.internal.cacheflow.com>
next in thread | raw e-mail | index | archive | help
I ran into a checksum problem and filed the following bug report. See if it's related. http://www.freebsd.org/cgi/query-pr.cgi?pr=3D69257 >Category: i386 >Responsible: freebsd-i386 >Synopsis: in_cksum_hdr is non-functional without -O compiler flag >Arrival-Date: Sun Jul 18 23:10:10 GMT 2004 -- Qing > -----Original Message----- > From: owner-freebsd-current@freebsd.org=20 > [mailto:owner-freebsd-current@freebsd.org] On Behalf Of Mike Bristow > Sent: Tuesday, August 24, 2004 2:53 PM > To: freebsd-current@freebsd.org > Subject: IPv4 checksum oddness (gcc compiler bug?) >=20 >=20 > Hi, >=20 > I've been suffering from really horrid (~60-70%) packet loss=20 > for a while, but only with IPv4. >=20 > I've spent some time thinking I had a hardware problem, as it=20 > started at the same time as changed some networking bits but=20 > it doesn't appear to be the case: older (5.2.1) version of=20 > FreeBSD don't have this problem. >=20 > I've just cvsuped to RELENG_5 box (cvsup'ed with tag=3DRELENG_5=20 > date=3D2004.08.24.00.00.00), and with the attached patch I see=20 > many entries like in my logs: >=20 > csum calc discrepancy:=20 > 45:10:00:64:b0:22:40:00:40:06:98:95:50:b1:28:36:50:b1:28:34 > csum calc discrepancy:=20 > 45:10:00:84:b0:23:40:00:40:06:98:74:50:b1:28:36:50:b1:28:34 >=20 > However, my patch is obviously wrong. =20 >=20 > The only thing that I can think of that might possibly be the=20 > cause is a compiler optimization bug - but I'm not sure that=20 > that's the case, either. My make.conf is boring=20 > (http://www.urgle.com/~mike/make.conf > if you want to see its dullness). I can't believe that this is > a real problem, rather than an artifact of my stupidity,=20 > because if it was a real problem everyone with old PIIs would=20 > be screaming > the place down. =20 >=20 > Has anyone any ideas as to how to debug this? =20 >=20 > The kernel is GENERIC; possibly interesting other facts include: >=20 > hw.model: Pentium II/Pentium II Xeon/Celeron > hw.ncpu: 2 > vr0: flags=3D8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 > inet 80.177.40.52 netmask 0xfffffff0 broadcast 80.177.40.63 > inet6 fe80::280:c8ff:feea:8041%vr0 prefixlen 64 scopeid 0x1 > inet6 2002:50b1:2836:1:280:c8ff:feea:8041 prefixlen=20 > 64 autoconf > ether 00:80:c8:ea:80:41 > media: Ethernet autoselect (100baseTX <full-duplex>) > status: active >=20 >=20 > --- ip_input.c.orig Tue Aug 24 22:24:45 2004 > +++ ip_input.c Tue Aug 24 22:24:45 2004 > @@ -366,6 +366,14 @@ > } else { > if (hlen =3D=3D sizeof(struct ip)) { > sum =3D in_cksum_hdr(ip); > + if (sum) { > + u_short sumchk; > + sumchk =3D in_cksum(m, hlen); > + if (!sumchk) { > + printf("csum calc=20 > discrepancy: %20D\n", (u_char *)ip, ":"); > + sum =3D 0; > + } > + } > } else { > sum =3D in_cksum(m, hlen); > } >=20 >=20 > --=20 > You dont have to be illiterate to use the Internet, but it=20 > help's. _______________________________________________ > freebsd-current@freebsd.org mailing list=20 > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to=20 > "freebsd-current-unsubscribe@freebsd.org" >=20
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?00CDF9AA240E204FA6E923BD35BC6436063B074A>