This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Re: Can't Connect,TCP CHECKSUM INCORRECT


Please also make sure that you have "CYGPKG_HAL_MIPS_MSBFIRST" set for
your big-endian target. And it will be better to remove all the code
changes you made while debugging the ARP issue earlier.  

-Alok

-----Original Message-----
From: ecos-discuss-owner@ecos.sourceware.org
[mailto:ecos-discuss-owner@ecos.sourceware.org] On Behalf Of Grant
Edwards
Sent: Tuesday, October 30, 2007 9:47 AM
To: ecos-discuss@sources.redhat.com
Subject: [ECOS] Re: Can't Connect,TCP CHECKSUM INCORRECT

On 2007-10-30, ariga masahiro <ariga@link-lab.co.jp> wrote:

> I traced TCP checksum routine,and I am not sure they are correct.

Oh please.

The BSD IP checksum routines have been used in hundreds of
different OSes and network stacks for _decades_.  They're
probably some of the most scrutinized routines on the planet.
They've been tested, examined, reviewed, and tuned by hundreds
of different people.

They are correct.

They are the de-fact _definition_ of what an IP checksum is.
They are the gold standard, the platinum sphere, the be-all and
end-all of IP checksum routines.

It took me _weeks_ of blood, sweat, and tears (not to mention
help from some other people far smarter than I) to come up with
an ARM assembly language routine that could match the
C-language BSD IP checksum routines in execution time.

The BSD routines work for everbody on the flippin' planet
except you, and you think your code is OK, and the BSD routines
are broken?  [Damn, to be young again...]

There's something wrong with your code.  

Really.

Trust me.

One thing you learn after a decade or two is that it's not the
compiler, it's not the library code, it's not the processor,
it's not the linker, it's _your_ code that's broken.  

Except for that one time out of a thousand when it isn't.

But this isn't one of those times.

-- 
Grant Edwards                   grante             Yow!  BARBARA
STANWYCK
                                  at               makes me nervous!!
                               visi.com            


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss




--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]