|
| From: | Bill Auerbach |
| Subject: | [lwip-devel] [bug #27352] Change ip_addr from struct to typedef (u32_t) |
| Date: | Fri, 29 Jan 2010 13:54:41 +0000 |
| User-agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7 (.NET CLR 3.5.30729) |
Follow-up Comment #7, bug #27352 (project lwip):
When I looked into this, I noticed that all references to an ip_addr within a
payload are within a packet and so it works out to be 32-bit aligned. I am
running on an alignment required processor with the following:
struct ip_addr {
u32_t addr;
};
There is no alignment or packing specified in this struct which makes it
equivalent to replacing it with u32_t. I'm using TCP and UDP. One compiler
for sure (GCC) handles this much more efficiently - it will load a 32-bit word
- otherwise with packing specified it loads 4 bytes ANDing shifting and ORing
into the address.
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?27352>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
| [Prev in Thread] | Current Thread | [Next in Thread] |