Fix LINT kernel builds after 1a714ff204
.
MFC after: 1 week Discussed with: rrs@ Differential Revision: https://reviews.freebsd.org/D28357 Sponsored by: Mellanox Technologies // NVIDIA Networking
This commit is contained in:
parent
bdd4630c9a
commit
db46c0d0cb
@ -372,17 +372,6 @@ rl_add_syctl_entries(struct sysctl_oid *rl_sysctl_root, struct tcp_rate_set *rs)
|
||||
OID_AUTO, "rate", CTLFLAG_RD,
|
||||
&rs->rs_rlt[i].rate, 0,
|
||||
"Rate in bytes per second");
|
||||
SYSCTL_ADD_U64(&rs->sysctl_ctx,
|
||||
SYSCTL_CHILDREN(rl_rate_num),
|
||||
OID_AUTO, "using", CTLFLAG_RD,
|
||||
&rs->rs_rlt[i].using, 0,
|
||||
"Number of flows using");
|
||||
SYSCTL_ADD_U64(&rs->sysctl_ctx,
|
||||
SYSCTL_CHILDREN(rl_rate_num),
|
||||
OID_AUTO, "enobufs", CTLFLAG_RD,
|
||||
&rs->rs_rlt[i].rs_num_enobufs, 0,
|
||||
"Number of enobufs logged on this rate");
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -678,8 +667,6 @@ rt_setup_new_rs(struct ifnet *ifp, int *error)
|
||||
*/
|
||||
rs->rs_rlt[i].ptbl = rs;
|
||||
rs->rs_rlt[i].tag = NULL;
|
||||
rs->rs_rlt[i].using = 0;
|
||||
rs->rs_rlt[i].rs_num_enobufs = 0;
|
||||
/*
|
||||
* Calculate the time between.
|
||||
*/
|
||||
@ -1076,28 +1063,16 @@ rt_find_real_interface(struct ifnet *ifp, struct inpcb *inp, int *error)
|
||||
static void
|
||||
rl_increment_using(const struct tcp_hwrate_limit_table *rte)
|
||||
{
|
||||
struct tcp_hwrate_limit_table *decon_rte;
|
||||
|
||||
decon_rte = __DECONST(struct tcp_hwrate_limit_table *, rte);
|
||||
atomic_add_long(&decon_rte->using, 1);
|
||||
}
|
||||
|
||||
static void
|
||||
rl_decrement_using(const struct tcp_hwrate_limit_table *rte)
|
||||
{
|
||||
struct tcp_hwrate_limit_table *decon_rte;
|
||||
|
||||
decon_rte = __DECONST(struct tcp_hwrate_limit_table *, rte);
|
||||
atomic_subtract_long(&decon_rte->using, 1);
|
||||
}
|
||||
|
||||
void
|
||||
tcp_rl_log_enobuf(const struct tcp_hwrate_limit_table *rte)
|
||||
{
|
||||
struct tcp_hwrate_limit_table *decon_rte;
|
||||
|
||||
decon_rte = __DECONST(struct tcp_hwrate_limit_table *, rte);
|
||||
atomic_add_long(&decon_rte->rs_num_enobufs, 1);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1214,9 +1189,11 @@ rt_setup_rate(struct inpcb *inp, struct ifnet *ifp, uint64_t bytes_per_sec,
|
||||
rte = NULL;
|
||||
} else {
|
||||
KASSERT((inp->inp_snd_tag != NULL) ,
|
||||
("Setup rate has no snd_tag inp:%p rte:%p rate:%lu rs:%p",
|
||||
inp, rte, rte->rate, rs));
|
||||
("Setup rate has no snd_tag inp:%p rte:%p rate:%llu rs:%p",
|
||||
inp, rte, (unsigned long long)rte->rate, rs));
|
||||
#ifdef INET
|
||||
counter_u64_add(rate_limit_new, 1);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
if (rte) {
|
||||
@ -1462,8 +1439,11 @@ tcp_chg_pacing_rate(const struct tcp_hwrate_limit_table *crte,
|
||||
if (error)
|
||||
*error = err;
|
||||
return (NULL);
|
||||
} else
|
||||
} else {
|
||||
#ifdef INET
|
||||
counter_u64_add(rate_limit_chg, 1);
|
||||
#endif
|
||||
}
|
||||
if (error)
|
||||
*error = 0;
|
||||
tp->t_pacing_rate = nrte->rate;
|
||||
|
@ -44,8 +44,6 @@ struct tcp_hwrate_limit_table {
|
||||
const struct tcp_rate_set *ptbl; /* Pointer to parent table */
|
||||
struct m_snd_tag *tag; /* Send tag if needed (chelsio) */
|
||||
uint64_t rate; /* Rate we get in Bytes per second (Bps) */
|
||||
uint64_t using; /* Temporary -- rrs remove */
|
||||
uint64_t rs_num_enobufs;
|
||||
uint32_t time_between; /* Time-Gap between packets at this rate */
|
||||
uint32_t flags;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user