Skip to content

Commit bf48bc9

Browse files
nibankstuexen
authored andcommitted
tcp: remove unused argument in HPTS
Reviewed by: tuexen Sponsored by: Netflix, Inc.
1 parent 156dfc3 commit bf48bc9

File tree

3 files changed

+2
-19
lines changed

3 files changed

+2
-19
lines changed

sys/netinet/tcp_hpts.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,7 @@ max_slots_available(struct tcp_hpts_entry *hpts, uint32_t wheel_slot, uint32_t *
798798
#ifdef INVARIANTS
799799
static void
800800
check_if_slot_would_be_wrong(struct tcp_hpts_entry *hpts, struct tcpcb *tp,
801-
uint32_t hptsslot, int line)
801+
uint32_t hptsslot)
802802
{
803803
/*
804804
* 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,
830830
#endif
831831

832832
void
833-
#ifdef INVARIANTS
834-
__tcp_hpts_insert(struct tcp_hptsi *pace, struct tcpcb *tp, uint32_t usecs,
835-
int32_t line, struct hpts_diag *diag)
836-
#else
837833
__tcp_hpts_insert(struct tcp_hptsi *pace, struct tcpcb *tp, uint32_t usecs,
838834
struct hpts_diag *diag)
839-
#endif
840835
{
841836
struct tcp_hpts_entry *hpts;
842837
struct timeval tv;
@@ -934,7 +929,7 @@ __tcp_hpts_insert(struct tcp_hptsi *pace, struct tcpcb *tp, uint32_t usecs,
934929
diag->inp_hptsslot = tp->t_hpts_slot;
935930
}
936931
#ifdef INVARIANTS
937-
check_if_slot_would_be_wrong(hpts, tp, tp->t_hpts_slot, line);
932+
check_if_slot_would_be_wrong(hpts, tp, tp->t_hpts_slot);
938933
#endif
939934
if (__predict_true(tp->t_in_hpts != IHPTS_MOVING))
940935
tcp_hpts_insert_internal(tp, hpts);

sys/netinet/tcp_hpts.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -127,17 +127,10 @@ tcp_in_hpts(struct tcpcb *tp)
127127
* that INP_WLOCK() or from destroying your TCB where again
128128
* you should already have the INP_WLOCK().
129129
*/
130-
#ifdef INVARIANTS
131-
void __tcp_hpts_insert(struct tcp_hptsi *pace, struct tcpcb *tp, uint32_t usecs,
132-
int32_t line, struct hpts_diag *diag);
133-
#define tcp_hpts_insert(tp, usecs, diag) \
134-
__tcp_hpts_insert(tcp_hptsi_pace, (tp), (usecs), __LINE__, (diag))
135-
#else
136130
void __tcp_hpts_insert(struct tcp_hptsi *pace, struct tcpcb *tp, uint32_t usecs,
137131
struct hpts_diag *diag);
138132
#define tcp_hpts_insert(tp, usecs, diag) \
139133
__tcp_hpts_insert(tcp_hptsi_pace, (tp), (usecs), (diag))
140-
#endif
141134

142135
void __tcp_set_hpts(struct tcp_hptsi *pace, struct tcpcb *tp);
143136
#define tcp_set_hpts(tp) __tcp_set_hpts(tcp_hptsi_pace, tp)

sys/netinet/tcp_hpts_test.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,8 @@
5656
/* Custom definitions that take the tcp_hptsi */
5757
#define tcp_hpts_init(pace, tp) __tcp_hpts_init((pace), (tp))
5858
#define tcp_hpts_remove(pace, tp) __tcp_hpts_remove((pace), (tp))
59-
#ifdef INVARIANTS
60-
#define tcp_hpts_insert(pace, tp, usecs, diag) \
61-
__tcp_hpts_insert((pace), (tp), (usecs), __LINE__, (diag))
62-
#else
6359
#define tcp_hpts_insert(pace, tp, usecs, diag) \
6460
__tcp_hpts_insert((pace), (tp), (usecs), (diag))
65-
#endif
6661
#define tcp_set_hpts(pace, tp) __tcp_set_hpts((pace), (tp))
6762

6863
static MALLOC_DEFINE(M_TCPHPTS, "tcp_hpts_test", "TCP hpts test");

0 commit comments

Comments
 (0)