aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2023-12-04 18:19:46 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2023-12-04 18:19:46 +0000
commit2b3a77467dd3d74a7170f279fb25f9736b46ef8a (patch)
tree92c112de0235603c2b0d1f66003aede5c326e91e
parent8e907391b74c6ccb6a6925638383e7b82fc9371a (diff)
downloadsrc-2b3a77467dd3d74a7170f279fb25f9736b46ef8a.tar.gz
src-2b3a77467dd3d74a7170f279fb25f9736b46ef8a.zip
hpts: make stacks responsible for tcp_hpts_init()
Those stacks that use HPTS should care about init, not generic code. Reviewed by: imp, tuexen, rrs Differential Revision: https://reviews.freebsd.org/D42856
-rw-r--r--sys/netinet/tcp_stacks/bbr.c2
-rw-r--r--sys/netinet/tcp_stacks/rack.c2
-rw-r--r--sys/netinet/tcp_subr.c3
3 files changed, 4 insertions, 3 deletions
diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c
index 013bd0982fd3..aa78e02e39d9 100644
--- a/sys/netinet/tcp_stacks/bbr.c
+++ b/sys/netinet/tcp_stacks/bbr.c
@@ -9926,6 +9926,8 @@ bbr_init(struct tcpcb *tp, void **ptr)
struct tcp_bbr *bbr = NULL;
uint32_t cts;
+ tcp_hpts_init(tp);
+
*ptr = uma_zalloc(bbr_pcb_zone, (M_NOWAIT | M_ZERO));
if (*ptr == NULL) {
/*
diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c
index 5df188aae52c..e7027dd1b2dd 100644
--- a/sys/netinet/tcp_stacks/rack.c
+++ b/sys/netinet/tcp_stacks/rack.c
@@ -14973,6 +14973,8 @@ rack_init(struct tcpcb *tp, void **ptr)
uint32_t iwin, snt, us_cts;
int err, no_query;
+ tcp_hpts_init(tp);
+
/*
* First are we the initial or are we a switched stack?
* If we are initing via tcp_newtcppcb the ptr passed
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c
index cfbf32a40d86..b3f5375cb8cf 100644
--- a/sys/netinet/tcp_subr.c
+++ b/sys/netinet/tcp_subr.c
@@ -2313,9 +2313,6 @@ tcp_newtcpcb(struct inpcb *inp)
* which may match an IPv4-mapped IPv6 address.
*/
inp->inp_ip_ttl = V_ip_defttl;
-#ifdef TCPHPTS
- tcp_hpts_init(tp);
-#endif
#ifdef TCPPCAP
/*
* Init the TCP PCAP queues.