History log of /freebsd/sys/netinet/tcp_subr.c (Results 1 – 25 of 1235)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# d7c807aa 09-Jul-2025 Konstantin Belousov <kib@FreeBSD.org>

sysctl net.inet.tcp.ktcplist: properly fill driver status length field

Also ignore errors from drivers. If driver snd_tag status method
returned an error, silently ignore the returned string, and no

sysctl net.inet.tcp.ktcplist: properly fill driver status length field

Also ignore errors from drivers. If driver snd_tag status method
returned an error, silently ignore the returned string, and not advance
the position of the filled buffer.

Sponsored by: Nvidia networking

show more ...


# 18905fc3 03-Jul-2025 Konstantin Belousov <kib@FreeBSD.org>

sysctl net.inet.tcp.ktcplist: try to handle EDEADLK

If EDEADLK is returned from the locked handler, restart it. Do it
limited number of times. Catch signals between tries.

Reviewed by: glebius, m

sysctl net.inet.tcp.ktcplist: try to handle EDEADLK

If EDEADLK is returned from the locked handler, restart it. Do it
limited number of times. Catch signals between tries.

Reviewed by: glebius, markj
Sponsored by: Nvidia networking
Differential revision: https://reviews.freebsd.org/D51143

show more ...


# b435452e 03-Jul-2025 Konstantin Belousov <kib@FreeBSD.org>

sysctl net.inet.tcp.ktlslist: allow snd_tag_status_str() to sleep

For this, unlock inp around the calls, taking the reference on it. If
the inp appears to be freed or unlinked after the relock, ret

sysctl net.inet.tcp.ktlslist: allow snd_tag_status_str() to sleep

For this, unlock inp around the calls, taking the reference on it. If
the inp appears to be freed or unlinked after the relock, return
EDEADLK.

Reviewed by: glebius, markj
Sponsored by: Nvidia networking
Differential revision: https://reviews.freebsd.org/D51143

show more ...


Revision tags: release/14.3.0-p1, release/14.2.0-p4, release/13.5.0-p2
# e0f7e732 01-Jul-2025 Michael Tuexen <tuexen@FreeBSD.org>

tcp: remove an invalid KASSERT

Since TCP endpoints in the TIME-WAIT state are no longer special,
allow them to be switched over to the default stack.

Reported by: syzbot+902d31bb0e68a1e8c088@syzka

tcp: remove an invalid KASSERT

Since TCP endpoints in the TIME-WAIT state are no longer special,
allow them to be switched over to the default stack.

Reported by: syzbot+902d31bb0e68a1e8c088@syzkaller.appspotmail.com
Reviewed by: cc
MFC after: 1 week
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D51090

show more ...


# 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 ...


# 0b33b25b 26-Jun-2025 Michael Tuexen <tuexen@FreeBSD.org>

tcp: cleanup timer initialisations

Use MSEC_2_TICKS() to make clearer, which values are used and to
ensure that the value stored is at least one tick. This also avoids
the need of some protection co

tcp: cleanup timer initialisations

Use MSEC_2_TICKS() to make clearer, which values are used and to
ensure that the value stored is at least one tick. This also avoids
the need of some protection code.

Reviewed by: glebius, cc
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D50840

show more ...


# 614087c6 24-Jun-2025 Konstantin Belousov <kib@FreeBSD.org>

sysctl net.inet.tcp.ktlslist: do not rely on global generation for ktls sessions

Disallow parallel executions for the sysctl, which makes it possible to
have the generation count for the sysctl requ

sysctl net.inet.tcp.ktlslist: do not rely on global generation for ktls sessions

Disallow parallel executions for the sysctl, which makes it possible to
have the generation count for the sysctl requests itself instead of for the
sessions. When the first pass over inpcbs is done, assign them the
request' gen count. On the second pass, only externalize the inpcbs
with ktls sessions which gen count is equal to the current request.

This way, we can be sure that the second pass does not copy out more
inpcbs than was counted for in the first pass, while eliminating the
global atomic op during ktls session creation.

Requested by: gallatin
Reviewed by: gallatin, markj
Sponsored by: NVidia networking
Differential revision: https://reviews.freebsd.org/D51000

show more ...


# 552d1780 17-Jun-2025 Gleb Smirnoff <glebius@FreeBSD.org>

tcp: provide sysctl for the maximum retransmission timeout

Reviewed by: tuexen
Differential Revision: https://reviews.freebsd.org/D50891


# d8496725 16-Jun-2025 Michael Tuexen <tuexen@FreeBSD.org>

Revert "tcp: cleanup timer initialisations"

This reverts commit c13f4b1574da77f89ab57cfcc87fe8ad80f25263.
Using MSEC_2_TICKS() breaks compiling
contrib/bsnmp/snmp_mibII/mibII_tcp.c
since it includes

