src.nth.io/

summaryrefslogtreecommitdiff
path: root/sdkconfig.defaults
diff options
context:
space:
mode:
authorLuke Hoersten <[email protected]>2026-07-15 18:38:26 -0500
committerLuke Hoersten <[email protected]>2026-07-15 18:38:26 -0500
commit8c05eddbd12c6a78a7247763d98f2e2a8ac77e1e (patch)
tree3139d7e20a7c972c5540bfd293e70d4213ca0093 /sdkconfig.defaults
parent143c03f1b0fe35484d410f97539af1d7fe28b930 (diff)
eth: size EMAC RX DMA pool above the TCP window (1600B x 24)
WND=23040 alone regressed: sender fps 20 -> 14, drop-oldest 3x, recv bimodal (min 20ms but 200-450ms stalls; firmware wire_min 6.2Mbps / wire_max 75Mbps, recv_max 253ms). The stalls are RTO recovery: the default EMAC RX pool (20 x 512B = 10KB) is smaller than the 23KB the window now invites in flight, so a full-window burst overruns the RX descriptors, the burst tail is dropped with no dup-ACKs behind it, and the sender waits out a ~200ms min-RTO. 1600B buffers fit one MSS frame per buffer (1 descriptor/packet instead of 3); 24 of them = 38.4KB >= window + slack. ~44KB more internal RAM (491KB free).
Diffstat (limited to 'sdkconfig.defaults')
-rw-r--r--sdkconfig.defaults9
1 files changed, 9 insertions, 0 deletions
diff --git a/sdkconfig.defaults b/sdkconfig.defaults
index 1a71f91..b7bb0ed 100644
--- a/sdkconfig.defaults
+++ b/sdkconfig.defaults
@@ -23,6 +23,15 @@ CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=16384
# Ethernet (Waveshare ESP32-P4-ETH-POE: internal EMAC + external PHY)
CONFIG_ETH_ENABLED=y
CONFIG_ETH_USE_ESP32_EMAC=y
+# EMAC RX DMA pool must exceed TCP_WND or a full-window burst overruns
+# the RX descriptors and the silent tail-drop puts the sender into a
+# ~200-400ms RTO stall (measured: WND=23040 with the default 20x512B
+# = 10KB pool made recv bimodal — wire_max 75Mbps on clean frames,
+# 200-450ms stalls on lossy ones, sender fps 20 -> 14). 1600B = one
+# full MSS frame per buffer (also 1 descriptor/packet instead of 3);
+# 24 x 1600 = 38.4KB >= 23040 + slack. ~44KB extra internal RAM.
+CONFIG_ETH_DMA_BUFFER_SIZE=1600
+CONFIG_ETH_DMA_RX_BUFFER_NUM=24
# LWIP / mDNS
CONFIG_LWIP_IPV4=y