History log of /freebsd/sys/netinet/tcp_output.c (Results 1 – 25 of 683)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1043b36b 13-Jan-2025 Gleb Smirnoff <glebius@FreeBSD.org>

tcp: don't send beyond receivers advertised window

When calculating length of data to be sent, we may do some congestion
calculations, but we shall never send a byte beyond (snd_una + snd_wnd).
In 7

tcp: don't send beyond receivers advertised window

When calculating length of data to be sent, we may do some congestion
calculations, but we shall never send a byte beyond (snd_una + snd_wnd).
In 7dc78150c730e we started to use tcp_compute_pipe() instead of (snd_wnd
- off). This function makes an estimate of how much data is in flight. It
can return a value smaller and larger than (snd_nxt - snd_una). It will
return a value larger when we have retransmitted some data from SACK
holes, and smaller once those retransmitted SACK holes are acked.

We may use tcp_compute_pipe() for length calculation, but always capped
by the send offset 'off', which (snd_nxt - snd_una).

PR: 283649
Reviewed by: rscheff
Differential Revision: https://reviews.freebsd.org/D48237
Fixes: 7dc78150c730e90fa2afdaba3aa645932b30c429

show more ...


# 72c11c40 13-Jan-2025 Gleb Smirnoff <glebius@FreeBSD.org>

tcp: make sack_rxmit in tcp_output() a bool

Also make this variable initialization, as well as accompanying sackhole
pointer, slightly more readable. NFC.

Reviewed by: rscheff, tuexen, rrs
Differe

tcp: make sack_rxmit in tcp_output() a bool

Also make this variable initialization, as well as accompanying sackhole
pointer, slightly more readable. NFC.

Reviewed by: rscheff, tuexen, rrs
Differential Revision: https://reviews.freebsd.org/D48235

show more ...


# 0fc7bdc9 29-Nov-2024 Richard Scheffenegger <rscheff@FreeBSD.org>

tcp: extend the use of the th_flags accessor function

Formally, there are 12 bits for TCP header flags.
Use the accessor functions in more (kernel) places.

No functional change.

Reviewed By: cc, #

tcp: extend the use of the th_flags accessor function

Formally, there are 12 bits for TCP header flags.
Use the accessor functions in more (kernel) places.

No functional change.

Reviewed By: cc, #transport, cy, glebius, #iflib, kbowling
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D47063

show more ...


Revision tags: release/14.2.0
# 22dcc812 14-Nov-2024 Richard Scheffenegger <rscheff@FreeBSD.org>

tcp: Use segment size excluding tcp options for all cwnd calculations

Avoid sending small segments by making sure that cwnd is usually
calculated in full (data) segment sizes. Especially during loss

tcp: Use segment size excluding tcp options for all cwnd calculations

Avoid sending small segments by making sure that cwnd is usually
calculated in full (data) segment sizes. Especially during loss
recovery and retransmission scenarios.

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

show more ...


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

tcp: fix cwnd recalculation during limited transmit

Properly calculate the expected flight size (cwnd) during
limited transmit. Exclude the SACK scoreboard from
consideration when still in limited t

tcp: fix cwnd recalculation during limited transmit

Properly calculate the expected flight size (cwnd) during
limited transmit. Exclude the SACK scoreboard from
consideration when still in limited transmit.

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

show more ...


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

tcp: allow TSO even while RX path is unordered

Over IP networks, forward and return path largely
act independently from each other. Do not disable LRO
on the TX side, when reordering/loss is happeni

tcp: allow TSO even while RX path is unordered

Over IP networks, forward and return path largely
act independently from each other. Do not disable LRO
on the TX side, when reordering/loss is happening
on the RX half-connection.

Reviewed By: rrs, #transport, peter.lei_ieee.org
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D47056

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


# 7dc78150 29-Oct-2024 Richard Scheffenegger <rscheff@FreeBSD.org>

tcp: refactor cwnd during SACK transmissions to allow TSO

Refactoring of cwnd and moving the adjustment for SACKed data into
tcp_output() - cwnd tracking the maximum extent starting at snd_una -
all

tcp: refactor cwnd during SACK transmissions to allow TSO

Refactoring of cwnd and moving the adjustment for SACKed data into
tcp_output() - cwnd tracking the maximum extent starting at snd_una -
allows both SACK loss recovery as well as SACK transmissions after
RTO during slow start and if allowed, the use of TSO while in loss
recovery.

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

show more ...


# 440f4ba1 10-Oct-2024 Richard Scheffenegger <rscheff@FreeBSD.org>

tcp: fix duplicate retransmissions when RTO happens during SACK loss recovery

When snd_nxt doesn't track snd_max, partial SACK ACKs may elicit
unexpected duplicate retransmissions. This is usually m

tcp: fix duplicate retransmissions when RTO happens during SACK loss recovery

When snd_nxt doesn't track snd_max, partial SACK ACKs may elicit
unexpected duplicate retransmissions. This is usually masked by
LRO not necessarily ACKing every individual segment, and prior
to RFC6675 SACK loss recovery, harder to trigger even when an
RTO happens while SACK loss recovery is ongoing.

Address this by improving the logic when to start a SACK loss recovery
and how to deal with a RTO, as well as improvements to the adjusted
congestion window during transmission selection.

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

show more ...


# 519981e3 02-Oct-2024 John Baldwin <jhb@FreeBSD.org>

tcp_output: Clear FIN if tcp_m_copym truncates output length

Reviewed by: rscheff, tuexen, gallatin
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D46824


# a00c3a94 24-Sep-2024 Gleb Smirnoff <glebius@FreeBSD.org>

tcp: remove remnants of 20+ year old disabled code from d912c694ee00

Fixes: 90ad2dc28747a3a5036d68ccc87d2352459f5cb1


