[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] Misalignment problems on PowerPC (little endian mode)
From: |
address@hidden |
Subject: |
Re: [lwip-users] Misalignment problems on PowerPC (little endian mode) |
Date: |
Sat, 24 May 2008 12:29:48 +0200 |
User-agent: |
Thunderbird 2.0.0.14 (Macintosh/20080421) |
Hi Ikhwan,
Sorry I didn't answer for so long but I was out of town for quite a while.
I'm glad to hear you solved the problem. Still I cannot understand why
your compiler (or rather its vendor) doesn't support structure packing
which is a rather common element of C (even if it is not included in the
C-standard, or is it?)
I have solved this problem by copying the ip tcp and all the necessary
headers into a separate variable which will be processed during packet
reception. This has removed all my alignment problems.
While this works for you, it is really a workaround:
a) While structure packing is, of course, slower than accessing aligned
data, copying is even slower!
b) You will have to work around this for every new part of the stack as
well as every existing part (I don't know if receiving TCP/IP packets is
the only problem: I imagine sending them wouldn't work as well?)
c) And this is the most critical to me: You will have the same problem
with many third-party ethernet/network/socket software such as
server/client implementations (ftp/http/tftp...) or event industrial
ethernet stacks running on your target (if any).
I have the source which can be compiled if the option
LWIP_MISALIGNMENT is set to 1. If anyone interested and have the same
problem, I am more than willing to share and help. If you guys want to
incorporate it to lwip as alternative solution to structure packing I
am glad I can help. This lowers the stack performance a bit though.
Not to offend you, but personally, I see this as a bug in the compiler
you are using and we don't support broken compilers: structure packing
_is_ a must for lwIP!
Hope you are still having fun with lwIP!
Simon
- [lwip-users] Misalignment problems on PowerPC (little endian mode), Muhamad Ikhwan Ismail, 2008/05/09
- RE: [lwip-users] Misalignment problems on PowerPC (little endian mode), Bill Auerbach, 2008/05/09
- Re: [lwip-users] Misalignment problems on PowerPC (little endian mode), address@hidden, 2008/05/09
- RE: [lwip-users] Misalignment problems on PowerPC (little endian mode), Muhamad Ikhwan Ismail, 2008/05/09
- Re: [lwip-users] Misalignment problems on PowerPC (little endian mode), address@hidden, 2008/05/09
- RE: [lwip-users] Misalignment problems on PowerPC (little endian mode), Muhamad Ikhwan Ismail, 2008/05/10
- RE: [lwip-users] Misalignment problems on PowerPC (little endian mode), Bill Auerbach, 2008/05/12
- RE: [lwip-users] Misalignment problems on PowerPC (little endian mode), Muhamad Ikhwan Ismail, 2008/05/12
- RE: [lwip-users] Misalignment problems on PowerPC (little endian mode), Muhamad Ikhwan Ismail, 2008/05/13
- RE: [lwip-users] Misalignment problems on PowerPC (little endian mode), Muhamad Ikhwan Ismail, 2008/05/20
- Re: [lwip-users] Misalignment problems on PowerPC (little endian mode),
address@hidden <=
- Re: [lwip-users] Misalignment problems on PowerPC (little endian mode), Rishi Khan, 2008/05/24
- Re: [lwip-users] Misalignment problems on PowerPC (little endian mode), Jonathan Larmour, 2008/05/25
- Re: [lwip-users] Misalignment problems on PowerPC (little endian mode), Rishi Khan, 2008/05/25
- Re: [lwip-users] Misalignment problems on PowerPC (little endian mode), Jonathan Larmour, 2008/05/27
- RE: [lwip-users] Misalignment problems on PowerPC (little endian mode), Muhamad Ikhwan Ismail, 2008/05/24
- Re: [lwip-users] Misalignment problems on PowerPC (little endian mode), address@hidden, 2008/05/24
- Re: [lwip-users] Misalignment problems on PowerPC (little endian mode), Alain M., 2008/05/24
- Re: [lwip-users] Misalignment problems on PowerPC (little endian mode), Timmy Brolin, 2008/05/24
- RE: [lwip-users] Misalignment problems on PowerPC (little endian mode), Muhamad Ikhwan Ismail, 2008/05/25
- Re: [lwip-users] Misalignment problems on PowerPC (little endian mode), Timmy Brolin, 2008/05/25