Index | Thread | Search

From:
Tim Leslie <tleslie@protonmail.com>
Subject:
sysctl: enable ECN by default?
To:
"tech@openbsd.org" <tech@openbsd.org>
Date:
Sat, 12 Jul 2025 18:01:19 +0000

Download raw body.

Thread
Trivial patch makes ECN (RFC 3168) enabled by default in OpenBSD.  ECN has been in-tree since 2002 but remains off by default; early rollout challenges in a few middle-boxes slowed adoption.

Enabling ECN end-to-end typically reduces queuing delay and packet loss when both endpoints signal support. Network infrastructure today generally supports marking instead of drop. Most TCP stacks will honor CE marks when they receive them, even if they didn’t originate ECT. CPU overhead is negligible, and we fall back automatically to loss-based TCP on non-ECN peers.  

— 
Tim

--- /sys/netinet/tcp_subr.c	2025-07-11 06:34:38
+++ /sys/netinet/tcp_subr.c	2025-07-12 13:57:45
@@ -113,9 +113,7 @@
 int	tcp_do_rfc1323 = 1;
 int	tcp_do_sack = 1;	/* RFC 2018 selective ACKs */
 int	tcp_ack_on_push = 0;	/* set to enable immediate ACK-on-PUSH */
-#ifdef TCP_ECN
-int	tcp_do_ecn = 0;		/* RFC3168 ECN enabled/disabled? */
-#endif
+int	tcp_do_ecn = 1;		/* RFC3168 ECN enabled/disabled? */
 int	tcp_do_rfc3390 = 2;	/* Increase TCP's Initial Window to 10*mss */
 int	tcp_do_tso = 1;		/* TCP segmentation offload for output */