lwip-users
[Top][All Lists]
Advanced

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

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


From: Simon Goldschmidt
Subject: Re: [lwip-users] Ang: Re: Bare Metal / Memory Alignment
Date: Wed, 7 Sep 2011 22:35:03 +0200

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


reply via email to

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