[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [lwip-users] IP Address Display Functions
From: |
Bill Auerbach |
Subject: |
RE: [lwip-users] IP Address Display Functions |
Date: |
Tue, 25 Aug 2009 14:01:07 -0400 |
>> Why can't we have a single "packed" attribute at the end of the struct
>>instead of using it each time at the field level?
>
>Different compilers have different syntaxes for declaring packing. That
>is why we have the PACK_STRUCT_STRUCT and PACK_STRUCT_FIELD macros.
Also, I see a *huge* difference in performance with packing by 2 versus 1
which we do in many if not all ports.
AFAIK (and from running for 4 months this way), packing by 2 is sufficient.
It allows a compiler to do word loads instead of 2 byte loads forming the
words when it thinks an alignment issue might exist. I use UDP and TCP in
RAW mode so I cannot comment on whether this change would be universal or
not. As packing is done for headers, I see no case where word alignment
isn't sufficient - our macros handle the byte field of headers explicitly.
Bill
- [lwip-users] Possible deadlock in LWIP 1.3.1 RC1, Eran Rundstein, 2009/08/23
- Re: [lwip-users] Possible deadlock in LWIP 1.3.1 RC1, Kieran Mansley, 2009/08/24
- RE: [lwip-users] IP Address Display Functions, Kieran Mansley, 2009/08/25
- RE: [lwip-users] IP Address Display Functions, Kieran Mansley, 2009/08/25
- RE: [lwip-users] IP Address Display Functions, Kieran Mansley, 2009/08/25
- [lwip-users] Re: IP Address Display Functions, Jakob Stoklund Olesen, 2009/08/25
- RE: [lwip-users] Re: IP Address Display Functions, Bill Auerbach, 2009/08/25
- Re: [lwip-users] Re: IP Address Display Functions, address@hidden, 2009/08/25
- Re: [lwip-users] Re: IP Address Display Functions, address@hidden, 2009/08/25
- RE: [lwip-users] Re: IP Address Display Functions, Bill Auerbach, 2009/08/26
Re: [lwip-users] Possible deadlock in LWIP 1.3.1 RC1, Eran Rundstein, 2009/08/24
Re: [lwip-users] Possible deadlock in LWIP 1.3.1 RC1, address@hidden, 2009/08/24