[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] Re: [lwip] Bug in checksum routine + patch
From: |
Paul Sheer |
Subject: |
[lwip-users] Re: [lwip] Bug in checksum routine + patch |
Date: |
Wed, 08 Jan 2003 23:50:24 -0000 |
On 2002.02.06 18:35 Florian Schulze wrote:
> > I am compiling lwIP for the ARM and I found that the checksum
> > routine produced wrong results. I have taken the NetBSD
> > checksum routine and replaced lwIP's. This works perfectly,
> > although I never did discover the exact problem. This may
> > have just been a compiler bug or an alignment bug *shrug*.
>
> Hi!
>
> I had a similar problem and the fix for me was to not use packed structures
> for
> everything but only the netif/arp.c stuff. I had problems with the checksum
> and
> with the memory system. Maybe your problem is the same?
Can you explain what problems you had with the memory
system? I'd like to double check my setup.
on the ARM the alignment is 4. so even the TCP header would
fail because it contains u16_t everywhere - or am i missing
something?
So my questions are:
*- What is the expected alignment of
lwIP? 4, 2, or 1?
*- In what structures is the alignment
criticle? tcp - obviously, what else
Adam, could you do a careful audit of this? its seems
like quite a criticle problem. What about putting #pragma pack
where necessary, or using gcc __attribute__?
best
PS ARM Atmel port is working - i'll send a patch as soon as i've
ironed out a few problems!!
-paul
Paul Sheer Consulting IT Services . . . Tel . . . +27 21 761 7224
Email . . . address@hidden . . . . . . Pager . . . 088 0057245
Linux development, cryptography, recruitment, support, training
http://www.icon.co.za/~psheer . . . . http://rute.sourceforge.net
L I N U X . . . . . . . . . . . . The Choice of a GNU Generation
[This message was sent through the lwip discussion list.]