lwIP - A Lightweight TCP/IP stack - Patches: patch #5453, pbuf patch for...
You are not allowed to post comments on this tracker with your current authentication level.
patch #5453: pbuf patch for SYS_LIGHTWEIGHT_PROT=0
Submitter: | Simon Goldschmidt <goldsimon> | ||
Submitted: | Wed 11 Oct 2006 09:43:56 AM UTC | ||
Category: | None | Priority: | 5 - Normal |
Status: | Done | Privacy: | Public |
Assigned to: | goldsimon | Open/Closed: | Closed |
Planned Release: | None |
Jump to the original submission
Mon 07 May 2007 07:56:17 PM UTC, comment #22: |
Simon Goldschmidt <goldsimon> |
Mon 30 Apr 2007 01:19:02 PM UTC, comment #21: OK, I'm checking in my patch, then. Note I made some small modifications (moved pbuf_pool_free() into static function like pbuf_pool_alloc() and moved initialization of pbuf_pool from pbuf_init() into new static function pbuf_pool_init()) to make implementation-change of pbuf pool (->memp) easy.
|
Simon Goldschmidt <goldsimon> |
Mon 30 Apr 2007 11:13:05 AM UTC, comment #20: Assigning to you Simon as I'm unlikely to get a chance to give some time to this in the next week. |
Kieran Mansley <kieranm> |
Sun 29 Apr 2007 10:53:50 AM UTC, comment #19: I just realized my last patch was missing SYS_ARCH_(UN)PROTECT() around "p->next = pbuf_pool; pbuf_pool = p;" as the protection in pbuf_free() has changed in the last 2 months, my original patch was a little older. I'm attaching the new patch (which has only 2 lines more).
|
Simon Goldschmidt <goldsimon> |
Fri 20 Apr 2007 07:57:41 AM UTC, comment #18: Thanks Simon - I'll try and find time to take a look. |
Kieran Mansley <kieranm> |
Thu 19 Apr 2007 06:31:44 PM UTC, comment #17: Ooops, the last patch had a modification in dhcp.c included ;-)
|
Simon Goldschmidt <goldsimon> |
Thu 19 Apr 2007 06:29:29 PM UTC, comment #16: To get back to the original meaning of this patch: we have decided that SYS_LIGHTWEIGHT_PROT=0 means no protection.
|
Simon Goldschmidt <goldsimon> |
Wed 04 Apr 2007 06:28:52 AM UTC, comment #15: Well, Kieran, seems I didn't see your message!
|
Simon Goldschmidt <goldsimon> |
Tue 03 Apr 2007 04:01:04 PM UTC, comment #14: OK, you're right about existing ports. But at least we need some serious documentation that SYS_LIGHTWEIGHT_PROT==0 means no protection at all!
|
Simon Goldschmidt <goldsimon> |
Tue 03 Apr 2007 03:44:02 PM UTC, comment #13: Agree with Jonathan about maintaining the name for existing ports, but we should also document it where it is set so that we don't get into this situation of not knowing what it's for again!
|
Kieran Mansley <kieranm> |
Tue 03 Apr 2007 03:34:53 PM UTC, comment #12: I'm not sure there's an imperative to change the name (and consequently break existing ports).
|
Jonathan Larmour <jifl> |
Tue 03 Apr 2007 03:23:17 PM UTC, comment #11: comment #9, Yes, I'm agree. About name, SYS_SINGLETHREADED_CORE to match the Adam's document terms?
|
Frédéric Bernon <fbernon> |
Tue 03 Apr 2007 03:15:47 PM UTC, comment #10: Then we should rename it into SYS_HAVE_PROTECTION or something. |
Simon Goldschmidt <goldsimon> |
Tue 03 Apr 2007 03:05:39 PM UTC, comment #9: Re Frederic's comment #8: But if you are completely single-threaded, then you don't need the semaphore protection provided by SYS_LIGHTWEIGHT_PROT=0 in the current code.
|
Jonathan Larmour <jifl> |
Tue 03 Apr 2007 12:21:15 PM UTC, comment #8: Perhaps like described in "The lwIP single-threaded core" part of
|
Frédéric Bernon <fbernon> |
Tue 03 Apr 2007 11:18:11 AM UTC, comment #7: Hm, but what was Christiaan thinking SYS_LIGHTWEIGHT_PROT=0 is doing? I can only think of one scenario where this can work: if you have not a single context switch, meaning you have only lwip raw api (no OS, no threads) and your packets aren't delivered in interrupt context but through polling the ethernet device. In this special case, you needn't lock the pbuf pool, for example, and you're faster then!
|
Simon Goldschmidt <goldsimon> |
Mon 26 Mar 2007 12:01:12 PM UTC, comment #6: You might want to run this by Christian, who was a staunch defender of the SYS_LIGHTWEIGHT_PROT=0 code.
|
Jonathan Larmour <jifl> |
Mon 26 Mar 2007 10:48:41 AM UTC, comment #5: Right, so I think action 1 should be to remove the SYS_LIGHTWEIGHT_PROT=0 code.
|
Kieran Mansley <kieranm> |
Fri 23 Mar 2007 05:22:19 AM UTC, comment #4: I think if you read my mail of 2006-11-19 22:23 to lwip-users, you'll get my views of what it does :-). Nothing!
|
Jonathan Larmour <jifl> |
Tue 27 Feb 2007 07:26:48 AM UTC, comment #3: I think we would have to decide what SYS_LIGHTWEIGTH_PROT should stand for. =1 is clearly a lightweight protection disabeling the interrupts. But what does =0 do? I don't think that's really clear, is it? |
Simon Goldschmidt <goldsimon> |
Mon 19 Feb 2007 11:22:35 AM UTC, comment #2: That discussion was subsequent to this patch. The discussion tailed off by 2006-11-20 with no resolution. I still believe the SYS_LIGHTWEIGHT_PROT==0 code is at best redundant, as described in probably best detail in my mail of 2006-11-19 22:23 |
Jonathan Larmour <jifl> |
Mon 19 Feb 2007 11:02:38 AM UTC, comment #1: I recall a lot of discussion concerning SYS_LIGHTWEIGHT_PROT recently. Did this patch come before that, or is it what was decided on as a result of that discussion? |
Kieran Mansley <kieranm> |
Wed 11 Oct 2006 09:43:56 AM UTC, original submission:
If SYS_LIGHTWEIGHT_PROT is defined to 0, pbuf_pool_alloc() and pbuf_pool_free() are not locked against each other.
|
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 9 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2007-05-07 | goldsimon | Status | Ready For Test | Done | |
Open/Closed | Open | Closed | |||
2007-04-30 | goldsimon | Status | None | Ready For Test | |
2007-04-30 | kieranm | Assigned to | kieranm | goldsimon | |
2007-04-29 | goldsimon | Attached File | - | Added pbuf_lightweightprot2.patch, #12620 | |
2007-04-19 | goldsimon | Attached File | - | Added pbuf_lightweightprot.patch, #12532 | |
2007-04-19 | goldsimon | Attached File | - | Added pbuf_lightweightprot.patch, #12531 | |
2007-03-26 | kieranm | Assigned to | None | kieranm | |
2006-10-11 | goldsimon | Attached File | - | Added pbuf_sem.patch, #10944 |
Powered by Savane 3.13-f8d8.
Corresponding source code
As there are no protests coming in about this change, I'm closing it as done. memp.c is still to be done, though, I'm submitting a new patch for this.