Revision tags: release/13.4.0, release/14.1.0, release/13.3.0
# b6919741 14-Nov-2023 Konstantin Belousov <kib@FreeBSD.org>

ipsec_offload: handle TSO if supported

Allow for TSO to operate if network interface supports ipsec inline
offload and supports TSO over it.

Reviewed by: tuexen
Sponsored by: NVIDIA networking
Diff

ipsec_offload: handle TSO if supported

Allow for TSO to operate if network interface supports ipsec inline
offload and supports TSO over it.

Reviewed by: tuexen
Sponsored by: NVIDIA networking
Differential revision: https://reviews.freebsd.org/D44222

show more ...


# 2a9aae9e 08-May-2024 Richard Scheffenegger <rscheff@FreeBSD.org>

tcp: add counter to track when SACK loss recovery uses TSO

Add a counter to track how frequently SACK has transmitted
more than one MSS using TSO. Instances when this will be
beneficial is the use o

tcp: add counter to track when SACK loss recovery uses TSO

Add a counter to track how frequently SACK has transmitted
more than one MSS using TSO. Instances when this will be
beneficial is the use of PRR, or when ACK thinning due to
GRO/LRO or ACK discards by the network are present.

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

show more ...


# dcdfe449 08-May-2024 Richard Scheffenegger <rscheff@FreeBSD.org>

tcp: add sysctl to allow/disallow TSO during SACK loss recovery

Introduce net.inet.tcp.sack.tso for future use when TSO is ready
to be used during loss recovery.

Reviewed By: tuexen, #transport
Sp

tcp: add sysctl to allow/disallow TSO during SACK loss recovery

Introduce net.inet.tcp.sack.tso for future use when TSO is ready
to be used during loss recovery.

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

show more ...


# af700f43 22-Mar-2024 Michael Tuexen <tuexen@FreeBSD.org>

tcp: no data on SYN segments unless doing TFO

Ensure that there is no data on SYN segments unless doing TFO.
This check is already in RACK and BBR.

Reported by: glebius
Reviewed by: rscheff
MFC a

tcp: no data on SYN segments unless doing TFO

Ensure that there is no data on SYN segments unless doing TFO.
This check is already in RACK and BBR.

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

show more ...


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


# a8e817cf 10-Feb-2024 Richard Scheffenegger <rscheff@FreeBSD.org>

tcp: stop doing superfluous work after sending RST

When sending a RST control segment in tcp_output() it
means we are in TCPS_CLOSED state, called from tcp_drop().
Once the RST is sent, don't call t

tcp: stop doing superfluous work after sending RST

When sending a RST control segment in tcp_output() it
means we are in TCPS_CLOSED state, called from tcp_drop().
Once the RST is sent, don't call tcp_timer_activate() or
update anything in tcpcb, since that will go away shortly.

PR: 276761
Provided by: glebius
Reviewed By: glebius, tuexen, #transport
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D43808

show more ...


# 2d05a1c8 26-Jan-2024 Richard Scheffenegger <rscheff@FreeBSD.org>

tcp: commonize check for more data to send, style changes

Use SEQ_SUB instead of a plain subtraction, for an implict
type conversion and prevention of a possible overflow.
Use curly brackets in stac

tcp: commonize check for more data to send, style changes

Use SEQ_SUB instead of a plain subtraction, for an implict
type conversion and prevention of a possible overflow.
Use curly brackets in stacked if statements throughout.
Use of the ? operator to enhance readability when clearing
the FIN flag in tcp_output().

None of the above change the function.

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

show more ...


# 0932fb56 25-Jan-2024 Richard Scheffenegger <rscheff@FreeBSD.org>

tcp: fix TCPSTAT accounting for SACK

Account for SACK retransmitted bytes once the actual length
is known. This prevents a call to tcp_maxseg() and prepares
for TSO support when transmitting from th

tcp: fix TCPSTAT accounting for SACK

Account for SACK retransmitted bytes once the actual length
is known. This prevents a call to tcp_maxseg() and prepares
for TSO support when transmitting from the SACK scoreboard.

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

show more ...


# 90ad2dc2 23-Jan-2024 Gleb Smirnoff <glebius@FreeBSD.org>

tcp: remove 20+ year old disabled code from d912c694ee00


# c809435b 23-Jan-2024 Gleb Smirnoff <glebius@FreeBSD.org>

tcp: clear outdated comment mentioning T/TCP


# 429f14f8 08-Jan-2024 Richard Scheffenegger <rscheff@FreeBSD.org>

tcp: clean PRR state after ECN congestion recovery.

PRR state was not properly reset on subsequent ECN CE
events. Clean up after local transmission failures too.

Reviewed by: tuexen, cc,

tcp: clean PRR state after ECN congestion recovery.

PRR state was not properly reset on subsequent ECN CE
events. Clean up after local transmission failures too.

Reviewed by: tuexen, cc, #transport
MFC after: 3 days
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D43170

show more ...


# f7d5900a 28-Dec-2023 John Baldwin <jhb@FreeBSD.org>

sys: Style fix for M_EXT | M_EXTPG

Add a space around the | operator in places testing for either M_EXT
or M_EXTPG.

Reviewed by: imp, glebius
Sponsored by: Chelsio Communications
Differential Revis

sys: Style fix for M_EXT | M_EXTPG

Add a space around the | operator in places testing for either M_EXT
or M_EXTPG.

Reviewed by: imp, glebius
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D43216

show more ...


# e3b9058e 18-Dec-2023 Richard Scheffenegger <rscheff@FreeBSD.org>

tcp: properly unroll sack transmission on tx error with LRD

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

tcp: properly unroll sack transmission on tx error with LRD

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

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


12345678910>>...28