Home
last modified time | relevance | path

Searched refs:avg (Results 1 – 5 of 5) sorted by relevance

/net/netfilter/
Dxt_limit.c112 || user2credits(r->avg * r->burst) < user2credits(r->avg)) { in limit_mt_check()
114 r->avg, r->burst); in limit_mt_check()
127 priv->credit = user2credits(r->avg * r->burst); /* Credits full. */ in limit_mt_check()
130 r->cost = user2credits(r->avg); in limit_mt_check()
145 u_int32_t avg; member
161 .avg = cm->avg, in limit_mt_compat_from_user()
175 .avg = m->avg, in limit_mt_compat_to_user()
Dxt_hashlimit.c145 to->avg = cfg->avg; in cfg_copy()
157 to->avg = cfg->avg; in cfg_copy()
582 user2rate_bytes((u32)hinfo->cfg.avg); in rateinfo_init()
589 dh->rateinfo.rate = user2rate(hinfo->cfg.avg); in rateinfo_init()
596 dh->rateinfo.cost = user2credits_byte(hinfo->cfg.avg); in rateinfo_init()
599 dh->rateinfo.credit = user2credits(hinfo->cfg.avg * in rateinfo_init()
601 dh->rateinfo.cost = user2credits(hinfo->cfg.avg, revision); in rateinfo_init()
872 if (cfg->avg == 0 || cfg->avg > U32_MAX) { in hashlimit_mt_check_common()
882 if (user2credits_byte(cfg->avg) == 0) { in hashlimit_mt_check_common()
884 cfg->avg); in hashlimit_mt_check_common()
[all …]
/net/bridge/netfilter/
Debt_limit.c75 user2credits(info->avg * info->burst) < user2credits(info->avg)) { in ebt_limit_mt_check()
77 info->avg, info->burst); in ebt_limit_mt_check()
83 info->credit = user2credits(info->avg * info->burst); in ebt_limit_mt_check()
84 info->credit_cap = user2credits(info->avg * info->burst); in ebt_limit_mt_check()
85 info->cost = user2credits(info->avg); in ebt_limit_mt_check()
96 compat_uint_t avg, burst; member
/net/dccp/ccids/lib/
Dtfrc.h49 static inline u32 tfrc_ewma(const u32 avg, const u32 newval, const u8 weight) in tfrc_ewma() argument
51 return avg ? (weight * avg + (10 - weight) * newval) / 10 : newval; in tfrc_ewma()
/net/sched/
Dsch_cake.c1307 static u64 cake_ewma(u64 avg, u64 sample, u32 shift) in cake_ewma() argument
1309 avg -= avg >> shift; in cake_ewma()
1310 avg += sample >> shift; in cake_ewma()
1311 return avg; in cake_ewma()