lwIP - A Lightweight TCP/IP stack - Tasks: task #7490, Add return value to sys_mbox_post
You are not allowed to post comments on this tracker with your current authentication level.
task #7490: Add return value to sys_mbox_post
Submitter: | Simon Goldschmidt <goldsimon> | ||
Submitted: | Sun 25 Nov 2007 10:42:10 AM UTC | ||
Category: | None | Should Start On: | Sun 25 Nov 2007 12:00:00 AM UTC |
Should be Finished on: | Sun 25 Nov 2007 12:00:00 AM UTC | Priority: | 5 - Normal |
Status: | Done | Privacy: | Public |
Assigned to: | fbernon | Percent Complete: | 100% |
Open/Closed: | Closed | Planned Release: | 1.3.0 |
Effort: | 0.00 |
Jump to the original submission
Sun 13 Jan 2008 12:20:10 PM UTC, comment #43: |
Frédéric Bernon <fbernon> |
Sat 12 Jan 2008 05:54:39 PM UTC, comment #42: I'm agree, but I think it's a separate issue: we could close this one, and open another one for tcp_in.c changes.
|
Frédéric Bernon <fbernon> |
Sat 12 Jan 2008 05:00:24 PM UTC, comment #41:
|
Simon Goldschmidt <goldsimon> |
Sat 12 Jan 2008 03:40:51 PM UTC, comment #40:
|
Frédéric Bernon <fbernon> |
Sat 12 Jan 2008 03:35:16 PM UTC, comment #39:
|
Frédéric Bernon <fbernon> |
Sat 12 Jan 2008 01:58:35 PM UTC, comment #38: Although I'm sure GCC can optimize that, hopefully other people's compilers will be able to too. |
Jonathan Larmour <jifl> |
Fri 11 Jan 2008 11:55:41 PM UTC, comment #37: I check in the patch with something like you have proposed. I hope it good for you...
|
Frédéric Bernon <fbernon> |
Fri 11 Jan 2008 09:59:07 AM UTC, comment #36: I'm ok with the patch, although it would be easy to optimise the common case where all the values will be the same (especially true for the default case, and in cases where the underlying mbox does not support different sizes anyway). So add something like:
|
Jonathan Larmour <jifl> |
Thu 10 Jan 2008 10:13:19 PM UTC, comment #35: To do for this task:
|
Frédéric Bernon <fbernon> |
Thu 10 Jan 2008 10:10:07 PM UTC, comment #34:
|
Frédéric Bernon <fbernon> |
Thu 10 Jan 2008 07:43:07 AM UTC, comment #33: I like the idea of op_completed as sem name, it kind of tells the user what it does...
|
Simon Goldschmidt <goldsimon> |
Thu 10 Jan 2008 03:27:34 AM UTC, comment #32: Both those patches look fine to me.
|
Jonathan Larmour <jifl> |
Wed 09 Jan 2008 11:31:55 PM UTC, comment #31:
|
Frédéric Bernon <fbernon> |
Wed 09 Jan 2008 10:20:40 PM UTC, comment #30:
|
Frédéric Bernon <fbernon> |
Sun 06 Jan 2008 07:47:55 PM UTC, comment #29: To do for this task:
|
Frédéric Bernon <fbernon> |
Sun 06 Jan 2008 07:40:30 PM UTC, comment #28: (from private emails)
|
Frédéric Bernon <fbernon> |
Sat 05 Jan 2008 09:11:35 PM UTC, comment #27: Ok, it's check in. Simon, feel free to work on accept_function by adding something like a "netconn_delete".
|
Frédéric Bernon <fbernon> |
Sat 05 Jan 2008 08:49:23 PM UTC, comment #26:
|
Frédéric Bernon <fbernon> |
Sat 05 Jan 2008 07:50:52 PM UTC, comment #25: tcp_callback: I really don't have a strong opinion on this, you can just add the block/nonblock argument if you like.
|
Simon Goldschmidt <goldsimon> |
Sat 05 Jan 2008 07:23:39 PM UTC, comment #24:
|
Frédéric Bernon <fbernon> |
Sat 05 Jan 2008 11:17:33 AM UTC, comment #23: to sys_arch.txt: To prevent people porting lwIP to get confused about the 'size' argument, I'd add something like 'Elements stored in mboxes are pointers.' to the description of sys_mbox_new() so that people can calculate the actual memory size needed. Also, 0 = max or 0 = default should be mentioned somewhere, I think (since TCPIP_MBOX_SIZE is 0 by default).
|
Simon Goldschmidt <goldsimon> |
Sat 05 Jan 2008 02:12:20 AM UTC, comment #22: I attach a first partial patch file:
|
Frédéric Bernon <fbernon> |
Wed 12 Dec 2007 08:27:19 PM UTC, comment #21:
|
Simon Goldschmidt <goldsimon> |
Wed 12 Dec 2007 06:11:53 PM UTC, comment #20: Just to be sure, can you tell me :
|
Frédéric Bernon <fbernon> |
Tue 11 Dec 2007 07:41:51 PM UTC, comment #19:
|
Simon Goldschmidt <goldsimon> |
Mon 10 Dec 2007 07:24:22 PM UTC, comment #18: I agree for blocking versus non-blocking, although arguably tcpip_input may as well free the pbuf itself.
|
Jonathan Larmour <jifl> |
Mon 10 Dec 2007 07:14:35 PM UTC, comment #17: Well, it would mainly be:
|
Simon Goldschmidt <goldsimon> |
Mon 10 Dec 2007 06:42:48 PM UTC, comment #16: (Re #15):
|
Jared Grubb <jgrubb> |
Fri 07 Dec 2007 01:54:45 PM UTC, comment #15: I just realised that while I said it's up to the caller to decide what to do if the call fails, blocking is difficult. Unless you always accompany an mbox by a semaphore, there's no way for the caller to block waiting for space to appear in the mbox.
|
Jonathan Larmour <jifl> |
Tue 27 Nov 2007 12:55:34 PM UTC, comment #14: Someone asked my opinion...
|
Kieran Mansley <kieranm> |
Tue 27 Nov 2007 07:40:09 AM UTC, comment #13:
|
Simon Goldschmidt <goldsimon> |
Tue 27 Nov 2007 04:44:58 AM UTC, comment #12:
|
Frédéric Bernon <fbernon> |
Mon 26 Nov 2007 10:43:14 PM UTC, comment #11: I think it's simpler just to say it never blocks. What Jared said in comment #7 makes the most sense to me.
|
Jonathan Larmour <jifl> |
Mon 26 Nov 2007 08:43:12 PM UTC, comment #10:
|
Frédéric Bernon <fbernon> |
Mon 26 Nov 2007 07:33:18 PM UTC, comment #9: I've put together the places where sys_mbox_post is used:
|
Simon Goldschmidt <goldsimon> |
Mon 26 Nov 2007 05:20:39 PM UTC, comment #8: In our case, the prevention through TCP window is not safe because we use lwIP for VNC trafic, which typically uses small packets (region refresh requests, particularly when moving a window with permanent refresh). I could very well just drop the packet myself from the interrupt handler, or disable the interrupt while the box is somehow full, but there's currently no clean way to do this from our code (the mbox is static).
|
Samuel Thibault <sthibaul> |
Mon 26 Nov 2007 05:20:17 PM UTC, comment #7: The "poster" of the data is the only one who can know what SHOULD happen if the mbox post fails -- and the correct behavior will depend on which mbox it is. Therefore, I don't think the problem can be solved inside the sys_arch file.
|
Jared Grubb <jgrubb> |
Mon 26 Nov 2007 05:09:07 PM UTC, comment #6:
|
Simon Goldschmidt <goldsimon> |
Mon 26 Nov 2007 04:58:34 PM UTC, comment #5: Forum subject around that:
|
Frédéric Bernon <fbernon> |
Mon 26 Nov 2007 04:38:35 PM UTC, comment #4: I actually have a problem with this: I get the network packets from an interrupt handler, which is not allowed to wait, and I've currently no way to let the interrupt handler know that it shouldn't call tcpip_input but just drop the packet.
|
Samuel Thibault <sthibaul> |
Sun 25 Nov 2007 12:34:01 PM UTC, comment #3:
|
Frédéric Bernon <fbernon> |
Sun 25 Nov 2007 12:19:02 PM UTC, comment #2: Just thought this is a rather small change, so could go in to 1.3.0...
|
Simon Goldschmidt <goldsimon> |
Sun 25 Nov 2007 12:10:36 PM UTC, comment #1: I'm not agree, and should be done if we give a "size" parameter to sys_mbox_new (having a same static size for conn::mbox, conn::recvmbox, and tcpip.c::mbox is an error). SO_RCVBUF already give a first solution to this problem.
|
Frédéric Bernon <fbernon> |
Sun 25 Nov 2007 10:42:10 AM UTC, original submission:
Various bug reports (and my own experience) have shown that a return value for sys_mbox_post might be useful to show whether the mailbox was full.
|
Simon Goldschmidt <goldsimon> |
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 16 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2008-01-13 | fbernon | Open/Closed | Open | Closed | |
2008-01-13 | fbernon | Status | None | Done | |
Percent Complete | 80% | 100% | |||
Assigned to | None | fbernon | |||
2008-01-12 | fbernon | Percent Complete | 70% | 80% | |
2008-01-10 | fbernon | Attached File | - | Added RECVMBOX_SIZE.patch, #14780 | |
2008-01-09 | fbernon | Attached File | - | Added netconn_sem.patch, #14778 | |
Percent Complete | 60% | 70% | |||
2008-01-09 | fbernon | Attached File | - | Added tcpip_callback.patch, #14776 | |
Percent Complete | 50% | 60% | |||
2008-01-06 | fbernon | Percent Complete | 40% | 50% | |
2008-01-05 | fbernon | Percent Complete | 20% | 40% | |
2008-01-05 | fbernon | Attached File | - | Added sys_mbox_trypost.patch, #14748 | |
Percent Complete | 0% | 20% | |||
Planned Release | None | 1.3.0 | |||
2007-11-25 | goldsimon | Planned Release | 1.3.0 | None |
Powered by Savane 3.13-02a9.
Corresponding source code
I close this task, and open a new one for the design problem around the call of TCP_EVENT_RECV.