Searched refs:cost (Results 1 – 9 of 9) sorted by relevance
/net/netfilter/ |
D | xt_limit.c | 76 if (priv->credit >= r->cost) { in limit_mt() 78 priv->credit -= r->cost; in limit_mt() 121 if (r->cost == 0) { in limit_mt_check() 123 r->cost = user2credits(r->avg); in limit_mt_check() 144 u_int32_t credit_cap, cost; member 160 .cost = cm->cost, in limit_mt_compat_from_user() 174 .cost = m->cost, in limit_mt_compat_to_user()
|
D | nft_limit.c | 28 static inline bool nft_limit_eval(struct nft_limit *limit, u64 cost) in nft_limit_eval() argument 40 delta = tokens - cost; in nft_limit_eval() 126 u64 cost; member 135 if (nft_limit_eval(&priv->limit, priv->cost)) in nft_limit_pkts_eval() 158 priv->cost = div64_u64(priv->limit.nsecs, priv->limit.rate); in nft_limit_pkts_init() 183 u64 cost = div64_u64(priv->nsecs * pkt->skb->len, priv->rate); in nft_limit_bytes_eval() local 185 if (nft_limit_eval(priv, cost)) in nft_limit_bytes_eval() 245 if (nft_limit_eval(&priv->limit, priv->cost)) in nft_limit_obj_pkts_eval() 260 priv->cost = div64_u64(priv->limit.nsecs, priv->limit.rate); in nft_limit_obj_pkts_init() 287 u64 cost = div64_u64(priv->nsecs * pkt->skb->len, priv->rate); in nft_limit_obj_bytes_eval() local [all …]
|
D | xt_hashlimit.c | 102 u_int64_t cost; member 614 dh->rateinfo.cost = user2credits_byte(hinfo->cfg.avg); in rateinfo_init() 619 dh->rateinfo.cost = user2credits(hinfo->cfg.avg, revision); in rateinfo_init() 730 tmp = tmp * dh->rateinfo.cost; in hashlimit_byte_cost() 751 u64 cost; in hashlimit_mt_common() local 778 cost = (cfg->mode & XT_HASHLIMIT_BYTES) ? skb->len : 1; in hashlimit_mt_common() 779 dh->rateinfo.current_rate += cost; in hashlimit_mt_common() 792 cost = hashlimit_byte_cost(skb->len, dh); in hashlimit_mt_common() 794 cost = dh->rateinfo.cost; in hashlimit_mt_common() 796 if (dh->rateinfo.credit >= cost) { in hashlimit_mt_common() [all …]
|
/net/bridge/netfilter/ |
D | ebt_limit.c | 46 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/ |
D | meter.c | 450 u32 cost; in ovs_meter_execute() local 486 cost = (meter->kbps) ? skb->len * 8 : 1000; in ovs_meter_execute() 499 if (band->bucket >= cost) { in ovs_meter_execute() 500 band->bucket -= cost; in ovs_meter_execute()
|
/net/core/ |
D | sock_map.c | 27 u64 cost; in sock_map_alloc() local 46 cost = (u64) stab->map.max_entries * sizeof(struct sock *); in sock_map_alloc() 47 err = bpf_map_charge_init(&stab->map.memory, cost); in sock_map_alloc() 800 u64 cost; in sock_hash_alloc() local 827 cost = (u64) htab->buckets_num * sizeof(struct bpf_htab_bucket) + in sock_hash_alloc() 829 if (cost >= U32_MAX - PAGE_SIZE) { in sock_hash_alloc()
|
D | bpf_sk_storage.c | 638 u64 cost; in bpf_sk_storage_map_alloc() local 649 cost = sizeof(*smap->buckets) * nbuckets + sizeof(*smap); in bpf_sk_storage_map_alloc() 651 ret = bpf_map_charge_init(&smap->map.memory, cost); in bpf_sk_storage_map_alloc()
|
/net/bluetooth/ |
D | Kconfig | 20 Bluetooth is low-cost, low-power, short-range wireless technology.
|
/net/ipv4/ |
D | Kconfig | 81 bool "IP: equal cost multipath" 89 equal "cost" and chooses one of them in a non-deterministic fashion
|