From: Antonio Quartulli <[email protected]> Date: Sat, 3 Nov 2012 19:48:26 +0100
> The current unicast packet type does not contain the orig source address. This > patches add a new unicast packet (called UNICAST_4ADDR) which provides two new > fields: the originator source address and the subtype (the type of the data > contained in the packet payload). The former is useful to identify the node > which injected the packet into the network and the latter is useful to avoid > creating new unicast packet types in the future: a macro defining a new > subtype > will be enough. > > Signed-off-by: Antonio Quartulli <[email protected]> Your packet layouts are very poorly designed and I want you to stop and think seriously about things before extending things further. All of this __packed stuff is a serious problem. It means that on RISC system, fields such as your 32-bit sequence number, will be read and written using byte loads and stores. This is terrible. Instead, design the structures so that they are full filled out to at least 4 byte boundaries, so that they and the contents after them, are 4 byte aligned too. Then you won't need to mark all of your packet header structs with __packed, and therefore the compiler can use full 32-bit loads and stores to access 32-bit fields. I'm not applying this series, sorry, it just continues a major problem that the batman-adv code already has.
