Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/tcp_ratelimit.h
Context not available. | |||||
const struct tcp_rate_set *ptbl; /* Pointer to parent table */ | const struct tcp_rate_set *ptbl; /* Pointer to parent table */ | ||||
struct m_snd_tag *tag; /* Send tag if needed (chelsio) */ | struct m_snd_tag *tag; /* Send tag if needed (chelsio) */ | ||||
uint64_t rate; /* Rate we get in Bytes per second (Bps) */ | 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 time_between; /* Time-Gap between packets at this rate */ | ||||
uint32_t flags; | uint32_t flags; | ||||
}; | }; | ||||
Context not available. | |||||
* shows up in your sysctl tree | * shows up in your sysctl tree | ||||
* this can be big. | * this can be big. | ||||
*/ | */ | ||||
uint64_t inline | |||||
tcp_hw_highest_rate(const struct tcp_hwrate_limit_table *rle) | |||||
{ | |||||
return (rle->ptbl->rs_rlt[rle->ptbl->rs_highest_valid].rate); | |||||
} | |||||
uint64_t | |||||
tcp_hw_highest_rate_ifp(struct ifnet *ifp, struct inpcb *inp); | |||||
const struct tcp_hwrate_limit_table * | const struct tcp_hwrate_limit_table * | ||||
tcp_set_pacing_rate(struct tcpcb *tp, struct ifnet *ifp, | tcp_set_pacing_rate(struct tcpcb *tp, struct ifnet *ifp, | ||||
uint64_t bytes_per_sec, int flags, int *error); | uint64_t bytes_per_sec, int flags, int *error, uint64_t *lower_rate); | ||||
const struct tcp_hwrate_limit_table * | const struct tcp_hwrate_limit_table * | ||||
tcp_chg_pacing_rate(const struct tcp_hwrate_limit_table *crte, | tcp_chg_pacing_rate(const struct tcp_hwrate_limit_table *crte, | ||||
struct tcpcb *tp, struct ifnet *ifp, | struct tcpcb *tp, struct ifnet *ifp, | ||||
uint64_t bytes_per_sec, int flags, int *error); | uint64_t bytes_per_sec, int flags, int *error, uint64_t *lower_rate); | ||||
void | void | ||||
tcp_rel_pacing_rate(const struct tcp_hwrate_limit_table *crte, | tcp_rel_pacing_rate(const struct tcp_hwrate_limit_table *crte, | ||||
struct tcpcb *tp); | struct tcpcb *tp); | ||||
#else | #else | ||||
static inline const struct tcp_hwrate_limit_table * | static inline const struct tcp_hwrate_limit_table * | ||||
tcp_set_pacing_rate(struct tcpcb *tp, struct ifnet *ifp, | tcp_set_pacing_rate(struct tcpcb *tp, struct ifnet *ifp, | ||||
uint64_t bytes_per_sec, int flags, int *error) | uint64_t bytes_per_sec, int flags, int *error, uint64_t *lower_rate) | ||||
{ | { | ||||
if (error) | if (error) | ||||
*error = EOPNOTSUPP; | *error = EOPNOTSUPP; | ||||
Context not available. | |||||
static inline const struct tcp_hwrate_limit_table * | static inline const struct tcp_hwrate_limit_table * | ||||
tcp_chg_pacing_rate(const struct tcp_hwrate_limit_table *crte, | tcp_chg_pacing_rate(const struct tcp_hwrate_limit_table *crte, | ||||
struct tcpcb *tp, struct ifnet *ifp, | struct tcpcb *tp, struct ifnet *ifp, | ||||
uint64_t bytes_per_sec, int flags, int *error) | uint64_t bytes_per_sec, int flags, int *error, uint64_t *lower_rate) | ||||
{ | { | ||||
if (error) | if (error) | ||||
*error = EOPNOTSUPP; | *error = EOPNOTSUPP; | ||||
Context not available. | |||||
* delayed ack). | * delayed ack). | ||||
*/ | */ | ||||
uint32_t | uint32_t | ||||
tcp_get_pacing_burst_size(uint64_t bw, uint32_t segsiz, int can_use_1mss, | tcp_get_pacing_burst_size(struct tcpcb *tp, uint64_t bw, uint32_t segsiz, int can_use_1mss, | ||||
const struct tcp_hwrate_limit_table *te, int *err); | const struct tcp_hwrate_limit_table *te, int *err); | ||||
void | |||||
tcp_rl_log_enobuf(const struct tcp_hwrate_limit_table *rte); | |||||
#endif | #endif | ||||
#endif | #endif | ||||
Context not available. |