On Fri, 2008-10-10 at 07:21 -0400, Ed Sutter wrote: > Ok, I am running with the BF537, I'll take a look at that setting. > However, it still seems to me that this is a problem in the code > because the combination of... > > 1. MEM_ALIGNMENT = 4 > 2. pbuf_alloc() setting payload buffers up to be aligned based on > MEM_ALIGNMENT > 3. the increment of the payload pointer by 14 in ethernet_input() > and... > 4. the overlay of the "helper" structure in > ip_reass_chain_frag_into_datagram_and_validate() > > will cause the misaligned access. If the option you mention fixes it for my > situation on the BF537, that doesn't resolve it for other systems. > Right?
Including a 2-byte offset at the start of an ethernet frame in order to align the IP and TCP headers is pretty common, so it should work for other systems too. Documenting this need in the above circumstance would be handy. As would making a check that the alignment requirements of the overlaid helper structure are met. I'm surprised that we got that far though - you would think that accesses to the IP header would have had the same problem in your case. Kieran _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
