#
ea6376ad |
| 27-Jun-2025 |
Michael Tuexen <tuexen@FreeBSD.org> |
tcp: improve name of function
Let us call the function to compute the effetive MSL tcp_eff_msl() instead of just tcp_msl(). This avoids a conflict with !VIMAGE builds, since in that case there is a
tcp: improve name of function
Let us call the function to compute the effetive MSL tcp_eff_msl() instead of just tcp_msl(). This avoids a conflict with !VIMAGE builds, since in that case there is a global variable with name tcp_msl.
Reported by: kp Fixes: 5fb4b091e835 ("tcp: allow specifying a MSL for local communications")
show more ...
|
#
c3fc0db3 |
| 27-Jun-2025 |
Michael Tuexen <tuexen@FreeBSD.org> |
tcp: set net.inet.tcp.nolocaltimewait to 0 and deprecate it
Set the default value of the sysctl-variable net.inet.tcp.nolocaltimewait to 0. This will make the behavior compliant with RFC 9293. Furt
tcp: set net.inet.tcp.nolocaltimewait to 0 and deprecate it
Set the default value of the sysctl-variable net.inet.tcp.nolocaltimewait to 0. This will make the behavior compliant with RFC 9293. Furthermore document that using the sysctl-variable is deprecated and will be removed in FreeBSD 16.
Reviewed by: glebius, Peter Lei Relnotes: yes Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D5106
show more ...
|
#
36ba7339 |
| 26-Jun-2025 |
Michael Tuexen <tuexen@FreeBSD.org> |
tcp: use 0 as the value being ignored
No functional change intended.
MFC after: 1 week Sponsored by: Netflix, Inc.
|
#
5fb4b091 |
| 26-Jun-2025 |
Michael Tuexen <tuexen@FreeBSD.org> |
tcp: allow specifying a MSL for local communications
When setting the sysctl-variable net.inet.tcp.nolocaltimewait to 1, which is the default, a TCP endpoint does not enter the TIME-WAIT state, when
tcp: allow specifying a MSL for local communications
When setting the sysctl-variable net.inet.tcp.nolocaltimewait to 1, which is the default, a TCP endpoint does not enter the TIME-WAIT state, when the communication is local. This can result in sending RST-segments without any error situation. By setting the sysctl-variable net.inet.tcp.nolocaltimewait to 0, this does not occur, and the behavior is compliant with the TCP specification. But there is no reason to stay in the TIME-WAIT state for two times the value of the sysctl-variable net.inet.tcp.msl, if the communication is local. Therefore provide a separate sysctl-variable net.inet.tcp.msl_local, which controls how long an TCP end-point stays in the TIME-WAIT state, if the communication is local. The default value is 10 ms.
Reviewed by: glebius, Peter Lei Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D50637
show more ...
|
#
49eabd40 |
| 13-Jun-2025 |
Michael Tuexen <tuexen@FreeBSD.org> |
tcp: fix handling of TIME WAIT for local TCP connections
The sysctl-variable net.inet.tcp.nolocaltimewait should affect TCP connections where the remote endpoint is on the local host and not on the
tcp: fix handling of TIME WAIT for local TCP connections
The sysctl-variable net.inet.tcp.nolocaltimewait should affect TCP connections where the remote endpoint is on the local host and not on the local area network.
Reported by: cc Reviewed by: cc MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D50830
show more ...
|
Revision tags: release/14.3.0, release/13.4.0-p5, release/13.5.0-p1, release/14.2.0-p3, release/13.5.0, release/14.2.0-p2, release/14.1.0-p8, release/13.4.0-p4, release/14.1.0-p7, release/14.2.0-p1, release/13.4.0-p3, release/14.2.0, release/13.4.0, release/14.1.0 |
|
#
3e1c8a35 |
| 06-Apr-2024 |
Michael Tuexen <tuexen@FreeBSD.org> |
tcp: improve consistency
No functional change intended.
Reported by: Coverity Scan CID: 1523781 Reviewed by: rscheff MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https
tcp: improve consistency
No functional change intended.
Reported by: Coverity Scan CID: 1523781 Reviewed by: rscheff MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D44645
show more ...
|
Revision tags: release/13.3.0 |
|
#
3eeb22cb |
| 10-Feb-2024 |
Richard Scheffenegger <rscheff@FreeBSD.org> |
tcp: clean scoreboard when releasing the socket buffer
The SACK scoreboard is conceptually an extention of the socket buffer. Remove it when the socket buffer goes away with soisdisconnected(). Veri
tcp: clean scoreboard when releasing the socket buffer
The SACK scoreboard is conceptually an extention of the socket buffer. Remove it when the socket buffer goes away with soisdisconnected(). Verify that this is also the expected state in tcp_discardcb().
PR: 276761 Reviewed by: glebius, tuexen, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D43805
show more ...
|
#
29363fb4 |
| 23-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove ancient SCCS tags.
Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl s
sys: Remove ancient SCCS tags.
Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl script.
Sponsored by: Netflix
show more ...
|
Revision tags: release/14.0.0 |
|
#
685dc743 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
#
c2a69e84 |
| 25-Apr-2023 |
Gleb Smirnoff <glebius@FreeBSD.org> |
tcp_hpts: move HPTS related fields from inpcb to tcpcb
This makes inpcb lighter and allows future cache line optimizations of tcpcb. The reason why HPTS originally used inpcb is the compressed TIME
tcp_hpts: move HPTS related fields from inpcb to tcpcb
This makes inpcb lighter and allows future cache line optimizations of tcpcb. The reason why HPTS originally used inpcb is the compressed TIME-WAIT state (see 0d7445193ab), that used to free a tcpcb, while the associated connection is still on the HPTS ring.
Reviewed by: rrs Differential Revision: https://reviews.freebsd.org/D39697
show more ...
|
Revision tags: release/13.2.0 |
|
#
eaabc937 |
| 14-Dec-2022 |
Gleb Smirnoff <glebius@FreeBSD.org> |
tcp: retire TCPDEBUG
This subsystem is superseded by modern debugging facilities, e.g. DTrace probes and TCP black box logging.
We intentionally leave SO_DEBUG in place, as many utilities may set i
tcp: retire TCPDEBUG
This subsystem is superseded by modern debugging facilities, e.g. DTrace probes and TCP black box logging.
We intentionally leave SO_DEBUG in place, as many utilities may set it on a socket. Also the tcp::debug DTrace probes look at this flag on a socket.
Reviewed by: gnn, tuexen Discussed with: rscheff, rrs, jtl Differential revision: https://reviews.freebsd.org/D37694
show more ...
|
Revision tags: release/12.4.0 |
|
#
9eb0e832 |
| 08-Nov-2022 |
Gleb Smirnoff <glebius@FreeBSD.org> |
tcp: provide macros to access inpcb and socket from a tcpcb
There should be no functional changes with this commit.
Reviewed by: rscheff Differential revision: https://reviews.freebsd.org/D37123
|
#
0d744519 |
| 07-Oct-2022 |
Gleb Smirnoff <glebius@FreeBSD.org> |
tcp: remove tcptw, the compressed timewait state structure
The memory savings the tcptw brought back in 2003 (see 340c35de6a2) no longer justify the complexity required to maintain it. For longer e
tcp: remove tcptw, the compressed timewait state structure
The memory savings the tcptw brought back in 2003 (see 340c35de6a2) no longer justify the complexity required to maintain it. For longer explanation please check out the email [1].
Surpisingly through almost 20 years the TCP stack functionality of handling the TIME_WAIT state with a normal tcpcb did not bitrot. The existing tcp_input() properly handles a tcpcb in TCPS_TIME_WAIT state, which is confirmed by the packetdrill tcp-testsuite [2].
This change just removes tcptw and leaves INP_TIMEWAIT. The flag will be removed in a separate commit. This makes it easier to review and possibly debug the changes.
[1] https://lists.freebsd.org/archives/freebsd-net/2022-January/001206.html [2] https://github.com/freebsd-net/tcp-testsuite
Differential revision: https://reviews.freebsd.org/D36398
show more ...
|
#
46ddeb6b |
| 04-Oct-2022 |
Gleb Smirnoff <glebius@FreeBSD.org> |
netinet6: retire ip6protosw.h
The netinet/ipprotosw.h and netinet6/ip6protosw.h were KAME relics, with the former removed in f0ffb944d25 in 2001 and the latter survived until today. It has been red
netinet6: retire ip6protosw.h
The netinet/ipprotosw.h and netinet6/ip6protosw.h were KAME relics, with the former removed in f0ffb944d25 in 2001 and the latter survived until today. It has been reduced down to only one useful declaration that moves to ip6_var.h
Reviewed by: melifaro Differential revision: https://reviews.freebsd.org/D36726
show more ...
|
#
0ab46f28 |
| 04-Oct-2022 |
Gleb Smirnoff <glebius@FreeBSD.org> |
tcp: remove unnecessary include of tcp6_var.h
Reviewed by: rscheff, melifaro Differential revision: https://reviews.freebsd.org/D36725
|
#
2515552e |
| 03-Oct-2022 |
Michael Tuexen <tuexen@FreeBSD.org> |
tcp: improve handling of SYN-ACK segments in TIMEWAIT state
Only consider segments with the SYN bit set and the ACK bit cleared as "new connection attempts", which result in re-using a connection be
tcp: improve handling of SYN-ACK segments in TIMEWAIT state
Only consider segments with the SYN bit set and the ACK bit cleared as "new connection attempts", which result in re-using a connection being in TIMEWAIT state. This results in consistent handling of SYN-ACK segments.
Reviewed by: rscheff@ MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D36864
show more ...
|
#
f8b56810 |
| 03-Oct-2022 |
Michael Tuexen <tuexen@FreeBSD.org> |
tcp: honor drop_synfin sysctl variable in TIME-WAIT
Reviewed by: rrs@ MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D36862
|
#
d8596171 |
| 04-Jul-2022 |
Gleb Smirnoff <glebius@FreeBSD.org> |
sockets: use only soref()/sorele() as socket reference count
o Retire SS_FDREF as it is basically a debug flag on top of already existing soref()/sorele(). o Convert SS_PROTOREF into soref()/sorel
sockets: use only soref()/sorele() as socket reference count
o Retire SS_FDREF as it is basically a debug flag on top of already existing soref()/sorele(). o Convert SS_PROTOREF into soref()/sorele(). o Change reference model for the listen queues, see below. o Make sofree() private. The correct KPI to use is only sorele(). o Make soabort() respect the model and sorele() instead of sofree().
Note on listening queues. Until now the sockets on a queue had zero reference count. And the reference were given only upon accept(2). The assumption was that there is no way to see the queued socket from anywhere except its head. This is not true, since queued sockets already have pcbs, which are linked at least into the global pcb lists. With this change we put the reference right in the sonewconn() and on accept(2) path we just hand the existing reference to the file descriptor.
Differential revision: https://reviews.freebsd.org/D35679
show more ...
|
Revision tags: release/13.1.0 |
|
#
1ebf4607 |
| 03-Feb-2022 |
Richard Scheffenegger <rscheff@FreeBSD.org> |
tcp: Access all 12 TCP header flags via inline function
In order to consistently provide access to all (including reserved) TCP header flag bits, use an accessor function tcp_get_flags and tcp_set_f
tcp: Access all 12 TCP header flags via inline function
In order to consistently provide access to all (including reserved) TCP header flag bits, use an accessor function tcp_get_flags and tcp_set_flags. Also expand any flag variable from uint8_t / char to uint16_t.
Reviewed By: hselasky, tuexen, glebius, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D34130
show more ...
|
#
a370832b |
| 26-Dec-2021 |
Gleb Smirnoff <glebius@FreeBSD.org> |
tcp: remove delayed drop KPI
No longer needed after tcp_output() can ask caller to drop.
Reviewed by: rrs, tuexen Differential revision: https://reviews.freebsd.org/D33371
|
#
c2c8e360 |
| 04-Dec-2021 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
tcp: virtualise net.inet.tcp.msl sysctl.
VNET teardown waits 2*MSL (60 seconds by default) before expiring tcp PCBs. These PCBs holds references to nexthops, which, in turn, reference ifnets. This
tcp: virtualise net.inet.tcp.msl sysctl.
VNET teardown waits 2*MSL (60 seconds by default) before expiring tcp PCBs. These PCBs holds references to nexthops, which, in turn, reference ifnets. This chain results in VNET interfaces being destroyed and moved to default VNET only after 60 seconds. Allow tcp_msl to be set in jail by virtualising net.inet.tcp.msl sysctl, permitting more predictable VNET tests outcomes.
MFC after: 1 week Reviewed by: glebius Differential Revision: https://reviews.freebsd.org/D33270
show more ...
|
#
2a28b045 |
| 20-Dec-2021 |
Robert Wing <rew@FreeBSD.org> |
tcp_twrespond: send signed segment when connection is TCP-MD5
When a connection is established to use TCP-MD5, tcp_twrespond() doesn't respond with a signed segment. This results in the host perform
tcp_twrespond: send signed segment when connection is TCP-MD5
When a connection is established to use TCP-MD5, tcp_twrespond() doesn't respond with a signed segment. This results in the host performing the active close to remain in a TIME_WAIT state and the other host in the LAST_ACK state. Fix this by sending a signed segment when the connection is established to use TCP-MD5.
Reviewed by: glebius Differential Revision: https://reviews.freebsd.org/D33490
show more ...
|
#
71d2d5ad |
| 19-Dec-2021 |
Gleb Smirnoff <glebius@FreeBSD.org> |
tcptw: count how many times a tcptw was actually useful
This will allow a sysadmin to lower net.inet.tcp.msl and see how long tcptw are actually useful.
|
#
cb377263 |
| 19-Dec-2021 |
Gleb Smirnoff <glebius@FreeBSD.org> |
tcptw: remove unused fields
The structure goes away anyway, but it would be interesting to know how much memory we used to save with it. So for the record, structure size with this revision is 64 b
tcptw: remove unused fields
The structure goes away anyway, but it would be interesting to know how much memory we used to save with it. So for the record, structure size with this revision is 64 bytes.
show more ...
|
#
db0ac6de |
| 02-Dec-2021 |
Cy Schubert <cy@FreeBSD.org> |
Revert "wpa: Import wpa_supplicant/hostapd commit 14ab4a816"
This reverts commit 266f97b5e9a7958e365e78288616a459b40d924a, reversing changes made to a10253cffea84c0c980a36ba6776b00ed96c3e3b.
A mism
Revert "wpa: Import wpa_supplicant/hostapd commit 14ab4a816"
This reverts commit 266f97b5e9a7958e365e78288616a459b40d924a, reversing changes made to a10253cffea84c0c980a36ba6776b00ed96c3e3b.
A mismerge of a merge to catch up to main resulted in files being committed which should not have been.
show more ...
|