tcp: remove unused argument in HPTS

Reviewed by:	tuexen
Sponsored by:	Netflix, Inc.
This commit is contained in:
Nick Banks
2025-10-13 22:38:51 +02:00
committed by Michael Tuexen
parent 156dfc3e6e
commit bf48bc994a
3 changed files with 2 additions and 19 deletions
+2 -7
View File
@@ -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);
-7
View File
@@ -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)
-5
View File
@@ -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");