Date: Mon, 20 Jun 2016 19:00:48 +0000 (UTC) From: Don Lewis <truckman@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302032 - stable/10/sys/netinet Message-ID: <201606201900.u5KJ0mL3059944@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: truckman Date: Mon Jun 20 19:00:47 2016 New Revision: 302032 URL: https://svnweb.freebsd.org/changeset/base/302032 Log: MFC r300240 Change net.inet.tcp.ecn.enable sysctl mib from a binary off/on control to a three way setting. 0 - Totally disable ECN. (no change) 1 - Enable ECN if incoming connections request it. Outgoing connections will request ECN. (no change from present != 0 setting) 2 - Enable ECN if incoming connections request it. Outgoing conections will not request ECN. Change the default value of net.inet.tcp.ecn.enable from 0 to 2. Linux version 2.4.20 and newer, Solaris, and Mac OS X 10.5 and newer have similar capabilities. The actual values above match Linux, and the default matches the current Linux default. Reviewed by: eadler Relnotes: yes Differential Revision: https://reviews.freebsd.org/D6386 Modified: stable/10/sys/netinet/tcp_input.c stable/10/sys/netinet/tcp_output.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/tcp_input.c ============================================================================== --- stable/10/sys/netinet/tcp_input.c Mon Jun 20 18:14:51 2016 (r302031) +++ stable/10/sys/netinet/tcp_input.c Mon Jun 20 19:00:47 2016 (r302032) @@ -184,7 +184,7 @@ SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, static SYSCTL_NODE(_net_inet_tcp, OID_AUTO, ecn, CTLFLAG_RW, 0, "TCP ECN"); -VNET_DEFINE(int, tcp_do_ecn) = 0; +VNET_DEFINE(int, tcp_do_ecn) = 2; SYSCTL_VNET_INT(_net_inet_tcp_ecn, OID_AUTO, enable, CTLFLAG_RW, &VNET_NAME(tcp_do_ecn), 0, "TCP ECN support"); Modified: stable/10/sys/netinet/tcp_output.c ============================================================================== --- stable/10/sys/netinet/tcp_output.c Mon Jun 20 18:14:51 2016 (r302031) +++ stable/10/sys/netinet/tcp_output.c Mon Jun 20 19:00:47 2016 (r302032) @@ -1109,7 +1109,7 @@ send: * resend those bits a number of times as per * RFC 3168. */ - if (tp->t_state == TCPS_SYN_SENT && V_tcp_do_ecn) { + if (tp->t_state == TCPS_SYN_SENT && V_tcp_do_ecn == 1) { if (tp->t_rxtshift >= 1) { if (tp->t_rxtshift <= V_tcp_ecn_maxretries) flags |= TH_ECE|TH_CWR;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201606201900.u5KJ0mL3059944>