git: 32cc4beb0a8c - main - tcp: retire TF_SENTSYN
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 03 Apr 2026 19:25:13 UTC
The branch main has been updated by tuexen:
URL: https://cgit.FreeBSD.org/src/commit/?id=32cc4beb0a8c3cadc0de4c255ba512fd7b196607
commit 32cc4beb0a8c3cadc0de4c255ba512fd7b196607
Author: Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2026-04-03 19:22:11 +0000
Commit: Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2026-04-03 19:22:11 +0000
tcp: retire TF_SENTSYN
This TF_-flag is only used in the RACK stack and not really needed.
So replace it, since glebius@ needs a TF_ flag and right now all
of them are taken.
No functional change intended.
Reviewed by: rrs, glebius, rscheff, Nick Banks
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D56025
---
sys/netinet/tcp_stacks/rack.c | 4 +---
sys/netinet/tcp_var.h | 4 ++--
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c
index 78b0026a8c5d..2e3fcc7a9762 100644
--- a/sys/netinet/tcp_stacks/rack.c
+++ b/sys/netinet/tcp_stacks/rack.c
@@ -22106,10 +22106,8 @@ out:
* Now for special SYN/FIN handling.
*/
if (flags & (TH_SYN | TH_FIN)) {
- if ((flags & TH_SYN) &&
- ((tp->t_flags & TF_SENTSYN) == 0)) {
+ if ((flags & TH_SYN) != 0 && tp->snd_max == tp->iss) {
tp->snd_max++;
- tp->t_flags |= TF_SENTSYN;
}
if ((flags & TH_FIN) &&
((tp->t_flags & TF_SENTFIN) == 0)) {
diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h
index a3a42b68c26b..95c4e4c52ba0 100644
--- a/sys/netinet/tcp_var.h
+++ b/sys/netinet/tcp_var.h
@@ -789,7 +789,7 @@ tcp_packets_this_ack(struct tcpcb *tp, tcp_seq ack)
#define TF_TSO 0x01000000 /* TSO enabled on this connection */
#define TF_TOE 0x02000000 /* this connection is offloaded */
#define TF_CLOSED 0x04000000 /* close(2) called on socket */
-#define TF_SENTSYN 0x08000000 /* At least one syn has been sent */
+#define TF_UNUSED 0x08000000 /* was TF_SENTSYN */
#define TF_LRD 0x10000000 /* Lost Retransmission Detection */
#define TF_CONGRECOVERY 0x20000000 /* congestion recovery mode */
#define TF_WASCRECOVERY 0x40000000 /* was in congestion recovery */
@@ -803,7 +803,7 @@ tcp_packets_this_ack(struct tcpcb *tp, tcp_seq ack)
"\15TF_NOPUSH\16TF_PREVVALID\17TF_WAKESOR\20TF_GPUTINPROG" \
"\21TF_MORETOCOME\22TF_SONOTCONN\23TF_LASTIDLE\24TF_RXWIN0SENT" \
"\25TF_FASTRECOVERY\26TF_WASFRECOVERY\27TF_SIGNATURE\30TF_FORCEDATA" \
- "\31TF_TSO\32TF_TOE\33TF_CLOSED\34TF_SENTSYN" \
+ "\31TF_TSO\32TF_TOE\33TF_CLOSED\34TF_UNUSED" \
"\35TF_LRD\36TF_CONGRECOVERY\37TF_WASCRECOVERY\40TF_FASTOPEN"
#define IN_FASTRECOVERY(t_flags) (t_flags & TF_FASTRECOVERY)