lwIP - A Lightweight TCP/IP stack - Patches: patch #6330, Limit input packets on tcpip mbox
You are not allowed to post comments on this tracker with your current authentication level.
patch #6330: Limit input packets on tcpip mbox
Submitter: | Simon Goldschmidt <goldsimon> | ||
Submitted: | Thu 06 Dec 2007 08:55:23 PM UTC | ||
Category: | None | Priority: | 1 - Later |
Status: | Wont Do | Privacy: | Public |
Assigned to: | None | Open/Closed: | Closed |
Planned Release: | None |
Jump to the original submission
Tue 08 Jan 2008 07:34:48 PM UTC, comment #12: |
Simon Goldschmidt <goldsimon> |
Sun 06 Jan 2008 08:20:21 PM UTC, comment #11: I think Simon would agree that it is not "necessary". In my opinion, at best it's a workaround since it doesn't really prevent the condition it is ostensibly aimed at (preventing the application threads blocking) - it just tries to reduce the chances or frequency of it happening. I also have issues with some of the specific patch details since in fact it does increase code for those who don't care about this feature.
|
Jonathan Larmour <jifl> |
Sun 06 Jan 2008 07:51:31 PM UTC, comment #10: Is this patch always necessary now? Even if task #7490 is not completed, this part if check in...
|
Frédéric Bernon <fbernon> |
Tue 11 Dec 2007 07:39:13 PM UTC, comment #9: Let's leave this patch open as a patch that can be applied by users that want to. Once task #7490 is done we can have another talk about the necessity of this patch. |
Simon Goldschmidt <goldsimon> |
Mon 10 Dec 2007 07:18:10 PM UTC, comment #8:
|
Jonathan Larmour <jifl> |
Mon 10 Dec 2007 06:42:03 PM UTC, comment #7:
|
Simon Goldschmidt <goldsimon> |
Fri 07 Dec 2007 04:56:05 PM UTC, comment #6: That's true, but this implies your cpu is already overloaded with network processing, and dropping input packets is not going to help this. The application can send, but if TCP ACKs can't get returned, what's the point. An application thread that interfaces with the network stack should already expect that it may block (if the remote end doesn't consume and ack as quickly as you may like, before send buffers fill up). If you don't want that, you need to move those operations to a different thread.
|
Jonathan Larmour <jifl> |
Fri 07 Dec 2007 04:02:32 PM UTC, comment #5: Yes, but with sys_arch_mox_trypost as only limitation, input packets can still fill the whole mbox, leaving no place for application task to communicate with the tcpip_task...
|
Simon Goldschmidt <goldsimon> |
Fri 07 Dec 2007 02:49:29 PM UTC, comment #4: After task #7490 is complete, there will be a means for tcpip_input() to handle that. tcpip_input() should never block, in any context (as per your comment #9 in task #7490 :-)).
|
Jonathan Larmour <jifl> |
Fri 07 Dec 2007 02:05:05 PM UTC, comment #3: But when you feed packets into tcpip_input() from interrupt context, you have no chance to block (and don't want to, anyway). |
Simon Goldschmidt <goldsimon> |
Fri 07 Dec 2007 01:50:15 PM UTC, comment #2: I'm not sure there's a real problem here. As discussed in task #7490, it's ok for the application thread to block waiting for the tcpip thread to service their request. In fact, depending on the underlying synchronisation primitives, for systems with priority inheritance, this would be a good thing as the tcpip thread will have its priority boosted.
|
Jonathan Larmour <jifl> |
Thu 06 Dec 2007 08:56:57 PM UTC, comment #1: Wrong file attached :-(
|
Simon Goldschmidt <goldsimon> |
Thu 06 Dec 2007 08:55:23 PM UTC, original submission:
To prevent the input mbox overflowing, I suggest to define an upper limit of input packets on the input queue (the mbox in tcpip.c).
|
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 5 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2008-01-08 | goldsimon | Status | Postponed | Wont Do | |
Open/Closed | Open | Closed | |||
2007-12-11 | goldsimon | Priority | 5 - Normal | 1 - Later | |
Status | None | Postponed | |||
2007-12-06 | goldsimon | Attached File | - | Added tcpic.c_limitinput.patch, #14578 |
Powered by Savane 3.13-02a9.
Corresponding source code
The patch was designed to be an option. However it does also work the way it is now, so I close this item.