Hi Simon,
I agree totally with you, its rather a surprise for me since Wind River
provides one
of the best compiler for PowerPC. I am working with one of their field appl.
engineer to
solve the problem. But for me till then I have to go on with the solution I
have since fixing the alignment
takes longer then copying the buffer itself. If I could use it on PowerPC on
big endian mode,
I wouldnt have the problem at all since it can fix the alignment problem.
But still im just offering the solution to people who might be interested and
has the same
problem with me. If not as permanent, as a temporary solution since it can be
turned off during
compilation using the define macro.
Greetings
Ikhwan
> Date: Sat, 24 May 2008 12:29:48 +0200> From: [EMAIL PROTECTED]> To:
> [email protected]> Subject: Re: [lwip-users] Misalignment problems on
> PowerPC (little endian mode)> > > 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 mailing list>
> [email protected]> http://lists.nongnu.org/mailman/listinfo/lwip-users
_________________________________________________________________
E-mail for the greater good. Join the i’m Initiative from Microsoft.
http://im.live.com/Messenger/IM/Join/Default.aspx?source=EML_WL_ GreaterGood
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users