Hi all,

Current verson of http://lwip.wikia.com/wiki/Porting_for_an_OS#cc.h page
containts a statement regarding structure packing:
"The common case is using Ethernet interfaces and MEM_ALIGNMENT=4. Ethernet 
header without VLAN is 14 bytes, so if you can/must have ETH_PAD_SIZE=2, then 
IP headers and higher layers are 4 bytes aligned and you may not need packing !"
It's wrong ! You need structure fields to be packed at least ! Of
course, there are may be exceptions like in my case, where my
processor is arm cortex-m3 and compiler is gcc. It didn't align
structure fields, so packing isn't required. But this is not general case.
Correct me if I'm wrong. Otherwise wiki must be corrected.

Regards,
Artem Pisarenko


_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to