Revert "tcp: cleanup timer initialisations"

This reverts commit c13f4b1574da77f89ab57cfcc87fe8ad80f25263.
Using MSEC_2_TICKS() breaks compiling
contrib/bsnmp/snmp_mibII/mibII_tcp.c
since it includes tcp_timer.h in userland and MSEC_2_TICKS() is
only defined for kernel land.

show more ...


# c13f4b15 16-Jun-2025 Michael Tuexen <tuexen@FreeBSD.org>

tcp: cleanup timer initialisations

Use MSEC_2_TICKS() to make clearer, which values are used and to
ensure that the value stored is at least one tick.
This also avoids the need of some protection co

tcp: cleanup timer initialisations

Use MSEC_2_TICKS() to make clearer, which values are used and to
ensure that the value stored is at least one tick.
This also avoids the need of some protection code.

Reviewed by: cc, glebius
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D50840

show more ...


Revision tags: release/14.3.0
# 5fea0d9e 20-May-2025 Konstantin Belousov <kib@FreeBSD.org>

sysctl net.inet.tcp.ktlslist

Reviewed by: jhb (previous version), markj
Sponsored by: NVidia networking
Differential revision: https://reviews.freebsd.org/D50653


Revision tags: release/13.4.0-p5, release/13.5.0-p1, release/14.2.0-p3
# 382af4d3 04-Apr-2025 Peter Lei <peterlei@netflix.com>

tcp: clear blackbox logging union

Clear the black box logging containing union rather than the u_bbr
structure for clarity and consistency. Currently u_bbr, u_raw, and
u64_raw are the same size.
No

tcp: clear blackbox logging union

Clear the black box logging containing union rather than the u_bbr
structure for clarity and consistency. Currently u_bbr, u_raw, and
u64_raw are the same size.
No functional change intended.

Reviewed by: tuexen
MFC after: 3 days
Sponsored by: Netflix, Inc.

show more ...


# 6e764890 31-Mar-2025 Michael Tuexen <tuexen@FreeBSD.org>

tcp: remove support for TCPPCAP

This feature could be used to store the last sent and received TCP
packets for a TCP endpoint. There was no utility to get these packets
from a live system or core.
T

tcp: remove support for TCPPCAP

This feature could be used to store the last sent and received TCP
packets for a TCP endpoint. There was no utility to get these packets
from a live system or core.
This functionality is now provided by TCP Black Box Logging, which also
stores additional events. There are tools to get these traces from a
live system or a core.
Therefore remove TCPPCAP to avoid maintaining it, when it is not
used anymore.

Reviewed by: rrs, rscheff, Peter Lei, glebiu
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D49589

show more ...


# 3ff865c6 20-Mar-2025 Mark Johnston <markj@FreeBSD.org>

netinet: Fix getcred sysctl handlers to do nothing if no input is given

These routines were all assuming that the sysctl handler has some new
value, but this is not the case. SYSCTL_IN() returns 0

netinet: Fix getcred sysctl handlers to do nothing if no input is given

These routines were all assuming that the sysctl handler has some new
value, but this is not the case. SYSCTL_IN() returns 0 in this
scenario, so they were all operating on an uninitialized address. This
is mostly harmless, but trips KMSAN checks, so let's fix them.

Reviewed by: zlei, rrs, glebius
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D49348

show more ...


Revision tags: release/13.5.0
# 8ee127ef 23-Feb-2025 SHENGYI HONG <aokblast@FreeBSD.org>

vm_lowmem: Fix signature mismatches in vm_lowmem callbacks

This is required for kernel CFI.

Reviewed by: rrs, jhb, glebius
Differential Revision: https://reviews.freebsd.org/D49111


Revision tags: 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
# 2944a888 21-Nov-2024 Gleb Smirnoff <glebius@FreeBSD.org>

tcp: remove so != NULL check

In the modern FreeBSD network stack a socket outlives its tcpcb.


# 09000cc1 21-Nov-2024 Gleb Smirnoff <glebius@FreeBSD.org>

tcp: mechanically rename hostcache metrics structure fields

Use hc_ prefix instead of rmx_. The latter stands for "route metrix" and
is an artifact from the 90-ies, when TCP caching was embedded in

tcp: mechanically rename hostcache metrics structure fields

Use hc_ prefix instead of rmx_. The latter stands for "route metrix" and
is an artifact from the 90-ies, when TCP caching was embedded into the
routing table. The rename should have happened back in 97d8d152c28bb.

No functional change. Done with sed(1) command:

s/rmx_(mtu|ssthresh|rtt|rttvar|cwnd|sendpipe|recvpipe|granularity|expire|q|hits|updates)/hc_\1/g

show more ...


# fb7c1ac5 14-Nov-2024 Gleb Smirnoff <glebius@FreeBSD.org>

