git: bf48bc994a92 - main - tcp: remove unused argument in HPTS
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 13 Oct 2025 20:39:58 UTC
The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=bf48bc994a92850f7717b79da3a10a80725073bd commit bf48bc994a92850f7717b79da3a10a80725073bd Author: Nick Banks <nickbanks@netflix.com> AuthorDate: 2025-10-13 20:38:51 +0000 Commit: Michael Tuexen <tuexen@FreeBSD.org> CommitDate: 2025-10-13 20:38:51 +0000 tcp: remove unused argument in HPTS Reviewed by: tuexen Sponsored by: Netflix, Inc. --- sys/netinet/tcp_hpts.c | 9 ++------- sys/netinet/tcp_hpts.h | 7 ------- sys/netinet/tcp_hpts_test.c | 5 ----- 3 files changed, 2 insertions(+), 19 deletions(-) diff --git a/sys/netinet/tcp_hpts.c b/sys/netinet/tcp_hpts.c index a50ad3fa6b33..c54459bb5f01 100644 --- a/sys/netinet/tcp_hpts.c +++ b/sys/netinet/tcp_hpts.c @@ -798,7 +798,7 @@ max_slots_available(struct tcp_hpts_entry *hpts, uint32_t wheel_slot, uint32_t * #ifdef INVARIANTS static void check_if_slot_would_be_wrong(struct tcp_hpts_entry *hpts, struct tcpcb *tp, - uint32_t hptsslot, int line) + uint32_t hptsslot) { /* * Sanity checks for the pacer with invariants @@ -830,13 +830,8 @@ check_if_slot_would_be_wrong(struct tcp_hpts_entry *hpts, struct tcpcb *tp, #endif void -#ifdef INVARIANTS -__tcp_hpts_insert(struct tcp_hptsi *pace, struct tcpcb *tp, uint32_t usecs, - int32_t line, struct hpts_diag *diag) -#else __tcp_hpts_insert(struct tcp_hptsi *pace, struct tcpcb *tp, uint32_t usecs, struct hpts_diag *diag) -#endif { struct tcp_hpts_entry *hpts; struct timeval tv; @@ -934,7 +929,7 @@ __tcp_hpts_insert(struct tcp_hptsi *pace, struct tcpcb *tp, uint32_t usecs, diag->inp_hptsslot = tp->t_hpts_slot; } #ifdef INVARIANTS - check_if_slot_would_be_wrong(hpts, tp, tp->t_hpts_slot, line); + check_if_slot_would_be_wrong(hpts, tp, tp->t_hpts_slot); #endif if (__predict_true(tp->t_in_hpts != IHPTS_MOVING)) tcp_hpts_insert_internal(tp, hpts); diff --git a/sys/netinet/tcp_hpts.h b/sys/netinet/tcp_hpts.h index 8b69e6af35ed..6b05f9701ac2 100644 --- a/sys/netinet/tcp_hpts.h +++ b/sys/netinet/tcp_hpts.h @@ -127,17 +127,10 @@ tcp_in_hpts(struct tcpcb *tp) * that INP_WLOCK() or from destroying your TCB where again * you should already have the INP_WLOCK(). */ -#ifdef INVARIANTS -void __tcp_hpts_insert(struct tcp_hptsi *pace, struct tcpcb *tp, uint32_t usecs, - int32_t line, struct hpts_diag *diag); -#define tcp_hpts_insert(tp, usecs, diag) \ - __tcp_hpts_insert(tcp_hptsi_pace, (tp), (usecs), __LINE__, (diag)) -#else void __tcp_hpts_insert(struct tcp_hptsi *pace, struct tcpcb *tp, uint32_t usecs, struct hpts_diag *diag); #define tcp_hpts_insert(tp, usecs, diag) \ __tcp_hpts_insert(tcp_hptsi_pace, (tp), (usecs), (diag)) -#endif void __tcp_set_hpts(struct tcp_hptsi *pace, struct tcpcb *tp); #define tcp_set_hpts(tp) __tcp_set_hpts(tcp_hptsi_pace, tp) diff --git a/sys/netinet/tcp_hpts_test.c b/sys/netinet/tcp_hpts_test.c index 9217c3205587..bab5827e0572 100644 --- a/sys/netinet/tcp_hpts_test.c +++ b/sys/netinet/tcp_hpts_test.c @@ -56,13 +56,8 @@ /* Custom definitions that take the tcp_hptsi */ #define tcp_hpts_init(pace, tp) __tcp_hpts_init((pace), (tp)) #define tcp_hpts_remove(pace, tp) __tcp_hpts_remove((pace), (tp)) -#ifdef INVARIANTS -#define tcp_hpts_insert(pace, tp, usecs, diag) \ - __tcp_hpts_insert((pace), (tp), (usecs), __LINE__, (diag)) -#else #define tcp_hpts_insert(pace, tp, usecs, diag) \ __tcp_hpts_insert((pace), (tp), (usecs), (diag)) -#endif #define tcp_set_hpts(pace, tp) __tcp_set_hpts((pace), (tp)) static MALLOC_DEFINE(M_TCPHPTS, "tcp_hpts_test", "TCP hpts test");