lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] Ang: Re: Ang: Re: Bare Metal / Memory Alignment


From: ake . forslund
Subject: [lwip-users] Ang: Re: Ang: Re: Bare Metal / Memory Alignment
Date: Wed, 7 Sep 2011 22:54:15 +0200

I seems like I've misinterpreted something once again =) Now that I look for it I see that an array of u8_t's are inserted in the eth_header struct.

My compiler hints for structure packing should however be functional for the compiler shipped with Keil uVision 3.x (and probably for the 4.x aswell) as long as there are no partially packed structs...

/Åke
-----------------------------
Åke Forslund
0433-273296
NIBE AB
Box 14
S-285 21 Markaryd
Tel +46-(0)433-273296


address@hidden skrev: -----
Till: Mailing list for lwIP users <address@hidden>
Från: Simon Goldschmidt
Sänt av: address@hidden
Datum: 2011-09-07 22:31
Ärende: Re: [lwip-users] Ang: Re: Bare Metal / Memory Alignment

Kieran Mansley <address@hidden> wrote:

>
> On 7 Sep 2011, at 16:59, address@hidden wrote:
>
>> I recently got the impression that structure-packing wasn't mandatory and could be replaced with padding, I'm not at all sure about this
>
> I think structure packing is the only sensible way of ensuring you get correct behaviour.

>
Most protocol headers happen to be aligned correctly for 32-bit processors if you insert 2 bytes before the Ethernet header. However, that's not supported by us, currently. So if it works, it does so by chance... If you get it to work without packing, you're lucky enough, but I doubt that it has too big of an influence on throughput, as many header members are only read once.

Simon
_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users

reply via email to

[Prev in Thread] Current Thread [Next in Thread]