History log of /freebsd/sys/netinet/tcp_syncache.c (Results 1 – 25 of 664)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 0b4539ee 14-Nov-2024 Gleb Smirnoff <glebius@FreeBSD.org>

inpcb: gc unused argument of in_pcbconnect()


# 2eacb084 01-Oct-2024 Michael Tuexen <tuexen@FreeBSD.org>

tcp: small cleanup

No functional change intended.

Reviewed by: cc, glebius, markj, rscheff
MFC after: 1 week
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D46850


# 01eb635d 30-Sep-2024 Michael Tuexen <tuexen@FreeBSD.org>

tcp: improve mbuf handling when processing SYN segments

When the sysctl-variable net.inet.ip.accept_sourceroute is non-zero,
an mbuf would be leaked when processing a SYN-segment containing an
IPv4

tcp: improve mbuf handling when processing SYN segments

When the sysctl-variable net.inet.ip.accept_sourceroute is non-zero,
an mbuf would be leaked when processing a SYN-segment containing an
IPv4 strict or loose source routing option, when the on-stack
syncache entry is used or there is an error related to processing
TCP MD5 options.
Fix this by freeing the mbuf whenever an error occurred or the
on-stack syncache entry is used.

Reviewed by: markj, rscheff
MFC after: 1 week
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D46839

show more ...


# a2e4f454 30-Sep-2024 Michael Tuexen <tuexen@FreeBSD.org>

tcp: whitespace cleanup

No functional change intended.

Reported by: markj
MFC after: 1 week
Sponsored by: Netflix, Inc.


# cbc9438f 28-Sep-2024 Michael Tuexen <tuexen@FreeBSD.org>

tcp: improve ref count handling when processing SYN

Don't leak a reference count for so->so_cred when processing an
incoming SYN segment with an on-stack syncache entry and the
sysctl variable net.i

tcp: improve ref count handling when processing SYN

Don't leak a reference count for so->so_cred when processing an
incoming SYN segment with an on-stack syncache entry and the
sysctl variable net.inet.tcp.syncache.see_other is false.

Reviewed by: cc, markj, rscheff
MFC after: 1 week
Sponsored by: Netflix, Inc.
Pull Request: https://reviews.freebsd.org/D46793

show more ...


# 78e1b031 26-Sep-2024 Michael Tuexen <tuexen@FreeBSD.org>

tcp: improve MAC error handling for SYN segments

Don't leak a maclabel when SYN segments are processed which results
in an error due to MD5 signature handling.
Tweak the #idef MAC to allow additiona

tcp: improve MAC error handling for SYN segments

Don't leak a maclabel when SYN segments are processed which results
in an error due to MD5 signature handling.
Tweak the #idef MAC to allow additional upcoming changes.

Reviewed by: markj
MFC after: 1 week
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D46766

show more ...


# 0a05ea1f 18-Sep-2024 Richard Scheffenegger <rscheff@FreeBSD.org>

tcp: keep syncache flags when updating ECN info

While processing the ECN flags of an incoming packet,
incorrectly cleared all other syncache flags.

Reported by: tuexen
Reviewed By: tuexen, #transpo

tcp: keep syncache flags when updating ECN info

While processing the ECN flags of an incoming packet,
incorrectly cleared all other syncache flags.

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

show more ...


Revision tags: release/13.4.0
# ef438f77 05-Sep-2024 Michael Tuexen <tuexen@FreeBSD.org>

tcp: improve consistency of syncache_respond() failure handling

When the initial sending of the SYN ACK segment using
syncache_respond() fails, it is handled as a permanent error.
To improve consist

tcp: improve consistency of syncache_respond() failure handling

When the initial sending of the SYN ACK segment using
syncache_respond() fails, it is handled as a permanent error.
To improve consistency, apply this policy in all cases, where
syncache_respond() is called. These include
* timer based retransmissions of the SYN ACK
* retransmitting a SYN ACK in response to a SYN retransmission
* sending of challenge ACKs in response to received RST segments
In these cases, fall back to SYN cookies, if enabled.
While there, also improve consistency of the TCP stats counters.

Reviewed by: cc, glebius (earlier version)
MFC after: 1 week
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D46428

show more ...


# e4136471 22-Aug-2024 Michael Tuexen <tuexen@FreeBSD.org>

tcp: improve consistency of SYN-cache handling

Originally, a SYN-cache entry was always allocated and later freed,
when not needed anymore. Then the allocation was avoided, when no
SYN-cache entry w

tcp: improve consistency of SYN-cache handling

