From 1be1b472cd440eeb94e0e45b689a760976f7faa7 Mon Sep 17 00:00:00 2001 From: Sjors Hettinga Date: Mon, 9 Jan 2023 08:00:49 +0100 Subject: [PATCH] net: tcp: Extend TCP receive queue timeout After several fixes of the re-ordering logic in TCP, the receive queue works as intended and cleans itself up properly. Previously the default timeout was 100 ms, which pretty much disables it for real applications. Increase the timeout to 2 seconds to actually enable it for in practice. This should help pass much more of the Maxwell Pro tests. This is the first step before removing the timeout completely. Signed-off-by: Sjors Hettinga --- subsys/net/ip/Kconfig | 2 +- tests/net/socket/tcp/prj.conf | 1 - tests/net/tcp/prj.conf | 2 -- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/subsys/net/ip/Kconfig b/subsys/net/ip/Kconfig index 58036a32457..40a25c3a4f5 100644 --- a/subsys/net/ip/Kconfig +++ b/subsys/net/ip/Kconfig @@ -480,7 +480,7 @@ config NET_TCP_MAX_RECV_WINDOW_SIZE config NET_TCP_RECV_QUEUE_TIMEOUT int "How long to queue received data (in ms)" depends on NET_TCP - default 100 + default 2000 range 0 10000 help If we receive out-of-order TCP data, we queue it. This value tells diff --git a/tests/net/socket/tcp/prj.conf b/tests/net/socket/tcp/prj.conf index b3e43d01e68..c3819a35e96 100644 --- a/tests/net/socket/tcp/prj.conf +++ b/tests/net/socket/tcp/prj.conf @@ -36,7 +36,6 @@ CONFIG_NET_BUF_TX_COUNT=64 # Reduce the retry count, so the close always finishes within a second CONFIG_NET_TCP_RETRY_COUNT=3 CONFIG_NET_TCP_INIT_RETRANSMISSION_TIMEOUT=120 -CONFIG_NET_TCP_RECV_QUEUE_TIMEOUT=1000 CONFIG_ZTEST=y CONFIG_ZTEST_NEW_API=y diff --git a/tests/net/tcp/prj.conf b/tests/net/tcp/prj.conf index f71e9f66a25..6c845fe659a 100644 --- a/tests/net/tcp/prj.conf +++ b/tests/net/tcp/prj.conf @@ -51,5 +51,3 @@ CONFIG_NET_LOG=y #CONFIG_NET_IPV4_LOG_LEVEL_DBG=y #CONFIG_NET_IPV6_LOG_LEVEL_DBG=y #CONFIG_NET_CORE_LOG_LEVEL_DBG=y - -CONFIG_NET_TCP_RECV_QUEUE_TIMEOUT=1000