lwIP - A Lightweight TCP/IP stack - Patches: patch #9431, Removing the restriction on number...
You are not allowed to post comments on this tracker with your current authentication level.
patch #9431: Removing the restriction on number of sockets
Submitter: | Joan Lledó <jllledo> | ||
Submitted: | Tue 08 Aug 2017 05:32:30 PM UTC | ||
Category: | None | Priority: | 5 - Normal |
Status: | None | Privacy: | Public |
Assigned to: | None | Open/Closed: | Open |
Planned Release: | None |
Mon 01 Apr 2024 05:01:00 PM UTC, comment #5: |
Joan Lledó <jllledo> |
Tue 06 Nov 2018 08:43:10 PM UTC, comment #4: Hmm, I also had a try at this some weeks ago. I think it would be good to separate out the allocation scheme (not calling mem_malloc hard).
|
Simon Goldschmidt <goldsimon> |
Sun 04 Nov 2018 11:11:00 AM UTC, comment #3: Hello,
|
Joan Lledó <jllledo> |
Thu 10 Aug 2017 07:12:44 AM UTC, comment #2: Here's a new patch with those issues solved.
|
Joan Lledó <jllledo> |
Tue 08 Aug 2017 07:19:09 PM UTC, comment #1: The patch has some drawbacks:
|
Simon Goldschmidt <goldsimon> |
Tue 08 Aug 2017 05:32:30 PM UTC, original submission:
This comes from [1]
|
Joan Lledó <jllledo> |
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 4 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2024-04-01 | jllledo | Attached File | - | Added 0001-Remove-restriction-on-number-of-sockets.patch, #55914 | |
2018-11-04 | jllledo | Attached File | - | Added 0001-Implement-sockets-open-count.patch, #45358 | |
2017-08-10 | jllledo | Attached File | - | Added 0001-New-option-LWIP_SOCKET_OPEN_COUNT-in-opts.h.patch, #41472 | |
2017-08-08 | jllledo | Attached File | - | Added 0001-New-option-LWIP_SOCKET_OPEN_COUNT-in-opts.h.patch, #41453 |
Powered by Savane 3.13-4448.
Corresponding source code
Hello,
I refactored this patch to make it simpler and adapt better to the existing code.
Now it doesn't use a linked list, sockets are stored in a dynamic array. This way we can reuse all existing code to lookup and free sockets. And it only introduces a few changes in the alloc_socket() function when LWIP_SOCKET_OPEN_COUNT is enabled.
Also, since we are reusing existing code for all operations except socket allocation, complexity is the same with or without LWIP_SOCKET_OPEN_COUNT enabled:
- Alocate: O(n)
- Lookup: O(1)
- Free: O(1)
(file #55914)