netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
To: Joe Perches <joe@perches.com>
Cc: David S Miller <davem@redhat.com>, netdev@oss.sgi.com
Subject: Re: [IPX]: Fix checksum computation.
Date: Fri, 31 Oct 2003 19:56:52 -0200	[thread overview]
Message-ID: <20031031215652.GR3705@conectiva.com.br> (raw)
In-Reply-To: <1067637004.11564.98.camel@localhost.localdomain>

Em Fri, Oct 31, 2003 at 01:50:04PM -0800, Joe Perches escreveu:
> On Fri, 2003-10-31 at 13:23, David S. Miller wrote:
> > we're as mystified as you are as to why it is that:
> > 	if (sum & 0x10000) {
> > 		sum++;
> > 		sum &= 0xffff;
> > 	}
> > works while:
> > 	sum = ((sym >> 16) + sum) & 0xffff;
> > does not.  The theory was that it might be some x86 gcc bug,
> > but looking at the assembler diff Arnaldo Carvalho de Melo
> > (the appletalk maintainer) showed me between the before and
> > after:
> >  	xorl	%eax, %eax
> > -	decl	%ecx
> >  	movb	(%ebx), %al
> > -	incl	%ebx
> >  	addl	%eax, %edx
> >  	addl	%edx, %edx
> > -	movl	%edx, %eax
> > -	shrl	$16, %eax
> > -	addl	%edx, %eax
> > -	movzwl	%ax,%edx
> > +	testl	$65536, %edx
> > +	je	.L982
> > +	incl	%edx
> > +	andl	$65535, %edx
> > +.L982:
> > +	decl	%ecx
> > +	incl	%ebx
> >  	cmpl	$-1, %ecx
> > 
> > we still can't see what's wrong.
> > He did confirm that the change in question makes IPX compute checksums
> > correctly.
> 
> If so, something major is WRONG.

I guess so. If people with an Appletalk testbed could try with and without
the patch, that would be great.

> Code all over the place would need this "fix".

Haven't noticed any other place with this problem, but yes, this is something
that may well happen in other code.

> Was an old NG Sniffer being used to verify this?

Nope, MacOS 7.5.5 and 9 just hang when communicating with the machine without
this patch, gcc 3.3.1/2 was used.

> Sniffer had a long term problem with IPX checksums.

I added back the old atalk_checksum from 2.4 and compared the results, not
all were wrong, but some were.
 
> Has the gcc team been contacted?

Nope, feel free to forward this message.

- Arnaldo

  parent reply	other threads:[~2003-10-31 21:56 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200310312006.h9VK62Hh005910@hera.kernel.org>
2003-10-31 21:24 ` [IPX]: Fix checksum computation Joe Perches
2003-10-31 21:23   ` David S. Miller
2003-10-31 21:34     ` Arnaldo Carvalho de Melo
2003-10-31 21:50     ` Joe Perches
2003-10-31 21:53       ` David S. Miller
2003-10-31 22:21         ` Stephen Hemminger
2003-10-31 22:46           ` Arnaldo Carvalho de Melo
2003-11-01  0:25           ` David S. Miller
2003-10-31 21:56       ` Arnaldo Carvalho de Melo [this message]
2003-10-31 23:29     ` Mark Huth
2003-11-01  0:31       ` Joe Perches
2003-11-01  0:31         ` David S. Miller
2003-10-31 21:31   ` Arnaldo Carvalho de Melo
2003-11-01  0:38     ` Stephen Hemminger
2003-11-01  1:13       ` Arnaldo Carvalho de Melo
2003-11-01  1:19         ` Arnaldo Carvalho de Melo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20031031215652.GR3705@conectiva.com.br \
    --to=acme@conectiva.com.br \
    --cc=davem@redhat.com \
    --cc=joe@perches.com \
    --cc=netdev@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).