PR 1098: "struct ipovly" notpacked.
Jay Monkman
jtm at smoothsmoothie.com
Tue Jul 11 17:43:18 UTC 2006
ray wrote:
> In fact, the PR works for the ARM board.
> And the __attribute__((packed)) do really convert the 32bit load/store instruction to 2 16bit load/store instruction(or 4 8bit load/store).
> The struct may seems well format, but after packing and copying, the head point of tcpiphdr is not 32bit aligned, which may cause data access abort. And in the new version of BSD, the mal-aligned members (ti_next, ti_prev) have gone.
Are you saying that your tcpiphdr structs are not aligned? They should be. Are
you looking at outgoing or incoming packets?
I suspect you're seeing this for received packets because you are aligning the
ethernet header. In that case, stop it. When you write the received packet into
the buffer, do it so that the start of the IP packet is aligned. That means the
ethernet header will be misaligned, but that's unimportant.
More information about the users
mailing list