Home
last modified time | relevance | path

Searched refs:cost (Results 1 – 7 of 7) sorted by relevance

/net/netfilter/
Dxt_limit.c72 if ((READ_ONCE(priv->credit) < r->cost) && (READ_ONCE(priv->prev) == jiffies)) in limit_mt()
83 if (new_credit >= r->cost) { in limit_mt()
85 new_credit -= r->cost; in limit_mt()
128 if (r->cost == 0) { in limit_mt_check()
130 r->cost = user2credits(r->avg); in limit_mt_check()
150 u_int32_t credit_cap, cost; member
166 .cost = cm->cost, in limit_mt_compat_from_user()
180 .cost = m->cost, in limit_mt_compat_to_user()
Dnft_limit.c32 static inline bool nft_limit_eval(struct nft_limit_priv *priv, u64 cost) in nft_limit_eval() argument
44 delta = tokens - cost; in nft_limit_eval()
174 u64 cost; member
183 if (nft_limit_eval(&priv->limit, priv->cost)) in nft_limit_pkts_eval()
206 priv->cost = div64_u64(priv->limit.nsecs, priv->limit.rate); in nft_limit_pkts_init()
230 priv_dst->cost = priv_src->cost; in nft_limit_pkts_clone()
251 u64 cost = div64_u64(priv->nsecs * pkt->skb->len, priv->rate); in nft_limit_bytes_eval() local
253 if (nft_limit_eval(priv, cost)) in nft_limit_bytes_eval()
331 if (nft_limit_eval(&priv->limit, priv->cost)) in nft_limit_obj_pkts_eval()
346 priv->cost = div64_u64(priv->limit.nsecs, priv->limit.rate); in nft_limit_obj_pkts_init()
[all …]
Dxt_hashlimit.c103 u_int64_t cost; member
596 dh->rateinfo.cost = user2credits_byte(hinfo->cfg.avg); in rateinfo_init()
601 dh->rateinfo.cost = user2credits(hinfo->cfg.avg, revision); in rateinfo_init()
712 tmp = tmp * dh->rateinfo.cost; in hashlimit_byte_cost()
733 u64 cost; in hashlimit_mt_common() local
760 cost = (cfg->mode & XT_HASHLIMIT_BYTES) ? skb->len : 1; in hashlimit_mt_common()
761 dh->rateinfo.current_rate += cost; in hashlimit_mt_common()
774 cost = hashlimit_byte_cost(skb->len, dh); in hashlimit_mt_common()
776 cost = dh->rateinfo.cost; in hashlimit_mt_common()
778 if (dh->rateinfo.credit >= cost) { in hashlimit_mt_common()
[all …]
/net/bridge/netfilter/
Debt_limit.c46 if (info->credit >= info->cost) { in ebt_limit_mt()
48 info->credit -= info->cost; in ebt_limit_mt()
85 info->cost = user2credits(info->avg); in ebt_limit_mt_check()
98 compat_uint_t credit, credit_cap, cost; member
/net/openvswitch/
Dmeter.c605 u32 cost; in ovs_meter_execute() local
647 cost = (meter->kbps) ? skb->len * 8 : 1000; in ovs_meter_execute()
660 if (band->bucket >= cost) { in ovs_meter_execute()
661 band->bucket -= cost; in ovs_meter_execute()
/net/bluetooth/
DKconfig20 Bluetooth is low-cost, low-power, short-range wireless technology.
/net/ipv4/
DKconfig81 bool "IP: equal cost multipath"
89 equal "cost" and chooses one of them in a non-deterministic fashion