git: b10ae5a9b21a - main - tcp rack: remove references to rb trees

From: Michael Tuexen <tuexen_at_FreeBSD.org>
Date: Sun, 05 Nov 2023 14:23:54 UTC
The branch main has been updated by tuexen:

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

commit b10ae5a9b21aa11e96a1951ccc4525dd1fdb60b3
Author:     Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2023-11-05 14:21:06 +0000
Commit:     Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2023-11-05 14:21:06 +0000

    tcp rack: remove references to rb trees
    
    The references should have been removed in
    https://cgit.freebsd.org/src/commit/?id=030434acaf4631c4e205f8bccedcc7f845cbfcbf
    
    Reviewed by:            rscheff, zlei
    MFC after:              1 week
    Sponsored by:           Netflix, Inc.
    Differential Revision:  https://reviews.freebsd.org/D42386
---
 sys/netinet/tcp_stacks/rack.c     | 24 ++++++++++++------------
 sys/netinet/tcp_stacks/tcp_rack.h |  1 -
 2 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c
index 5c16cb9ed23b..5df188aae52c 100644
--- a/sys/netinet/tcp_stacks/rack.c
+++ b/sys/netinet/tcp_stacks/rack.c
@@ -7472,7 +7472,7 @@ need_retran:
 		(void)tqhash_insert(rack->r_ctl.tqh, nrsm);
 #else
 		if ((insret = tqhash_insert(rack->r_ctl.tqh, nrsm)) != 0) {
-			panic("Insert in rb tree of %p fails ret:%d rack:%p rsm:%p",
+			panic("Insert in tailq_hash of %p fails ret:%d rack:%p rsm:%p",
 			      nrsm, insret, rack, rsm);
 		}
 #endif
@@ -7692,8 +7692,8 @@ rack_remxt_tmr(struct tcpcb *tp)
 	 * order. This way we send in the proper order and any
 	 * sacks that come floating in will "re-ack" the data.
 	 * To do this we zap the tmap with an INIT and then
-	 * walk through and place every rsm in the RB tree
-	 * back in its seq ordered place.
+	 * walk through and place every rsm in the tail queue
+	 * hash table back in its seq ordered place.
 	 */
 	TAILQ_INIT(&rack->r_ctl.rc_tmap);
 
@@ -8355,7 +8355,7 @@ rack_update_entry(struct tcpcb *tp, struct tcp_rack *rack,
 	(void)tqhash_insert(rack->r_ctl.tqh, nrsm);
 #else
 	if ((insret = tqhash_insert(rack->r_ctl.tqh, nrsm)) != 0) {
-		panic("Insert in rb tree of %p fails ret:%d rack:%p rsm:%p",
+		panic("Insert in tailq_hash of %p fails ret:%d rack:%p rsm:%p",
 		      nrsm, insret, rack, rsm);
 	}
 #endif
@@ -8545,7 +8545,7 @@ again:
 		(void)tqhash_insert(rack->r_ctl.tqh, rsm);
 #else
 		if ((insret = tqhash_insert(rack->r_ctl.tqh, rsm)) != 0) {
-			panic("Insert in rb tree of %p fails ret:%d rack:%p rsm:%p",
+			panic("Insert in tailq_hash of %p fails ret:%d rack:%p rsm:%p",
 			      nrsm, insret, rack, rsm);
 		}
 #endif
@@ -8619,7 +8619,7 @@ refind:
 			(void)tqhash_insert(rack->r_ctl.tqh, nrsm);
 #else
 			if ((insret = tqhash_insert(rack->r_ctl.tqh, nrsm)) != 0) {
-				panic("Insert in rb tree of %p fails ret:%d rack:%p rsm:%p",
+				panic("Insert in tailq_hash of %p fails ret:%d rack:%p rsm:%p",
 				      nrsm, insret, rack, rsm);
 			}
 #endif
@@ -9776,7 +9776,7 @@ do_rest_ofb:
 				(void)tqhash_insert(rack->r_ctl.tqh, nrsm);
 #else
 				if ((insret = tqhash_insert(rack->r_ctl.tqh, nrsm)) != 0) {
-					panic("Insert in rb tree of %p fails ret:%d rack:%p rsm:%p",
+					panic("Insert in tailq_hash of %p fails ret:%d rack:%p rsm:%p",
 					      nrsm, insret, rack, rsm);
 				}
 #endif
@@ -9897,7 +9897,7 @@ do_rest_ofb:
 		}
 		/*
 		 * There is more not coverend by this rsm move on
-		 * to the next block in the RB tree.
+		 * to the next block in the tail queue hash table.
 		 */
 		nrsm = tqhash_next(rack->r_ctl.tqh, rsm);
 		start = rsm->r_end;
@@ -10138,7 +10138,7 @@ do_rest_ofb:
 			(void)tqhash_insert(rack->r_ctl.tqh, nrsm);
 #else
 			if ((insret = tqhash_insert(rack->r_ctl.tqh, nrsm)) != 0) {
-				panic("Insert in rb tree of %p fails ret:% rack:%p rsm:%p",
+				panic("Insert in tailq_hash of %p fails ret:% rack:%p rsm:%p",
 				      nrsm, insret, rack, rsm);
 			}
 #endif
@@ -12478,7 +12478,7 @@ rack_un_collapse_window(struct tcp_rack *rack, int line)
 		(void)tqhash_insert(rack->r_ctl.tqh, nrsm);
 #else
 		if ((insret = tqhash_insert(rack->r_ctl.tqh, nrsm)) != 0) {
-			panic("Insert in rb tree of %p fails ret:%d rack:%p rsm:%p",
+			panic("Insert in tailq_hash of %p fails ret:%d rack:%p rsm:%p",
 			      nrsm, insret, rack, rsm);
 		}
 #endif
@@ -14808,7 +14808,7 @@ rack_init_outstanding(struct tcpcb *tp, struct tcp_rack *rack, uint32_t us_cts,
 		}
 #ifdef INVARIANTS
 		if ((insret = tqhash_insert(rack->r_ctl.tqh, rsm)) != 0) {
-			panic("Insert in rb tree fails ret:%d rack:%p rsm:%p",
+			panic("Insert in tailq_hash fails ret:%d rack:%p rsm:%p",
 			      insret, rack, rsm);
 		}
 #else
@@ -14868,7 +14868,7 @@ rack_init_outstanding(struct tcpcb *tp, struct tcp_rack *rack, uint32_t us_cts,
 			}
 #ifdef INVARIANTS
 			if ((insret = tqhash_insert(rack->r_ctl.tqh, rsm)) != 0) {
-				panic("Insert in rb tree fails ret:%d rack:%p rsm:%p",
+				panic("Insert in tailq_hash fails ret:%d rack:%p rsm:%p",
 				      insret, rack, rsm);
 			}
 #else
diff --git a/sys/netinet/tcp_stacks/tcp_rack.h b/sys/netinet/tcp_stacks/tcp_rack.h
index 38239ef97b4d..4152a1a5d7ba 100644
--- a/sys/netinet/tcp_stacks/tcp_rack.h
+++ b/sys/netinet/tcp_stacks/tcp_rack.h
@@ -120,7 +120,6 @@ rack_ts_to_msec(uint64_t ts)
 }
 
 
-RB_HEAD(rack_rb_tree_head, rack_sendmap);
 TAILQ_HEAD(rack_head, rack_sendmap);
 TAILQ_HEAD(def_opt_head, deferred_opt_list);