aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/tcp_usrreq.c
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2024-03-18 15:56:17 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2024-03-18 15:56:17 +0000
commitdd7b86e2a010818b53f42200815f1858300045d7 (patch)
tree16bebaa0be16e7bc75d5d7d2a2bd22d977e87e51 /sys/netinet/tcp_usrreq.c
parentd62c4607e8a3613253d613c0d3417cccd02b2c57 (diff)
Diffstat (limited to 'sys/netinet/tcp_usrreq.c')
-rw-r--r--sys/netinet/tcp_usrreq.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c
index 916fe33e8704..abdc2de545e9 100644
--- a/sys/netinet/tcp_usrreq.c
+++ b/sys/netinet/tcp_usrreq.c
@@ -397,7 +397,7 @@ tcp_usr_listen(struct socket *so, int backlog, struct thread *td)
}
SOCK_UNLOCK(so);
- if (IS_FASTOPEN(tp->t_flags))
+ if (tp->t_flags & TF_FASTOPEN)
tp->t_tfo_pending = tcp_fastopen_alloc_counter();
out:
@@ -454,7 +454,7 @@ tcp6_usr_listen(struct socket *so, int backlog, struct thread *td)
}
SOCK_UNLOCK(so);
- if (IS_FASTOPEN(tp->t_flags))
+ if (tp->t_flags & TF_FASTOPEN)
tp->t_tfo_pending = tcp_fastopen_alloc_counter();
if (error != 0)
@@ -887,8 +887,7 @@ tcp_usr_rcvd(struct socket *so, int flags)
* application response data, or failing that, when the DELACK timer
* expires.
*/
- if (IS_FASTOPEN(tp->t_flags) &&
- (tp->t_state == TCPS_SYN_RECEIVED))
+ if ((tp->t_flags & TF_FASTOPEN) && (tp->t_state == TCPS_SYN_RECEIVED))
goto out;
#ifdef TCP_OFFLOAD
if (tp->t_flags & TF_TOE)
@@ -1095,7 +1094,7 @@ tcp_usr_send(struct socket *so, int flags, struct mbuf *m,
sbflush(&so->so_snd);
goto out;
}
- if (IS_FASTOPEN(tp->t_flags))
+ if (tp->t_flags & TF_FASTOPEN)
tcp_fastopen_connect(tp);
else {
tp->snd_wnd = TTCP_CLIENT_SND_WND;
@@ -1161,7 +1160,7 @@ tcp_usr_send(struct socket *so, int flags, struct mbuf *m,
/*
* Not going to contemplate SYN|URG
*/
- if (IS_FASTOPEN(tp->t_flags))
+ if (tp->t_flags & TF_FASTOPEN)
tp->t_flags &= ~TF_FASTOPEN;
#ifdef INET6
if (isipv6)
@@ -1578,7 +1577,7 @@ tcp_fill_info(const struct tcpcb *tp, struct tcp_info *ti)
default:
break;
}
- if (IS_FASTOPEN(tp->t_flags))
+ if (tp->t_flags & TF_FASTOPEN)
ti->tcpi_options |= TCPI_OPT_TFO;
ti->tcpi_rto = tp->t_rxtcur * tick;
@@ -2685,7 +2684,7 @@ tcp_disconnect(struct tcpcb *tp)
* socket is still open.
*/
if (tp->t_state < TCPS_ESTABLISHED &&
- !(tp->t_state > TCPS_LISTEN && IS_FASTOPEN(tp->t_flags))) {
+ !(tp->t_state > TCPS_LISTEN && (tp->t_flags & TF_FASTOPEN))) {
tp = tcp_close(tp);
KASSERT(tp != NULL,
("tcp_disconnect: tcp_close() returned NULL"));