>Behalf Of [email protected]
>Sent: Friday, February 05, 2010 9:43 AM
>
>Yes, but aside from etharp (needs struct ip_addr2),  IP frag/reass and
>netbios, wouldn't packing by 4 work for you as well? As long as the IP
>header of TX- and RX-packets is aligned, it *should* work, I think. My
>problem is I currently cannot test it - I'd have to dig out my last
>embedded platform that doesn't support unaligned pointers as Intel
>unfortunately does...

I think it would work since I have ETH_PAD_SIZE = 2.  But I think it would not 
work generally.  Packing by 2 should work on all platforms and it does help, 
because the compiler has the option to load 2 16-bit words with one shift 
instead of 4 byte loads with 3 shifts and ORs.  GCC is pretty darn good and 
does do the former with packing of 2.

Bill




_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to