[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] RE: [lwip] netif alignment
From: |
Wurmsdobler, Peter |
Subject: |
[lwip-users] RE: [lwip] netif alignment |
Date: |
Wed, 08 Jan 2003 23:22:48 -0000 |
Hello,
> And doesn't it in your case ?
No.
> ... Do you need it aligned and unless
> you change the layout of the struct it can't access some fields?
> That's weird.
Yes, it is. I was debugging for half a day, because I did not expect
to be there. Then I printed the address of the netif structure, and
the contents of the function pointer. In the assembler code I could
see that to the address of the structure an offset of 24 was added,
fwipif->input (p, fwipif);
590: d1 0a mov.l 5bc <_ip1394ip_input+0x5c>,r1 ! 0x0
592: 65 12 mov.l @r1,r5
594: 50 56 mov.l @(24,r5),r0 <--here !
596: 40 0b jsr @r0
598: 64 23 mov r2,r4
even though the offset to the input function in the structure is 23.
Rearranging the structure to be at least 16bit aligend and it worked.
It this is a valid explanation, I do not know, but now it works and
I have a ping time of 1ms !
peter
[This message was sent through the lwip discussion list.]
- [lwip-users] RE: [lwip] netif alignment,
Wurmsdobler, Peter <=