Originally, a SYN-cache entry was always allocated and later freed,
when not needed anymore. Then the allocation was avoided, when no
SYN-cache entry was needed, and a copy on the stack was used.
But the logic regarding freeing was not updated.
This patch doesn't re-check conditions (which may have changed) when
deciding to insert or free the entry, but uses the result of
the earlier check.
This simplifies the code and improves also consistency.

Reviewed by: glebius
MFC after: 1 week
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D46410

show more ...


# 498286d4 22-Aug-2024 Michael Tuexen <tuexen@FreeBSD.org>

tcp: fix format of sysctl variable

The format for CTLTYPE_UINT is "IU" instead of "UI" as specified
in sysctl.9.

Reviewed by: cc, zlei
MFC after: 1 week
Sponsored by: Netflix, Inc.
Differential

tcp: fix format of sysctl variable

The format for CTLTYPE_UINT is "IU" instead of "UI" as specified
in sysctl.9.

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

show more ...


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

tcp: retire sysctl variable functions_inherit_listen_socket_stack

The default was true and it is consistent to inherit the TCP function
block from the listener as most of the other parameters.

Revi

tcp: retire sysctl variable functions_inherit_listen_socket_stack

The default was true and it is consistent to inherit the TCP function
block from the listener as most of the other parameters.

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

show more ...


# baee801c 21-Jul-2024 Michael Tuexen <tuexen@FreeBSD.org>

tcp: simplify endpoint creation at the passive side

Use the intended TCP stack when creating a TCP endpoint instead of
creating it the endpoint the default stack first and after that
switching it to

tcp: simplify endpoint creation at the passive side

Use the intended TCP stack when creating a TCP endpoint instead of
creating it the endpoint the default stack first and after that
switching it to use the intended TCP stack.
Reviewed by: Peter Lei, rrs and jtl (older version)
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D45411

show more ...


# 3703e1a7 27-Jun-2024 Michael Tuexen <tuexen@FreeBSD.org>

tcp: improve error handling in syncache_socket()

If syncache_socket() fails after calling tcp_newtcpcb(), the resources
allocated in tcp_newtcpcb() needs to be freed. Just call
tcp_discardcb() to do

tcp: improve error handling in syncache_socket()

If syncache_socket() fails after calling tcp_newtcpcb(), the resources
allocated in tcp_newtcpcb() needs to be freed. Just call
tcp_discardcb() to do this.
Thanks to jtl for making me aware of the issue and proposing a fix.
Reviewed by: glebius, jtl, rscheff
MFC after: 1 week
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D45749

show more ...


Revision tags: release/14.1.0
# dd7b86e2 18-Mar-2024 Gleb Smirnoff <glebius@FreeBSD.org>

tcp: remove IS_FASTOPEN() macro

The macro is more obfuscating than helping as it just checks a single flag
of t_flags. All other t_flags bits are checked without a macro.

A bigger problem was that

tcp: remove IS_FASTOPEN() macro

The macro is more obfuscating than helping as it just checks a single flag
of t_flags. All other t_flags bits are checked without a macro.

A bigger problem was that declaration of the macro in tcp_var.h depended
on a kernel option. It is a bad practice to create such definitions in
installable headers.

Reviewed by: rscheff, tuexen, kib
Differential Revision: https://reviews.freebsd.org/D44362

show more ...


# e18b97bd 12-Mar-2024 Randall Stewart <rrs@FreeBSD.org>

Update to bring the rack stack with all its fixes in.

This brings the rack stack up to the current level used at NF. Many fixes
and improvements have been added. I also add in a fix to BBR to deal w

Update to bring the rack stack with all its fixes in.

This brings the rack stack up to the current level used at NF. Many fixes
and improvements have been added. I also add in a fix to BBR to deal with
the changes that have been in hpts for a while i.e. only one call no matter
if mbuf queue or tcp_output.

It basically does little except BBlogs and is a placemark for future work on
doing path capacity measurements.

With a bit of a struggle with git I finally got rack_pcm.c into place (apologies
for not noticing this error). The LINT kernel is running on my box now .. sigh.

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

show more ...


# c112243f 11-Mar-2024 Brooks Davis <brooks@FreeBSD.org>

Revert "Update to bring the rack stack with all its fixes in."

This commit was incomplete and breaks LINT kernels. The tree has been
broken for 8+ hours.

This reverts commit f6d489f402c320f1a6eaa4

Revert "Update to bring the rack stack with all its fixes in."

This commit was incomplete and breaks LINT kernels. The tree has been
broken for 8+ hours.

