lwIP - A Lightweight TCP/IP stack - Bugs: bug #50097, Disabling struct packing should be...
You are not allowed to post comments on this tracker with your current authentication level.
bug #50097: Disabling struct packing should be official
Submitter: | Daniel Elstner <danielk> | ||
Submitted: | Thu 19 Jan 2017 07:33:20 PM UTC | ||
Category: | Documentation | Severity: | 3 - Normal |
Item Group: | Feature Request | Status: | Wont Fix |
Privacy: | Public | Assigned to: | None |
Open/Closed: | Closed | Planned Release: | None |
lwIP version: | git head |
Jump to the original submission
Tue 02 Jan 2018 06:59:26 AM UTC, comment #9: |
Simon Goldschmidt <goldsimon> |
Thu 26 Jan 2017 02:39:04 PM UTC, comment #8: I agree this does not work for PPP RX! |
Simon Goldschmidt <goldsimon> |
Thu 26 Jan 2017 01:49:43 PM UTC, comment #7:
|
Sylvain Rochet <gradator> |
Thu 26 Jan 2017 01:08:35 PM UTC, comment #6: The check of the link header length should catch that. |
Daniel Elstner <danielk> |
Thu 26 Jan 2017 12:47:12 PM UTC, comment #5: I'm not against that, but at least pleeeeeease add a #error statement if struct packing is disabled and PPP or SLIP or anything else that isn't Ethernet is enabled :-)
|
Sylvain Rochet <gradator> |
Thu 26 Jan 2017 12:35:17 PM UTC, comment #4: Yes, I know that it is about alignment. The struct size check was intended to verify that the compiler did not insert any alignment padding. If you say that's guaranteed up-front, then the problem becomes smaller.
|
Daniel Elstner <danielk> |
Wed 25 Jan 2017 07:37:26 PM UTC, comment #3: Struct size is not really the problem: most of the structs are OK without packing. We use "packed" as "unaligned" rather. And in fact, the code bloat you saw comes from "unaligned", too. I'm not so concerned about struct layout but about getting aligned pointers.
|
Simon Goldschmidt <goldsimon> |
Wed 25 Jan 2017 11:30:43 AM UTC, comment #2: Hm, one way would be to use static assertions to verify the size of structs in the proto headers. E.g. have something like this:
|
Daniel Elstner <danielk> |
Wed 25 Jan 2017 11:14:20 AM UTC, comment #1: I do think it would be good if lwIP works without struct packing. However, if this was "official", we would kind of guarantee it works. Now you have proven it works for you, but personally, I cannot test this to work.
|
Simon Goldschmidt <goldsimon> |
Thu 19 Jan 2017 07:33:20 PM UTC, original submission:
My project is based on the AVR32 UC3C microcontroller, which does not support unaligned access. For packed structs, the compiler has to assume byte alignment and thus generates code that does single byte reads/writes and combines them to 32-bit words using logic operations.
|
Daniel Elstner <danielk> |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 2 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2018-01-02 | goldsimon | Status | None | Wont Fix | |
Open/Closed | Open | Closed |
Powered by Savane 3.13-3230.
Corresponding source code
I think this has too many options to fail in the future to make it officially supported. We have enough work without this already ;-)
This doesn't mean I wouldn't take patches to keep this working, but I'm not willing to add work for this myself.