[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [lwip-users] IP Address Display Functions
From: |
Kieran Mansley |
Subject: |
RE: [lwip-users] IP Address Display Functions |
Date: |
Thu, 03 Sep 2009 12:59:42 +0100 |
On Tue, 2009-08-25 at 14:01 -0400, Bill Auerbach wrote:
> >> 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.
I find it interesting that this makes a difference. If both work, then
the structures must be suitably packed in both cases. If there is a
performance difference then the compiler must be accessing the fields
differently I suppose. I.e. it sounds to me like your compiler is
reading more into packed directives than it needs to (perhaps to make
things simpler for it): it is affecting both the packing of the
structure and the way it accesses the fields in that structure.
Kieran
- RE: [lwip-users] IP Address Display Functions,
Kieran Mansley <=