lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] wrong statement in lwip wiki page about structurepackin


From: jblackarty
Subject: Re: [lwip-users] wrong statement in lwip wiki page about structurepacking
Date: Wed, 29 Aug 2012 19:52:36 +0700

I think we must define a term for "lwip context packing" :) That
phrase on wiki may be corrected to "you may not need whole structure
alignment" instead of "you may not need packing", because structure packing is
mostly refer to structure members packing (removing pads) which is
essential for lwip.

> This is not our case for LwIP, IP/UDP/TCP fields are already packed.
Why it's not our case ??? IP/UDP/TCP fields contain 16bit fields which
will be likely padded on 32-bit platforms. Setting MEM_ALIGNMENT=4
and ETH_PAD_SIZE=2 will only guarantee whole structure alignment. But
internal members will not match protocol fields in payload data.




reply via email to

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