From nobody Fri Nov 12 19:19:11 2021 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7DACD1849DF0; Fri, 12 Nov 2021 19:19:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HrT0b34bxz3NDL; Fri, 12 Nov 2021 19:19:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4AEC6252DA; Fri, 12 Nov 2021 19:19:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1ACJJB1L056560; Fri, 12 Nov 2021 19:19:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ACJJB00056559; Fri, 12 Nov 2021 19:19:11 GMT (envelope-from git) Date: Fri, 12 Nov 2021 19:19:11 GMT Message-Id: <202111121919.1ACJJB00056559@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 7e3c9ec906c0 - main - tcp: better congestion control defaults List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7e3c9ec906c0710e34fa5b11104ee1c12f68a09f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=7e3c9ec906c0710e34fa5b11104ee1c12f68a09f commit 7e3c9ec906c0710e34fa5b11104ee1c12f68a09f Author: Warner Losh AuthorDate: 2021-11-12 17:05:03 +0000 Commit: Warner Losh CommitDate: 2021-11-12 19:16:11 +0000 tcp: better congestion control defaults Define CC_NEWRENO in all the appropriate DEFAULTS and std.* config files. It's the default congestion control algorithm. Add code to cc.c so that CC_DEFAULT is "newreno" if it's not overriden in the config file. Sponsored by: Netflix Fixes: b8d60729deef ("tcp: Congestion control cleanup.") Revired by: manu, hselasky, jhb, glebius, tuexen Differential Revision: https://reviews.freebsd.org/D32964 --- sys/amd64/conf/DEFAULTS | 3 +++ sys/amd64/conf/GENERIC | 2 -- sys/amd64/conf/MINIMAL | 2 -- sys/arm/conf/DEFAULTS | 3 +++ sys/arm64/conf/DEFAULTS | 3 +++ sys/i386/conf/DEFAULTS | 3 +++ sys/i386/conf/GENERIC | 2 -- sys/i386/conf/MINIMAL | 2 -- sys/mips/conf/DEFAULTS | 3 +++ sys/netinet/cc/cc.c | 7 +++++++ sys/powerpc/conf/DEFAULTS | 3 +++ sys/powerpc/conf/GENERIC | 2 -- sys/riscv/conf/DEFAULTS | 3 +++ sys/riscv/conf/GENERIC | 2 -- 14 files changed, 28 insertions(+), 12 deletions(-) diff --git a/sys/amd64/conf/DEFAULTS b/sys/amd64/conf/DEFAULTS index f8334bd9af20..5ea20c19f791 100644 --- a/sys/amd64/conf/DEFAULTS +++ b/sys/amd64/conf/DEFAULTS @@ -21,4 +21,7 @@ options GEOM_PART_EBR options GEOM_PART_MBR options GEOM_PART_GPT +# Default congestion control algorithm +options CC_NEWRENO # include newreno congestion control + options NEW_PCIB diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC index eb2b0cbd12e9..f47b995beb2c 100644 --- a/sys/amd64/conf/GENERIC +++ b/sys/amd64/conf/GENERIC @@ -30,8 +30,6 @@ options PREEMPTION # Enable kernel thread preemption options VIMAGE # Subsystem virtualization, e.g. VNET options INET # InterNETworking options INET6 # IPv6 communications protocols -options CC_NEWRENO # include newreno congestion control -options CC_DEFAULT=\"newreno\" # define our default CC module it should be compiled in. options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 options ROUTE_MPATH # Multipath routing support options FIB_ALGO # Modular fib lookups diff --git a/sys/amd64/conf/MINIMAL b/sys/amd64/conf/MINIMAL index ad1e61ececd8..f724cbd2e3f1 100644 --- a/sys/amd64/conf/MINIMAL +++ b/sys/amd64/conf/MINIMAL @@ -43,8 +43,6 @@ options NUMA # Non-Uniform Memory Architecture support options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols -options CC_NEWRENO # include newreno congestion control -options CC_DEFAULT=\"newreno\" # define our default CC module it should be compiled in. options TCP_OFFLOAD # TCP offload options SCTP_SUPPORT # Allow kldload of SCTP options FFS # Berkeley Fast Filesystem diff --git a/sys/arm/conf/DEFAULTS b/sys/arm/conf/DEFAULTS index 6755185f54d5..2e145585c7e8 100644 --- a/sys/arm/conf/DEFAULTS +++ b/sys/arm/conf/DEFAULTS @@ -5,3 +5,6 @@ device mem +# Default congestion control algorithm +options CC_NEWRENO # include newreno congestion control + diff --git a/sys/arm64/conf/DEFAULTS b/sys/arm64/conf/DEFAULTS index ffc08435380f..e2b034e94967 100644 --- a/sys/arm64/conf/DEFAULTS +++ b/sys/arm64/conf/DEFAULTS @@ -13,4 +13,7 @@ options GEOM_PART_BSD options GEOM_PART_MBR options GEOM_PART_GPT +# Default congestion control algorithm +options CC_NEWRENO # include newreno congestion control + options NEW_PCIB diff --git a/sys/i386/conf/DEFAULTS b/sys/i386/conf/DEFAULTS index f0aee10c9c3c..67328043a537 100644 --- a/sys/i386/conf/DEFAULTS +++ b/sys/i386/conf/DEFAULTS @@ -22,6 +22,9 @@ options GEOM_PART_EBR options GEOM_PART_MBR options GEOM_PART_GPT +# Default congestion control algorithm +options CC_NEWRENO # include newreno congestion control + # enable support for native hardware device atpic diff --git a/sys/i386/conf/GENERIC b/sys/i386/conf/GENERIC index 3b5556675555..5447c452c4f7 100644 --- a/sys/i386/conf/GENERIC +++ b/sys/i386/conf/GENERIC @@ -31,8 +31,6 @@ options PREEMPTION # Enable kernel thread preemption options VIMAGE # Subsystem virtualization, e.g. VNET options INET # InterNETworking options INET6 # IPv6 communications protocols -options CC_NEWRENO # include newreno congestion control -options CC_DEFAULT=\"newreno\" # define our default CC module it should be compiled in. options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 options ROUTE_MPATH # Multipath routing support options TCP_HHOOK # hhook(9) framework for TCP diff --git a/sys/i386/conf/MINIMAL b/sys/i386/conf/MINIMAL index 26c081c89799..9d735dbb0580 100644 --- a/sys/i386/conf/MINIMAL +++ b/sys/i386/conf/MINIMAL @@ -44,8 +44,6 @@ options SCHED_ULE # ULE scheduler options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols -options CC_NEWRENO # include newreno congestion control -options CC_DEFAULT=\"newreno\" # define our default CC module it should be compiled in. options TCP_OFFLOAD # TCP offload options SCTP_SUPPORT # Allow kldload of SCTP options FFS # Berkeley Fast Filesystem diff --git a/sys/mips/conf/DEFAULTS b/sys/mips/conf/DEFAULTS index f09ef5440ce9..a64b332ffa43 100644 --- a/sys/mips/conf/DEFAULTS +++ b/sys/mips/conf/DEFAULTS @@ -9,3 +9,6 @@ device uart_ns8250 options GEOM_PART_BSD options GEOM_PART_MBR + +# Default congestion control algorithm +options CC_NEWRENO # include newreno congestion control diff --git a/sys/netinet/cc/cc.c b/sys/netinet/cc/cc.c index 0a61aff37c96..df0efcac24be 100644 --- a/sys/netinet/cc/cc.c +++ b/sys/netinet/cc/cc.c @@ -77,6 +77,13 @@ __FBSDID("$FreeBSD$"); #include #include +/* + * Have a sane default if no CC_DEFAULT is specified in the kernel config file. + */ +#ifndef CC_DEFAULT +#define CC_DEFAULT "newreno" +#endif + MALLOC_DEFINE(M_CC_MEM, "CC Mem", "Congestion Control State memory"); /* diff --git a/sys/powerpc/conf/DEFAULTS b/sys/powerpc/conf/DEFAULTS index da8e7fb6d197..9bf5e706b04a 100644 --- a/sys/powerpc/conf/DEFAULTS +++ b/sys/powerpc/conf/DEFAULTS @@ -12,4 +12,7 @@ device uart_ns8250 options GEOM_PART_BSD options GEOM_PART_MBR +# Default congestion control algorithm +options CC_NEWRENO # include newreno congestion control + options NEW_PCIB diff --git a/sys/powerpc/conf/GENERIC b/sys/powerpc/conf/GENERIC index 5e3796c98e1f..cdf1266ec5a6 100644 --- a/sys/powerpc/conf/GENERIC +++ b/sys/powerpc/conf/GENERIC @@ -38,8 +38,6 @@ options PREEMPTION #Enable kernel thread preemption options VIMAGE # Subsystem virtualization, e.g. VNET options INET #InterNETworking options INET6 #IPv6 communications protocols -options CC_NEWRENO # include newreno congestion control -options CC_DEFAULT=\"newreno\" # define our default CC module it should be compiled in. options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 options TCP_HHOOK # hhook(9) framework for TCP options TCP_RFC7413 # TCP Fast Open diff --git a/sys/riscv/conf/DEFAULTS b/sys/riscv/conf/DEFAULTS index 94c6bf283c45..f18fdca0c001 100644 --- a/sys/riscv/conf/DEFAULTS +++ b/sys/riscv/conf/DEFAULTS @@ -12,4 +12,7 @@ device mem # Memory and kernel memory devices options GEOM_PART_BSD options GEOM_PART_MBR +# Default congestion control algorithm +options CC_NEWRENO # include newreno congestion control + options NEW_PCIB diff --git a/sys/riscv/conf/GENERIC b/sys/riscv/conf/GENERIC index 65a5197429f5..4ce1cb6a3cda 100644 --- a/sys/riscv/conf/GENERIC +++ b/sys/riscv/conf/GENERIC @@ -29,8 +29,6 @@ options PREEMPTION # Enable kernel thread preemption options VIMAGE # Subsystem virtualization, e.g. VNET options INET # InterNETworking options INET6 # IPv6 communications protocols -options CC_NEWRENO # include newreno congestion control -options CC_DEFAULT=\"newreno\" # define our default CC module it should be compiled in. options TCP_HHOOK # hhook(9) framework for TCP options IPSEC_SUPPORT # Allow kldload of ipsec and tcpmd5 options ROUTE_MPATH # Multipath routing support