>> 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 mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
