From nobody Tue Aug 2 14:51:12 2022 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 4Lxyc05v9Sz4YJKQ; Tue, 2 Aug 2022 14:51:12 +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 4Lxyc05H3zz3cnq; Tue, 2 Aug 2022 14:51:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659451872; 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=VgOf69LbD5siSwcrBMcpUG21eKDE5JoOMvzXu6fioLM=; b=ecmG+IJ5TzNTU5g7wF4fSP5J3pHhw2R43KJdhRDPB4pbHTqsohLe8xd+jbH8ReSMbufdeo rUF7qLlm3tLF2pr5RdwSTQXQ6W11servMEU7MdWqRJx79pbvW3D2ZusEnmuGoNJ1plwEh8 thJ9fQLNlexFiuwD4zNZPlSU9lnKyY6sex34bDa2N8jJrB4kXFjyYIhwzAvkFSkUfgDsP4 hrf3l2TeDAJQKzSsx4WoqUtJeRcGVNlC7v7nYrPWfOfNumZCEXh2qOng03aDx9uLXfifLE ZlYnCl61shhOGGvImnX7BSZWyAyJfGClnew9pRyDHDddoTIEeDAB3JYA0AbDeA== 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 4Lxyc042H3zGqL; Tue, 2 Aug 2022 14:51:12 +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 272EpChs027165; Tue, 2 Aug 2022 14:51:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 272EpCOc027164; Tue, 2 Aug 2022 14:51:12 GMT (envelope-from git) Date: Tue, 2 Aug 2022 14:51:12 GMT Message-Id: <202208021451.272EpCOc027164@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mike Karels Subject: git: 3dce6f96e515 - main - tcp.4: Add missing sysctls, other fixes 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: karels X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3dce6f96e515245f8fb6c540df07af1af838ab89 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659451872; 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=VgOf69LbD5siSwcrBMcpUG21eKDE5JoOMvzXu6fioLM=; b=bl1VJQXOO9TAwBNoO5NIVeM3unvWnY3JBHW/PjN6ZHsGJGz21jqtGz9O7ccAju0KJ5hxoO cymvHi+zDbZNRLGpWxUZAUP0uLdrTvlPfAJ3uktEGvHA7jajX33fUA24UfIz0Ic0TkrjQU l1qiTVBWXd6ua0Akvhzmux8ckpjw8t8COswYemRL3ehorRM21y42txPqMv4NcFALnkTIfn 5wHHBOVjGPRusfOMmYlvt/Vq9lDLJY+nA2JVfL/+nKoygui+jvg4RvrLuSA2zo5Z51wsww l+oCPgI8TR3DL+bXOr4wLgHczWTLKtpvNovyy+McnI2d+FvwUnsAwdbrcG5T3w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1659451872; a=rsa-sha256; cv=none; b=ckFYQJX37tXEGL8dwvI36Q21ZLegY+EUs2HzLznD38rz7iav7V8GRcgOiinfJPtYL2pFpX wfMVOgUmbbaAhNia3+0H5SKWsmxocXtfSAJwHvhmFxSEhPbEY/CBC5Hwrb7iabGyYj6/zi 3yq6N3ssZ6oQw0Fc7aiKxShXiDraOYh9Ui52xaaaonuauOHVhwDyA8+kUFIycm9P/2aYxU JEo/5LCF5Z7bSfTDhAcKDtXy/F2Z6YYKIHE5m7gI8Ua1o2EUUEsRG+hnvHFLohKNb9h7Oz o+oIe0FfDm6NitFtVGzT8VnsLc+hBsZCe4pc91jsa7Xwq9+d5Fyf7X4UQf/nwg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by karels: URL: https://cgit.FreeBSD.org/src/commit/?id=3dce6f96e515245f8fb6c540df07af1af838ab89 commit 3dce6f96e515245f8fb6c540df07af1af838ab89 Author: Mike Karels AuthorDate: 2022-07-31 18:57:03 +0000 Commit: Mike Karels CommitDate: 2022-08-02 14:51:03 +0000 tcp.4: Add missing sysctls, other fixes Add some of the missing sysctls to tcp.4, using references to other man pages where they exist. Added sysctls include recvbuf and sendbuf controls for automatic buffer sizing. Updated recvspace and sendspace. Add sysctl.8 to "see also" and intro to variable section. Rename "MIB Variables" section to "MIB (sysctl) Variables", as most people will associate with sysctl. Reviewed by: manpages(pauamma), tuexen Differential Revision: https://reviews.freebsd.org/D36004 --- share/man/man4/tcp.4 | 98 ++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 80 insertions(+), 18 deletions(-) diff --git a/share/man/man4/tcp.4 b/share/man/man4/tcp.4 index 483984112031..cdb58c7cbacc 100644 --- a/share/man/man4/tcp.4 +++ b/share/man/man4/tcp.4 @@ -34,7 +34,7 @@ .\" From: @(#)tcp.4 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd July 20, 2022 +.Dd August 1, 2022 .Dt TCP 4 .Os .Sh NAME @@ -203,12 +203,12 @@ The alternate TCP stack must already be loaded in the kernel. To list the available TCP stacks, see .Va functions_available in the -.Sx MIB Variables +.Sx MIB (sysctl) Variables section further down. To list the default TCP stack, see .Va functions_default in the -.Sx MIB Variables +.Sx MIB (sysctl) Variables section. .It Dv TCP_KEEPINIT This @@ -221,7 +221,7 @@ connections. For the global default in milliseconds see .Va keepinit in the -.Sx MIB Variables +.Sx MIB (sysctl) Variables section further down. .It Dv TCP_KEEPIDLE This @@ -237,7 +237,7 @@ socket upon For the global default in milliseconds see .Va keepidle in the -.Sx MIB Variables +.Sx MIB (sysctl) Variables section further down. .It Dv TCP_KEEPINTVL This @@ -252,7 +252,7 @@ socket upon For the global default in milliseconds see .Va keepintvl in the -.Sx MIB Variables +.Sx MIB (sysctl) Variables section further down. .It Dv TCP_KEEPCNT This @@ -267,7 +267,7 @@ socket upon For the global default see the .Va keepcnt in the -.Sx MIB Variables +.Sx MIB (sysctl) Variables section further down. .It Dv TCP_NODELAY Under most circumstances, @@ -413,14 +413,15 @@ is Other congestion control algorithms can be made available using the .Xr mod_cc 4 framework. -.Ss MIB Variables +.Ss MIB (sysctl) Variables The .Tn TCP protocol implements a number of variables in the .Va net.inet.tcp branch of the .Xr sysctl 3 -MIB. +MIB, which can also be read or modified with +.Xr sysctl 8 . .Bl -tag -width ".Va v6pmtud_blackhole_mss" .It Va always_keepalive Assume that @@ -432,13 +433,28 @@ periodically send a packet to the remote host to verify the connection is still up. .It Va blackhole If enabled, disable sending of RST when a connection is attempted -to a port where there is not a socket accepting connections. +to a port where there is no socket accepting connections. See .Xr blackhole 4 . +.It Va blackhole_local +See +.Xr blackhole 4 . +.It Va cc +A number of variables for congestion control are under the +.Va net.inet.tcp.cc +node. +See +.Xr mod_cc 4 . +.It Va cc.newreno +Variables for NewReno congestion control are under the +.Va net.inet.tcp.cc.newreno +node. +See +.Xr cc_newreno 4 . .It Va delacktime Maximum amount of time, in milliseconds, before a delayed ACK is sent. .It Va delayed_ack -Delay ACK to try and piggyback it onto a data packet. +Delay ACK to try and piggyback it onto a data packet or another ACK. .It Va do_lrd Enable Lost Retransmission Detection for SACK-enabled sessions, disabled by default. @@ -463,6 +479,8 @@ high losses leading to RTO, but reduces PRR effectiveness in more common setting Flush packets in the .Tn TCP reassembly queue if the system is low on mbufs. +.It Va drop_synfin +Drop TCP packets with both SYN and FIN set. .It Va ecn.enable Enable support for TCP Explicit Congestion Notification (ECN). ECN allows a TCP sender to reduce the transmission rate in order to @@ -706,7 +724,7 @@ machines, when no response is received on a probe. The default is 75000 msec (75K msec, 75 sec). .It Va log_in_vain -Log any connection attempts to ports where there is not a socket +Log any connection attempts to ports where there is no socket accepting connections. The value of 1 limits the logging to .Tn SYN @@ -733,12 +751,15 @@ MIB variable controls the maximum number of these structures allocated. By default, it is initialized to .Va kern.ipc.maxsockets / 5. +.It Va minmss +Minimum TCP Maximum Segment Size; used to prevent a denial of service attack +from an unreasonably low MSS. .It Va msl The Maximum Segment Lifetime, in milliseconds, for a packet. .It Va mssdflt -The default value used for the maximum segment size +The default value used for the TCP Maximum Segment Size .Pq Dq MSS -when no advice to the contrary is received from MSS negotiation. +for IPv4 when no advice to the contrary is received from MSS negotiation. .It Va newcwd Enable the New Congestion Window Validation mechanism as described in RFC 7661. This gently reduces the congestion window during periods, where TCP is @@ -766,6 +787,10 @@ A CSV list of template_spec=percent key-value pairs which controls the per template sampling rates when .Xr stats 3 sampling is enabled. +.It Va persmax +Maximum persistence interval, msec. +.It Va persmin +Minimum persistence interval, msec. .It Va pmtud_blackhole_detection Enable automatic path MTU blackhole detection. In case of retransmits of MSS sized segments, @@ -808,10 +833,21 @@ limit. The maximum limit on the total number of segments across all reassembly queues. The limit can be adjusted as a tunable. +.It Va recvbuf_auto +Enable automatic receive buffer sizing as a connection progresses. +.It Va recvbuf_max +Maximum size of automatic receive buffer. .It Va recvspace -Maximum +Initial .Tn TCP -receive window. +receive window (buffer size). +.It Va require_unique_port +Require unique ephemeral port for outgoing connections; +otherwise, the 4-tuple of local and remote ports and addresses must be unique. +Requiring a unique port limits the number of outgoing connections. +.It Va rexmit_drop_options +Drop TCP options from third and later retransmitted SYN segments +of a connection. .It Va rexmit_initial , rexmit_min , rexmit_slop Adjust the retransmit timer calculation for .Tn TCP . @@ -857,6 +893,8 @@ Enable support for RFC 2018, TCP Selective Acknowledgment option, which allows the receiver to inform the sender about all successfully arrived segments, allowing the sender to retransmit the missing segments only. +.It Va sack.globalholes +Global number of TCP SACK holes currently allocated. .It Va sack.globalmaxholes Maximum number of SACK holes per system, across all connections. Defaults to 65536. @@ -874,10 +912,24 @@ recovery, the trailing segment is immediately resent, rather than waiting for a Retransmission timeout. Finally, SACK loss recovery is also engaged, once two segments plus one byte are SACKed - even if no traditional duplicate ACKs were observed. +.It Va sendbuf_auto +Enable automatic send buffer sizing. +.It Va sendbuf_auto_lowat +Modify threshold for auto send buffer growth to account for +.Dv SO_SNDLOWAT . +.It Va sendbuf_inc +Incrementor step size of automatic send buffer. +.It Va sendbuf_max +Maximum size of automatic send buffer. .It Va sendspace -Maximum +Initial .Tn TCP -send window. +send window (buffer size). +.It Va syncache +Variables under the +.Va net.inet.tcp.syncache +node are documented in +.Xr syncache 4 . .It Va syncookies Determines whether or not .Tn SYN @@ -890,6 +942,9 @@ cookies are a great help during flood attacks, and are enabled by default. (See .Xr syncookies 4 . ) +.It Va syncookies_only +See +.Xr syncookies 4 . .It Va tcbhashsize Size of the .Tn TCP @@ -916,6 +971,8 @@ Therefore the default is 1, i.e., the missing of timestamps is tolerated. When initializing the TCP timestamps, use a per connection offset instead of a per host pair offset. Default is to use per connection offsets as recommended in RFC 7323. +.It Va tso +Enable TCP Segmentation Offload. .It Va udp_tunneling_overhead The overhead taken into account when using UDP encapsulation. Since MSS clamping by middleboxes will most likely not work, values larger than @@ -926,6 +983,10 @@ The default is 8. The local UDP encapsulation port. A value of 0 indicates that UDP encapsulation is disabled. The default is 0. +.It Va v6mssdflt +The default value used for the TCP Maximum Segment Size +.Pq Dq MSS +for IPv6 when no advice to the contrary is received from MSS negotiation. .It Va v6pmtud_blackhole_mss MSS to try for IPv6 if PMTU blackhole detection is turned on. See @@ -981,6 +1042,7 @@ when trying to use a TCP function block that is not available; .Xr syncache 4 , .Xr tcp_bbr 4 , .Xr setkey 8 , +.Xr sysctl 8 , .Xr tcp_functions 9 .Rs .%A "V. Jacobson"