From nobody Tue Jan 16 19:05:07 2024 X-Original-To: dev-commits-src-all@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 4TDz3R2bRXz57qv7; Tue, 16 Jan 2024 19:05:07 +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 4TDz3R266lz54P5; Tue, 16 Jan 2024 19:05:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705431907; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7BoV8qQ9mSN8o0yp4gu4Di6Sv9+oTNLOz0hvpiqQAuI=; b=YitPh3BZy2fO4KkipfYZBvKDuBBDkDtC9BKg9YgiibMXyb5jgxxBSB4j5XlUOl5wHZ5LHL MV1yRS+ikPGIwMMUCHZeetaPm+0eh9gH3CwiFnmpPMfrhmRpLVFMEbL9g8Wg95JQOMjEX+ y3P0VeRId9hWDw9k4yCBgjpuZ/9d5hDQTvQwGYRz+/8ZgGZbiQZW4HCfoPsy71k7GiSRyF Y24may7gv6ZzQzCcGsVfa4WijvWXcNIlnqWounkjxXUzom2F3HJsANW5v/D+uHeJlAXgrh zRkSEIvTuqVAon6lBfDnRmrMBg8ZsJU06uAlmxmagJkL0PTApBtwDxgtCS0AVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705431907; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7BoV8qQ9mSN8o0yp4gu4Di6Sv9+oTNLOz0hvpiqQAuI=; b=lAYquDrRvPprKdD/ZPwlkzZvY5GaA5TB2jGbW5+fc7NH4B5upaVdD2BhOru9Ml6YQsguF9 BahbdYcexZrLPesZlTQxfSqfBq8jo0TIr+y/jjSy6gr0VSAFNdOp8+ok0Ap2r1vPZQiat/ fFJFWGDm/7pJm5O6ByraFuycSZ2mPFSvV7Vfol5nUZ6HsLzNS915y/6GUh4DJPmz90bRoa 54bAoiCEtcOoWzhTQ8WOG6WXQqKDnAeK+ZifDD3cUHEuZDUbH+ULJNOEGWrnsM20oq2xed RQ1m/iHT+ALP4msNUBHiNtC/aNadwmFsB2d2bD5Qsws81Wkk/rDm/yP8tqddcw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705431907; a=rsa-sha256; cv=none; b=P2w/WVLrNDv+q+dO+VbKQvTBtgCv6UC9ibvzYs2mFr3ylsMbitTDHSOgrSBEgD1cWoelfL wgDiNOBXD79Pe3bNzozLruOhy5tHXzyiHpujOt3O9NvQEqtRnCyZcqVxxMkikmAjWL2N2r DRv85DYrYc1zjsjE2spE6MmCq4rknMd/VkHE342pBjHBSP66r7S74rh5xUlRjRF1390r6W /U56Ckdcxitga7sc3PrUoBVQXUIqKRfz4ZBI65uEs6YEEaiQmDseLNpQjTOeYCEYIZ9ltW a9HMFjYO6HOGg0p3pOdsFH3sFXy1m/mfwKqh76HrL9bX5K8l7NoCwdtkxl4uvQ== 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 4TDz3R1B2Lzs8Z; Tue, 16 Jan 2024 19:05:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40GJ57ve009833; Tue, 16 Jan 2024 19:05:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40GJ57am009830; Tue, 16 Jan 2024 19:05:07 GMT (envelope-from git) Date: Tue, 16 Jan 2024 19:05:07 GMT Message-Id: <202401161905.40GJ57am009830@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gleb Smirnoff Subject: git: 123fd2a93eea - stable/14 - Add the BBR and RACK stacks to the LINT kernel. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 123fd2a93eeaeff0bb3ac433526296f44b75e368 Auto-Submitted: auto-generated The branch stable/14 has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=123fd2a93eeaeff0bb3ac433526296f44b75e368 commit 123fd2a93eeaeff0bb3ac433526296f44b75e368 Author: Dag-Erling Smørgrav AuthorDate: 2023-10-18 14:13:12 +0000 Commit: Gleb Smirnoff CommitDate: 2024-01-16 18:32:07 +0000 Add the BBR and RACK stacks to the LINT kernel. While here, drop the EXTRA_TCP_STACKS option, which serves no purpose and should never have been added. Instead, build bbr and rack as long as either or both of INET and INET6 is enabled. There is no risk to anyone who doesn't load one or both and then twiddle the relevant sysctls. Differential Revision: https://reviews.freebsd.org/D42088 (cherry picked from commit 3a338c534154164504005beb00a3c6feb03756cc) --- share/man/man5/src.conf.5 | 2 -- sys/conf/NOTES | 4 +++- sys/conf/files | 7 +++++++ sys/conf/kern.opts.mk | 1 - sys/conf/kern.post.mk | 4 ---- sys/conf/options | 2 ++ sys/modules/tcp/Makefile | 7 ++----- 7 files changed, 14 insertions(+), 13 deletions(-) diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index b31d44abde9f..89070b097f6f 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -643,8 +643,6 @@ Avoid installing examples to .Pa /usr/share/examples/ . .It Va WITH_EXPERIMENTAL Include experimental features in the build. -.It Va WITH_EXTRA_TCP_STACKS -Build extra TCP stack modules. .It Va WITHOUT_FDT Do not build Flattened Device Tree support as part of the base system. This includes the device tree compiler (dtc) and libfdt support library. diff --git a/sys/conf/NOTES b/sys/conf/NOTES index 088bd7426a77..45dd6c30c7ba 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -678,7 +678,6 @@ options TCP_OFFLOAD # TCP offload support. options TCP_RFC7413 # TCP Fast Open options TCPHPTS -makeoptions WITH_EXTRA_TCP_STACKS=1 # RACK and BBR TCP kernel modules # In order to enable IPSEC you MUST also add device crypto to # your kernel configuration @@ -690,6 +689,9 @@ options IPSEC #IP security (requires device crypto) options IPSEC_SUPPORT #options IPSEC_DEBUG #debug for IP security +# Alternative TCP stacks +options TCP_BBR +options TCP_RACK # TLS framing and encryption/decryption of data over TCP sockets. options KERN_TLS # TLS transmit and receive offload diff --git a/sys/conf/files b/sys/conf/files index 39b68a79e20f..2b558bf339a8 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -4362,6 +4362,13 @@ netinet/tcp_pcap.c optional inet tcppcap | inet6 tcppcap \ compile-with "${NORMAL_C} ${NO_WNONNULL}" netinet/tcp_reass.c optional inet | inet6 netinet/tcp_sack.c optional inet | inet6 +netinet/tcp_stacks/bbr.c optional inet tcp_bbr | inet6 tcp_bbr \ + compile-with "${NORMAL_C} -DMODNAME=tcp_bbr -DSTACKNAME=bbr" +netinet/tcp_stacks/rack.c optional inet tcp_bbr | inet6 tcp_bbr \ + compile-with "${NORMAL_C} -DMODNAME=tcp_rack -DSTACKNAME=rack" +netinet/tcp_stacks/rack_bbr_common.c optional inet tcp_bbr | inet tcp_rack | inet6 tcp_bbr | inet6 tcp_rack +netinet/tcp_stacks/sack_filter.c optional inet tcp_bbr | inet tcp_rack | inet6 tcp_bbr | inet6 tcp_rack +netinet/tcp_stacks/tailq_hash.c optional inet tcp_bbr | inet tcp_rack | inet6 tcp_bbr | inet6 tcp_rack netinet/tcp_stats.c optional stats inet | stats inet6 netinet/tcp_subr.c optional inet | inet6 netinet/tcp_syncache.c optional inet | inet6 diff --git a/sys/conf/kern.opts.mk b/sys/conf/kern.opts.mk index 178a4db61cb2..f8bedab700b4 100644 --- a/sys/conf/kern.opts.mk +++ b/sys/conf/kern.opts.mk @@ -56,7 +56,6 @@ __DEFAULT_YES_OPTIONS = \ __DEFAULT_NO_OPTIONS = \ BHYVE_SNAPSHOT \ - EXTRA_TCP_STACKS \ INIT_ALL_PATTERN \ INIT_ALL_ZERO \ KERNEL_RETPOLINE \ diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk index f42ec4a9564b..d74087fc7c3d 100644 --- a/sys/conf/kern.post.mk +++ b/sys/conf/kern.post.mk @@ -33,10 +33,6 @@ MKMODULESENV+= CONF_CFLAGS="${CONF_CFLAGS}" MKMODULESENV+= WITH_CTF="${WITH_CTF}" .endif -.if defined(WITH_EXTRA_TCP_STACKS) -MKMODULESENV+= WITH_EXTRA_TCP_STACKS="${WITH_EXTRA_TCP_STACKS}" -.endif - .if !empty(KCSAN_ENABLED) MKMODULESENV+= KCSAN_ENABLED="yes" .endif diff --git a/sys/conf/options b/sys/conf/options index aede28eeaaa7..31ddbe2e6981 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -229,6 +229,8 @@ SW_WATCHDOG opt_watchdog.h TCPHPTS opt_inet.h TCP_REQUEST_TRK opt_global.h TCP_ACCOUNTING opt_global.h +TCP_BBR opt_inet.h +TCP_RACK opt_inet.h # # TCP SaD Detection is an experimental Sack attack Detection (SaD) # algorithm that uses "normal" behaviour with SACK's to detect diff --git a/sys/modules/tcp/Makefile b/sys/modules/tcp/Makefile index 8f89977b5b69..364c0326c40d 100644 --- a/sys/modules/tcp/Makefile +++ b/sys/modules/tcp/Makefile @@ -8,13 +8,10 @@ SUBDIR= \ ${_tcp_rack} \ ${_tcpmd5} \ -.if ${MK_EXTRA_TCP_STACKS} != "no" || defined(ALL_MODULES) -_tcp_bbr= bbr -_tcp_rack= rack -.endif - .if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \ defined(ALL_MODULES) +_tcp_bbr= bbr +_tcp_rack= rack .if ${KERN_OPTS:MIPSEC_SUPPORT} && !${KERN_OPTS:MTCP_SIGNATURE} _tcpmd5= tcpmd5 .endif