34#ifndef __tcp_ratelimit_h__
35#define __tcp_ratelimit_h__
40#define HDWRPACE_INITED 0x0001
41#define HDWRPACE_TAGPRESENT 0x0002
42#define HDWRPACE_IFPDEPARTED 0x0004
45 struct m_snd_tag *
tag;
54#define RS_IS_DEFF 0x0001
55#define RS_IS_INTF 0x0002
56#define RS_NO_PRE 0x0004
57#define RS_INT_TBL 0x0010
61#define RS_IS_DEAD 0x0020
62#define RS_FUNERAL_SCHD 0x0040
63#define RS_INTF_NO_SUP 0x0100
85#define RS_PACING_EXACT_MATCH 0x0001
86#define RS_PACING_GT 0x0002
87#define RS_PACING_GEQ 0x0004
88#define RS_PACING_LT 0x0008
89#define RS_PACING_SUB_OK 0x0010
92#ifndef ETHERNET_SEGMENT_SIZE
93#define ETHERNET_SEGMENT_SIZE 1514
96#define DETAILED_RATELIMIT_SYSCTL 1
115 uint64_t bytes_per_sec,
int flags,
int *error, uint64_t *lower_rate);
119 struct tcpcb *tp,
struct ifnet *ifp,
120 uint64_t bytes_per_sec,
int flags,
int *error, uint64_t *lower_rate);
127 uint64_t bytes_per_sec,
int flags,
int *error, uint64_t *lower_rate)
136 struct tcpcb *tp,
struct ifnet *ifp,
137 uint64_t bytes_per_sec,
int flags,
int *error, uint64_t *lower_rate)
151static uint64_t
inline
157static uint64_t
inline
const struct tcp_rate_set * ptbl
CK_LIST_ENTRY(tcp_rate_set) next
struct epoch_context rs_epoch_ctx
struct tcp_hwrate_limit_table * rs_rlt
struct sysctl_ctx_list sysctl_ctx
void tcp_rl_log_enobuf(const struct tcp_hwrate_limit_table *rte)
static uint64_t tcp_hw_highest_rate(const struct tcp_hwrate_limit_table *rle)
uint32_t 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)
static const struct tcp_hwrate_limit_table * tcp_chg_pacing_rate(const struct tcp_hwrate_limit_table *crte, struct tcpcb *tp, struct ifnet *ifp, uint64_t bytes_per_sec, int flags, int *error, uint64_t *lower_rate)
CK_LIST_HEAD(head_tcp_rate_set, tcp_rate_set)
static const struct tcp_hwrate_limit_table * tcp_set_pacing_rate(struct tcpcb *tp, struct ifnet *ifp, uint64_t bytes_per_sec, int flags, int *error, uint64_t *lower_rate)
static uint64_t tcp_hw_highest_rate_ifp(struct ifnet *ifp, struct inpcb *inp)
static void tcp_rel_pacing_rate(const struct tcp_hwrate_limit_table *crte, struct tcpcb *tp)