This reverts commit f6d489f402c320f1a6eaa473491a0b8c3878113e.

show more ...


# f6d489f4 11-Mar-2024 Randall Stewart <rrs@FreeBSD.org>

Update to bring the rack stack with all its fixes in.

This brings the rack stack up to the current level used at NF. Many fixes
and improvements have been added. I also add in a fix to BBR to deal w

Update to bring the rack stack with all its fixes in.

This brings the rack stack up to the current level used at NF. Many fixes
and improvements have been added. I also add in a fix to BBR to deal with
the changes that have been in hpts for a while i.e. only one call no matter
if mbuf queue or tcp_output.

Note there is a new file that I can't figure out how to get in rack_pcm.c

It basically does little except BBlogs and is a placemark for future work on
doing path capacity measurements.

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

show more ...


Revision tags: release/13.3.0
# a13039e2 27-Dec-2023 Gleb Smirnoff <glebius@FreeBSD.org>

inpcb: reoder inpcb destruction

First, merge in_pcbdetach() with in_pcbfree(). The comment for
in_pcbdetach() was no longer correct. Then, make sure we remove
the inpcb from the hash before we com

inpcb: reoder inpcb destruction

First, merge in_pcbdetach() with in_pcbfree(). The comment for
in_pcbdetach() was no longer correct. Then, make sure we remove
the inpcb from the hash before we commit any destructive actions
on it. There are couple functions that rely on the hash lock
skipping SMR + inpcb lock to lookup an inpcb. Although there are
no known functions that similarly rely on the global inpcb list
lock, also do list removal before destructive actions.

PR: 273890
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D43122

show more ...


# f071abd9 02-Dec-2023 Richard Scheffenegger <rscheff@FreeBSD.org>

tcp: properly initialize LRD while accepting session in syncache

Inherit the setting from the listener socket in syncache_socket.

MFC after: 2 weeks
Reviewed By: tuexen, #tran

tcp: properly initialize LRD while accepting session in syncache

Inherit the setting from the listener socket in syncache_socket.

MFC after: 2 weeks
Reviewed By: tuexen, #transport
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D42874

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/


# b352ef58 27-Jul-2023 Richard Scheffenegger <rscheff@FreeBSD.org>

tcp: Handle <RST,ACK> in SYN-RCVD

Patch base stack to correctly handle the RST bit independently
of other header flags per TCP RFC.

MFC after: 1 week
Reviewed By: tuexen, #transport
Sponsored by: N

tcp: Handle <RST,ACK> in SYN-RCVD

Patch base stack to correctly handle the RST bit independently
of other header flags per TCP RFC.

MFC after: 1 week
Reviewed By: tuexen, #transport
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D40982

show more ...


# 4d846d26 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix

show more ...


# e044a0bc 06-May-2023 Michael Tuexen <tuexen@FreeBSD.org>

bblog: inherit TCP_LOG option from listener

When the TCP_LOG option is used to enable logging on a listening
socket, inherit this if the listener is not auto selected and does
not have a log id set.

bblog: inherit TCP_LOG option from listener

When the TCP_LOG option is used to enable logging on a listening
socket, inherit this if the listener is not auto selected and does
not have a log id set.

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

show more ...


# c3c20de3 25-Apr-2023 Gleb Smirnoff <glebius@FreeBSD.org>

tcp: move HPTS/LRO flags out of inpcb to tcpcb

These flags are TCP specific. While here, make also several LRO
internal functions to pass tcpcb pointer instead of inpcb one.

Reviewed by: rrs
Diff

tcp: move HPTS/LRO flags out of inpcb to tcpcb

These flags are TCP specific. While here, make also several LRO
internal functions to pass tcpcb pointer instead of inpcb one.

Reviewed by: rrs
Differential Revision: https://reviews.freebsd.org/D39698

show more ...


# 960985a2 18-Apr-2023 Randall Stewart <rrs@FreeBSD.org>

tcp: bbr.c is non-capable of doing ECN and sets an INP flag to fend off ECN however our syncache is not aware of that flag.

We need to make the syncache aware of the flag and not do ECN if its set.

tcp: bbr.c is non-capable of doing ECN and sets an INP flag to fend off ECN however our syncache is not aware of that flag.

We need to make the syncache aware of the flag and not do ECN if its set. Note that this
is not 100% full proof but the best we can do (i.e. its still possible that you can get in a
situation where the peer try's to do ecn).

Reviewed by: tuexen, glebius, rscheff
Sponsored by: Netflix Inc
Differential Revision:https://reviews.freebsd.org/D39672

show more ...


12345678910>>...27