tcp: remove the looping on pcb count in tcp_destroy()

This was useful when TCP timers were not able to reliably stop. Note that
in_pcbinfo_destroy() called later asserts that V_tcbinfo.ipi_count is

tcp: remove the looping on pcb count in tcp_destroy()

This was useful when TCP timers were not able to reliably stop. Note that
in_pcbinfo_destroy() called later asserts that V_tcbinfo.ipi_count is 0.

This reverts 806929d514234, b54e08e11ac15.

show more ...


# dded4e9e 14-Nov-2024 Richard Scheffenegger <rscheff@FreeBSD.org>

tcp: change SOCKBUF_* macros to SOCK_[RECV|SEND]BUF_* macros

Change the older LOCK related macros over to the
dedicated send/recv buffer macros in the base tcp stack.

No functional change intended.

tcp: change SOCKBUF_* macros to SOCK_[RECV|SEND]BUF_* macros

Change the older LOCK related macros over to the
dedicated send/recv buffer macros in the base tcp stack.

No functional change intended.

Reviewed By: tuexen, #transport
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D47567

show more ...


# bffebc33 24-Oct-2024 Gleb Smirnoff <glebius@FreeBSD.org>

tcp: use CALLOUT_TRYLOCK for the TCP callout

This allows to remove the drop of the lock tcp_timer_enter(), which closes
a sophisticated but possible race that involves three threads. In case we
got

tcp: use CALLOUT_TRYLOCK for the TCP callout

This allows to remove the drop of the lock tcp_timer_enter(), which closes
a sophisticated but possible race that involves three threads. In case we
got a callout executing and two threads trying to close the connection,
e.g. and interrupt and a syscall, then lock yielding in tcp_timer_enter()
may transfer lock from one closing thread to the other closing thread,
instead of the callout.

Reviewed by: jtl
Differential Revision: https://reviews.freebsd.org/D45747

show more ...


Revision tags: release/13.4.0
# 9b569353 09-Aug-2024 Michael Tuexen <tuexen@FreeBSD.org>

tcp: initialize V_ts_offset_secret for all vnets

Initialize V_ts_offset_secret for each vnet, not only for the
default vnet, since it is vnet specific.

Reviewed by: Peter Lei
MFC after: 3 days
Sp

tcp: initialize V_ts_offset_secret for all vnets

Initialize V_ts_offset_secret for each vnet, not only for the
default vnet, since it is vnet specific.

Reviewed by: Peter Lei
MFC after: 3 days
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D46246

show more ...


# d6fb9f8c 03-Aug-2024 Michael Tuexen <tuexen@FreeBSD.org>

tcp: inherit CC algorithm from listener

Like any other parameter, the CC algorithm should be inherited from
the listener.

Reviewed by: cc
Sponsored by: Netflix, Inc.
Differential Revision: https:

tcp: inherit CC algorithm from listener

Like any other parameter, the CC algorithm should be inherited from
the listener.

Reviewed by: cc
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D46143

show more ...


# 4036380e 28-Jul-2024 Michael Tuexen <tuexen@FreeBSD.org>

tcp: vnetify sysctl variables ack_war_timewindow and ack_war_cnt

As suggested by glebius@. While there, improve the documentation.

Reviewed by: Peter Lei, cc
MFC after: 1 week
Sponsored by: Netf

tcp: vnetify sysctl variables ack_war_timewindow and ack_war_cnt

As suggested by glebius@. While there, improve the documentation.

Reviewed by: Peter Lei, cc
MFC after: 1 week
Sponsored by: Netflix, Inc
Differential Revision: https://reviews.freebsd.org/D46140

show more ...


# 00d3b744 28-Jul-2024 Michael Tuexen <tuexen@FreeBSD.org>

tcp cc: remove non-working sctp support

As suggested by lstewart, remove the non-working SCTP support in the
TCP congestion control modules. SCTP has a similar functionality
(although not using kern

tcp cc: remove non-working sctp support

As suggested by lstewart, remove the non-working SCTP support in the
TCP congestion control modules. SCTP has a similar functionality
(although not using kernel loadable modules), on which the TCP stuff
was built on, but the integration was never done.
No functional change intended.

Reviewed by: Peter Lei, cc
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D46142

show more ...


# 40299c55 25-Jul-2024 Michael Tuexen <tuexen@FreeBSD.org>

tcp: implement challenge ACK throttling for the base stack

Implement ACK throttling of challenge ACKs as described in RFC 5961.

Reviewed by: Peter Lei, rscheff, cc
MFC after: 1 week
Sponsored by:

tcp: implement challenge ACK throttling for the base stack

Implement ACK throttling of challenge ACKs as described in RFC 5961.

Reviewed by: Peter Lei, rscheff, cc
MFC after: 1 week
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D46066

show more ...


12345678910>>...50