The branch main has been updated by imp:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=7e3c9ec906c0710e34fa5b11104ee1c12f68a09f

commit 7e3c9ec906c0710e34fa5b11104ee1c12f68a09f
Author:     Warner Losh <[email protected]>
AuthorDate: 2021-11-12 17:05:03 +0000
Commit:     Warner Losh <[email protected]>
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 <netinet/cc/cc.h>
 #include <netinet/cc/cc_module.h>
 
+/*
+ * 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

Reply via email to