|
From: | ake . forslund |
Subject: | [lwip-users] Ang: Re: Ang: Re: Bare Metal / Memory Alignment |
Date: | Wed, 7 Sep 2011 22:54:15 +0200 |
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
[Prev in Thread] | Current Thread | [Next in Thread] |