lwIP - A Lightweight TCP/IP stack - Patches: patch #8882, Vector improvements
You are not allowed to post comments on this tracker with your current authentication level.
patch #8882: Vector improvements
Submitter: | Joel Cunningham <jcunningham> | ||
Submitted: | Thu 21 Jan 2016 09:51:32 PM UTC | ||
Category: | sockets/netconn | Priority: | 5 - Normal |
Status: | Done | Privacy: | Public |
Assigned to: | jcunningham | Open/Closed: | Closed |
Planned Release: | 2.1.0 |
Jump to the original submission
Fri 03 Mar 2017 11:29:09 AM UTC, comment #51: |
Simon Goldschmidt <goldsimon> |
Thu 02 Mar 2017 11:58:19 PM UTC, comment #50: Actually, I re-read the comment history here and realized that there was no feedback on the sendmsg tests. I've reverted the commit so I can get some feedback. I think they are useful, especially for any devs wanting to test out sendmsg functionality |
Joel Cunningham <jcunningham> |
Thu 02 Mar 2017 10:59:32 PM UTC, comment #49: Vector patch committed in 2980f7cc58ec4c6f1a16eb74802b213a063b08f3
|
Joel Cunningham <jcunningham> |
Thu 02 Mar 2017 04:21:25 PM UTC, comment #48: Yes, I to master. Why don't you just push it there and we can think about the conversion/assert/mpu problems later...
|
Simon Goldschmidt <goldsimon> |
Thu 02 Mar 2017 04:15:08 PM UTC, comment #47: Simon,
|
Joel Cunningham <jcunningham> |
Tue 28 Feb 2017 10:51:06 PM UTC, comment #46:
|
Joel Cunningham <jcunningham> |
Tue 28 Feb 2017 08:36:33 PM UTC, comment #45: I'd just have to re-think the planned release. Maybe this would be better off in 2.1.0 to give us some time to test it... |
Simon Goldschmidt <goldsimon> |
Tue 28 Feb 2017 08:34:43 PM UTC, comment #44: As to the binary compatibility of an external struct: we don't we just compare size and offsets of the two structs using LWIP_ASSERT? Somewhere in an init function where it's only done once. Like 'lwip_init()'.
|
Simon Goldschmidt <goldsimon> |
Tue 28 Feb 2017 02:40:24 PM UTC, comment #43: Additional thought: do we have an issue with passing pointer to struct netvector in the MPU case?
|
Joel Cunningham <jcunningham> |
Mon 27 Feb 2017 10:10:21 PM UTC, comment #42:
|
Joel Cunningham <jcunningham> |
Mon 27 Feb 2017 09:03:09 PM UTC, comment #41: Having a quick look, the patch seems good. The only thing I'm not certain of is if it's OK to cast 'struct iovec' to the new 'struct netvector'. Especially the "msg.w.vector++" code in lwip_netconn_do_writemore() could go wrong if the (externally defined) struct iovec contained more fields than struct netvector (or was differently aligned).
|
Simon Goldschmidt <goldsimon> |
Mon 27 Feb 2017 05:45:40 PM UTC, comment #40: Attached is two patches:
|
Joel Cunningham <jcunningham> |
Fri 24 Feb 2017 09:55:54 PM UTC, comment #39: Below discussed cleanups committed in 36fa1a97d415410c9d8f1ed350702775829d370b
|
Joel Cunningham <jcunningham> |
Fri 17 Feb 2017 09:33:38 PM UTC, comment #38: You're right, it is unnecessary and could be removed. I kept it because the previous code was doing it to msg.w.len. |
Joel Cunningham <jcunningham> |
Fri 17 Feb 2017 09:26:35 PM UTC, comment #37:
|
Simon Goldschmidt <goldsimon> |
Fri 17 Feb 2017 09:20:31 PM UTC, comment #36: Simon,
|
Joel Cunningham <jcunningham> |
Fri 17 Feb 2017 09:07:24 PM UTC, comment #35: Joel,
|
Simon Goldschmidt <goldsimon> |
Fri 17 Feb 2017 07:41:17 PM UTC, comment #34: Simon,
|
Joel Cunningham <jcunningham> |
Fri 17 Feb 2017 05:35:16 AM UTC, comment #33: Without reading the code, I guess it's OK to move the member. |
Simon Goldschmidt <goldsimon> |
Fri 17 Feb 2017 12:51:18 AM UTC, comment #32: As I was working on updating my old patch, I was studying lwip_netconn_do_writemore() and one thing that is curious is why write_offset is a member of struct netconn and not struct api_msg (under the "w" union).
|
Joel Cunningham <jcunningham> |
Thu 09 Feb 2017 03:15:21 PM UTC, comment #31: I'll work on an updated patchset with this approach and we can examine the overhead |
Joel Cunningham <jcunningham> |
Thu 09 Feb 2017 07:12:10 AM UTC, comment #30: Good that we waited so long. By now I'm with you that the two code paths should be the same ;-) But let's watch out the overhead stays small enough.
|
Simon Goldschmidt <goldsimon> |
Wed 08 Feb 2017 10:12:17 PM UTC, comment #29: Sounds good! From where we left off, there wasn't a conclusion on the way to represent a set of vectors as they move down the stack (sockets -> netconn -> TCP).
|
Joel Cunningham <jcunningham> |
Wed 08 Feb 2017 09:22:03 PM UTC, comment #28: Now that 2.0.1 is out (for some time), let's work on this again.
|
Simon Goldschmidt <goldsimon> |
Thu 15 Dec 2016 11:14:01 PM UTC, comment #27: I'm fine with delaying until a 2.0.2, thanks for checking! |
Joel Cunningham <jcunningham> |
Thu 15 Dec 2016 11:59:12 AM UTC, comment #26: Joel, can we delay this further? I would want to release 2.0.1 with the bugs fixed up to now before christmas, and I think we need a little more time on this, of only for testing... |
Simon Goldschmidt <goldsimon> |
Tue 29 Nov 2016 03:25:55 PM UTC, comment #25: I think in order to decide on the type to represent our vectors (either a netbuf, pbuf, or struct iovec (original proposal)) we need some longer term direction on how we envision the TCP APIs accepting data.
|
Joel Cunningham <jcunningham> |
Tue 22 Nov 2016 09:09:31 PM UTC, comment #24: I'm really sorry I keep forgetting to answer. I'm just very busy with other (non-lwIP) things lately... :-(
|
Simon Goldschmidt <goldsimon> |
Tue 15 Nov 2016 03:26:26 PM UTC, comment #23: So the last patch that I posted is file #37785 which converts lwip_netconn_do_write() to operate on a netbuf containing a chained pbuf rather than just a data pointer. I think the previous patches were either already accepted (UDP optimization) or were rejected.
|
Joel Cunningham <jcunningham> |
Mon 14 Nov 2016 10:43:51 AM UTC, comment #22: Coming back on this, I think I'll have to read up a bit of the last posts...
|
Simon Goldschmidt <goldsimon> |
Fri 19 Aug 2016 03:47:43 PM UTC, comment #21: Simon,
|
Joel Cunningham <jcunningham> |
Thu 18 Aug 2016 07:54:56 PM UTC, comment #20: Joel, I'm sorry I don't have time for this at the moment. I'm struggeling to find time for lwIP and discussing things with Dirk to get the release done. We'll have to delay discussion on this. |
Simon Goldschmidt <goldsimon> |
Mon 15 Aug 2016 09:27:03 PM UTC, comment #19: Simon,
|
Joel Cunningham <jcunningham> |
Sat 30 Jul 2016 12:42:58 AM UTC, comment #18: So I started working on part 2 (adding TCP support to netconn_send). I came across two issues with trying to use this API for TCP
|
Joel Cunningham <jcunningham> |
Sat 09 Jul 2016 05:55:11 PM UTC, comment #17: I was able to get started on this during the weekend. I've split the work up into a couple of chunks. First is converting lwip_netconn_do_write() to operate in terms of a struct netbuf rather than void * and size. See attached patch. Details of the change are contained in the commit message.
|
Joel Cunningham <jcunningham> |
Thu 07 Jul 2016 10:24:25 PM UTC, comment #16: Going with the netbuf approach + lwip_netconn_do_writemore() and targeting for 2.0.1 sounds good to me :)
|
Joel Cunningham <jcunningham> |
Thu 07 Jul 2016 01:39:52 PM UTC, comment #15:
|
Simon Goldschmidt <goldsimon> |
Thu 07 Jul 2016 01:29:08 PM UTC, comment #14: Simon,
|
Joel Cunningham <jcunningham> |
Thu 07 Jul 2016 12:11:49 PM UTC, comment #13: Sorry for taking so long again.
|
Simon Goldschmidt <goldsimon> |
Mon 20 Jun 2016 02:44:49 PM UTC, comment #12: Simon,
|
Joel Cunningham <jcunningham> |
Mon 14 Mar 2016 01:58:33 PM UTC, comment #11: Sylvain,
|
Joel Cunningham <jcunningham> |
Sat 12 Mar 2016 08:37:10 PM UTC, comment #10: I'm a bit late here, but PPP does not use struct timeval, struct timeval declarations are only present inside features that are not supported :-)
|
Sylvain Rochet <gradator> |
Tue 08 Mar 2016 09:12:49 PM UTC, comment #9: I agree the trade off is having lwip_netconn_do_writemore() perform a couple of extra checks if there are additional vectors in the set and loop around to send the additional vector. In netconn_write_partly, we would do a small amount of extra work to setup a vector of 1.
|
Joel Cunningham <jcunningham> |
Mon 07 Mar 2016 06:54:08 PM UTC, comment #8:
|
Simon Goldschmidt <goldsimon> |
Mon 07 Mar 2016 03:56:05 PM UTC, comment #7: 0002-Optimize-sendmsg-UDP-pbuf-chain-creation.patch submitted in 80cc988f2f27479c6e75cfa986e706382dd47c48
|
Joel Cunningham <jcunningham> |
Mon 07 Mar 2016 09:18:53 AM UTC, comment #6: Looks good. Too bad TCP doesn't accept pbufs. Maybe a way to pass netbufs (ref) into the tcpip_thread/api_msg.c might be a way to do the TCP part... |
Simon Goldschmidt <goldsimon> |
Wed 02 Mar 2016 10:31:18 PM UTC, comment #5: 0002-Optimize-sendmsg-UDP-pbuf-chain-creation.patch contains the UDP pbuf chain building all within the sockets layer (lwip_sendmsg call). It actually wasn't as messy as I was thinking, thanks for the suggestion. |
Joel Cunningham <jcunningham> |
Mon 29 Feb 2016 03:23:05 PM UTC, comment #4: Simon,
|
Joel Cunningham <jcunningham> |
Thu 25 Feb 2016 08:05:23 PM UTC, comment #3: Well, PPP is somewhat a special case in lwIP as it is very much just copied from pppd and then adpted to lwIP. The core lwIP code tries to not use structures define by the (network-) standards.
|
Simon Goldschmidt <goldsimon> |
Fri 19 Feb 2016 03:33:21 PM UTC, comment #2: Simon,
|
Joel Cunningham <jcunningham> |
Thu 18 Feb 2016 07:24:29 PM UTC, comment #1: I'm not sure how to solve it differently, but I don't really like moving struct iovec to def.h. The core of lwIP should be compilable without opengroup things. Setting LWIP_IOVEC_PRIVATE to 1 by default makes it worse by having conflicting typedefs on some systems.
|
Simon Goldschmidt <goldsimon> |
Thu 21 Jan 2016 09:51:32 PM UTC, original submission:
Continuing my work with sendmsg(), I've got a couple more improvements:
|
Joel Cunningham <jcunningham> |
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 13 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2017-03-02 | jcunningham | Status | None | Done | |
Open/Closed | Open | Closed | |||
2017-03-01 | goldsimon | Planned Release | 2.0.2 | 2.1.0 | |
2017-02-27 | jcunningham | Attached File | - | Added 02-27-17-Vectorize-netconn_write-for-TCP.patch, #39838 | |
Attached File | - | Added 02-27-17-Added-sendmsg-tests-to-socket-examples.patch, #39839 | |||
2016-12-15 | goldsimon | Planned Release | 2.0.1 | 2.0.2 | |
2016-07-09 | jcunningham | Attached File | - | Added 0001-Convert-lwip_netconn_do_write-to-use-a-netbuf.patch, #37785 | |
2016-07-07 | goldsimon | Planned Release | 2.0.0 Beta2 | 2.0.1 | |
2016-07-07 | goldsimon | Planned Release | None | 2.0.0 Beta2 | |
2016-03-02 | jcunningham | Attached File | - | Added 0002-Optimize-sendmsg-UDP-pbuf-chain-creation.patch, #36530 | |
2016-01-21 | jcunningham | Attached File | - | Added 0001-Move-struct-iovec-to-def.h.patch, #36123 | |
Attached File | - | Added 0001-Vectorize-netconn_write-for-TCP.patch, #36124 | |||
Attached File | - | Added 0001-Optimzie-sendmsg-UDP-pbuf-chain-creation.patch, #36125 |
Powered by Savane 3.13-758e.
Corresponding source code
Just go ahead with the tests. That file is an ugly accumulation of different tests,so yours is very welcome :-)