Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Jan 2024 19:05:12 GMT
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 76deefc548e5 - stable/14 - hpts: make stacks responsible for tcp_hpts_init()
Message-ID:  <202401161905.40GJ5CxN010055@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by glebius:

URL: https://cgit.FreeBSD.org/src/commit/?id=76deefc548e59e6dcaa720c8071b4d399b95af63

commit 76deefc548e59e6dcaa720c8071b4d399b95af63
Author:     Gleb Smirnoff <glebius@FreeBSD.org>
AuthorDate: 2023-12-04 18:19:46 +0000
Commit:     Gleb Smirnoff <glebius@FreeBSD.org>
CommitDate: 2024-01-16 18:39:10 +0000

    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
    
    (cherry picked from commit 2b3a77467dd3d74a7170f279fb25f9736b46ef8a)
---
 sys/netinet/tcp_stacks/bbr.c  | 2 ++
 sys/netinet/tcp_stacks/rack.c | 2 ++
 sys/netinet/tcp_subr.c        | 3 ---
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c
index 4a472c5cea66..3805a911df41 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 760bd4ee9689..af03f2e1640c 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 c1a29f3d01d7..19d71a9e9058 100644
--- a/sys/netinet/tcp_subr.c
+++ b/sys/netinet/tcp_subr.c
@@ -2315,9 +2315,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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202401161905.40GJ5CxN010055>