From ec2db62fe5eca048be8173cd2b7987de692be219 Mon Sep 17 00:00:00 2001 From: Kevin Bracey Date: Fri, 11 May 2018 17:12:00 +0300 Subject: [PATCH] lwIP: Enable TCP out-of-order processing Our config file for lwIP had TCP_QUEUE_OOSEQ disabled - this can cause significant performance problems, as observed during testing. One lost packet can lock an input stream into a mode where the transmitter keeps thinking packets are being lost, so keeps slowing down. This caused test failures - a transfer that would normally take 10s hit a 60s timeout. Turning this on increases code size, but doesn't significantly increase static memory use. The memory used for out-of-order packets comes from the same pbuf pool as for outgoing TCP segments, so there is contention when running bidirectionally. Out-of-order processing is on by default for lwIP - this seems to be another example of us excessively paring it back. --- features/FEATURE_LWIP/lwip-interface/lwipopts.h | 1 - 1 file changed, 1 deletion(-) diff --git a/features/FEATURE_LWIP/lwip-interface/lwipopts.h b/features/FEATURE_LWIP/lwip-interface/lwipopts.h index 62600a0bc6..a48711632b 100644 --- a/features/FEATURE_LWIP/lwip-interface/lwipopts.h +++ b/features/FEATURE_LWIP/lwip-interface/lwipopts.h @@ -210,7 +210,6 @@ #if MBED_CONF_LWIP_TCP_ENABLED #define LWIP_TCP 1 -#define TCP_QUEUE_OOSEQ 0 #define TCP_OVERSIZE 0 #define LWIP_TCP_KEEPALIVE 1 #else