[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [patch #9601] introduce LWIP_TCP_MAX_TW_BUCKETS to limit ti
From: |
Jin-Seong Kim |
Subject: |
[lwip-devel] [patch #9601] introduce LWIP_TCP_MAX_TW_BUCKETS to limit timewait socket |
Date: |
Fri, 16 Mar 2018 00:44:13 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.162 Safari/537.36 |
URL:
<http://savannah.nongnu.org/patch/?9601>
Summary: introduce LWIP_TCP_MAX_TW_BUCKETS to limit timewait
socket
Project: lwIP - A Lightweight TCP/IP stack
Submitted by: jseong
Submitted on: Fri 16 Mar 2018 04:44:12 AM UTC
Category: TCP
Priority: 5 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Planned Release: None
_______________________________________________________
Details:
Dear. All.
We've found some situation that could be possible to make out of memory on
lwIP memory pool.
Test Environment
Test PC (Ubuntu) ---- Wi-Fi ---- lwIP ported Board (webserver)
Test Procedure
1. Run webserver on board
- board has 100kB memory pool for lwIP stack
2. Test PC runs wget more than 1000 times repeatedly
3. wget has been stopped and board doesn't create new TCP seesion
due to lack of memory
As I checked the memory, the lack of memory is caused by the number of tw
(timewait) pcbs.
In memory constrained board, it can be quite serious issue.
So, I'd like to review my patch which introduce LWIP_TCP_MAX_TW_BUCKETS to
limit timewait socket
Patch description
- before register tw_tcp_pcbs list, check counter to limit maximum number of
tw pcbs
- if pcb cannot be in tw_tcp_pcbs, it will freed through tcp_free
Unit-Test Results
Running suite(s): IPv4
UDP
TCP
TCP_OOS
DEF
MEM
NETIF
PBUF
TIMERS
ETHARP
DHCP
MDNS
MQTT
SOCKETS
100%: Checks: 97, Failures: 0, Errors: 0
Thanks
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Fri 16 Mar 2018 04:44:12 AM UTC Name:
0001-introduce-LWIP_TCP_MAX_TW_BUCKETS-to-limit-timewait-.patch Size: 12KiB
By: jseong
Base commit is 104a629a51
<http://savannah.nongnu.org/patch/download.php?file_id=43566>
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/patch/?9601>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [lwip-devel] [patch #9601] introduce LWIP_TCP_MAX_TW_BUCKETS to limit timewait socket,
Jin-Seong Kim <=