Home
last modified time | relevance | path

Searched refs:credit (Results 1 – 25 of 51) sorted by relevance

123

/Linux-v5.4/samples/bpf/
Dhbm_out_kern.c64 int credit; in _hbm_out_cg() local
95 credit = qdp->credit; in _hbm_out_cg()
103 new_credit = credit + CREDIT_PER_NS(delta, qdp->rate); in _hbm_out_cg()
105 credit = MAX_CREDIT; in _hbm_out_cg()
107 credit = new_credit; in _hbm_out_cg()
109 credit -= len; in _hbm_out_cg()
110 qdp->credit = credit; in _hbm_out_cg()
124 if (credit < -DROP_THRESH || in _hbm_out_cg()
125 (len > LARGE_PKT_THRESH && credit < -LARGE_PKT_DROP_THRESH)) { in _hbm_out_cg()
132 } else if (credit < 0) { in _hbm_out_cg()
[all …]
Dhbm_kern.h144 qdp->credit = INIT_CREDIT; in hbm_init_vqueue()
156 qdp->credit = 0; // not used in hbm_init_edt_vqueue()
168 int credit) in hbm_update_stats() argument
200 __sync_add_and_fetch(&(qsp->sum_credit), credit); in hbm_update_stats()
Dhbm.h15 int credit; /* In bytes */ member
/Linux-v5.4/net/netfilter/
Dxt_limit.c20 uint32_t credit; member
72 priv->credit += (now - xchg(&priv->prev, now)) * CREDITS_PER_JIFFY; in limit_mt()
73 if (priv->credit > r->credit_cap) in limit_mt()
74 priv->credit = r->credit_cap; in limit_mt()
76 if (priv->credit >= r->cost) { in limit_mt()
78 priv->credit -= r->cost; in limit_mt()
120 priv->credit = user2credits(r->avg * r->burst); /* Credits full. */ in limit_mt_check()
122 r->credit_cap = priv->credit; /* Credits full. */ in limit_mt_check()
143 u_int32_t credit; member
158 .credit = cm->credit, in limit_mt_compat_from_user()
[all …]
Dxt_hashlimit.c100 u_int64_t credit; member
574 u64 tmp = dh->rateinfo.credit; in rateinfo_recalc()
575 dh->rateinfo.credit += CREDITS_PER_JIFFY_BYTES * delta; in rateinfo_recalc()
577 if (tmp >= dh->rateinfo.credit) {/* overflow */ in rateinfo_recalc()
578 dh->rateinfo.credit = cap; in rateinfo_recalc()
584 dh->rateinfo.credit += delta * cpj; in rateinfo_recalc()
587 if (dh->rateinfo.credit > cap) in rateinfo_recalc()
588 dh->rateinfo.credit = cap; in rateinfo_recalc()
613 dh->rateinfo.credit = CREDITS_PER_JIFFY_BYTES * HZ; in rateinfo_init()
617 dh->rateinfo.credit = user2credits(hinfo->cfg.avg * in rateinfo_init()
[all …]
/Linux-v5.4/tools/testing/selftests/bpf/progs/
Dtest_spin_lock.c35 int credit; member
51 volatile int credit = 0, max_credit = 100, pkt_len = 64; in bpf_sping_lock_test() local
84 q->credit += CREDIT_PER_NS(curtime - q->lasttime, q->rate); in bpf_sping_lock_test()
86 if (q->credit > max_credit) in bpf_sping_lock_test()
87 q->credit = max_credit; in bpf_sping_lock_test()
88 q->credit -= pkt_len; in bpf_sping_lock_test()
89 credit = q->credit; in bpf_sping_lock_test()
/Linux-v5.4/net/bridge/netfilter/
Debt_limit.c42 info->credit += (now - xchg(&info->prev, now)) * CREDITS_PER_JIFFY; in ebt_limit_mt()
43 if (info->credit > info->credit_cap) in ebt_limit_mt()
44 info->credit = info->credit_cap; in ebt_limit_mt()
46 if (info->credit >= info->cost) { in ebt_limit_mt()
48 info->credit -= info->cost; in ebt_limit_mt()
83 info->credit = user2credits(info->avg * info->burst); in ebt_limit_mt_check()
98 compat_uint_t credit, credit_cap, cost; member
/Linux-v5.4/drivers/infiniband/sw/rdmavt/
Drc.c168 u32 credit = (aeth >> IB_AETH_CREDIT_SHIFT) & IB_AETH_CREDIT_MASK; in rvt_get_credit() local
176 if (credit == IB_AETH_CREDIT_INVAL) { in rvt_get_credit()
186 credit = (aeth + credit_table[credit]) & IB_MSN_MASK; in rvt_get_credit()
187 if (rvt_cmp_msn(credit, qp->s_lsn) > 0) { in rvt_get_credit()
188 qp->s_lsn = credit; in rvt_get_credit()
/Linux-v5.4/drivers/xen/
Dballoon.c289 long credit; in reserve_additional_memory() local
294 credit = balloon_stats.target_pages + balloon_stats.target_unpopulated in reserve_additional_memory()
301 if (credit <= 0) in reserve_additional_memory()
304 balloon_hotplug = round_up(credit, PAGES_PER_SECTION); in reserve_additional_memory()
518 long credit; in balloon_process() local
524 credit = current_credit(); in balloon_process()
526 if (credit > 0) { in balloon_process()
528 state = increase_reservation(credit); in balloon_process()
533 if (credit < 0) { in balloon_process()
536 n_pages = min(-credit, si_mem_available()); in balloon_process()
[all …]
/Linux-v5.4/drivers/infiniband/hw/cxgb3/
Diwch_cq.c40 u32 credit = 0; in __iwch_poll_cq_one() local
46 &credit); in __iwch_poll_cq_one()
47 if (t3a_device(chp->rhp) && credit) { in __iwch_poll_cq_one()
49 credit, chp->cq.cqid); in __iwch_poll_cq_one()
50 cxio_hal_cq_op(&rhp->rdev, &chp->cq, CQ_CREDIT_UPDATE, credit); in __iwch_poll_cq_one()
Dcxio_hal.h159 enum t3_cq_opcode op, u32 credit);
195 u8 *cqe_flushed, u64 *cookie, u32 *credit);
Dcxio_hal.c72 enum t3_cq_opcode op, u32 credit) in cxio_hal_cq_op() argument
80 setup.credits = (op == CQ_CREDIT_UPDATE) ? credit : 0; in cxio_hal_cq_op()
1117 u8 *cqe_flushed, u64 *cookie, u32 *credit) in cxio_poll_cq() argument
1123 *credit = 0; in cxio_poll_cq()
1307 *credit = cq->rptr - cq->wptr; in cxio_poll_cq()
/Linux-v5.4/drivers/perf/
Dfsl_imx8_ddr_perf.c124 IMX8_DDR_PMU_EVENT_ATTR(lp-read-credit-cnt, 0x10),
125 IMX8_DDR_PMU_EVENT_ATTR(hp-read-credit-cnt, 0x11),
126 IMX8_DDR_PMU_EVENT_ATTR(write-credit-cnt, 0x12),
132 IMX8_DDR_PMU_EVENT_ATTR(hp-xact-credit, 0x25),
134 IMX8_DDR_PMU_EVENT_ATTR(lp-xact-credit, 0x27),
135 IMX8_DDR_PMU_EVENT_ATTR(wr-xact-credit, 0x29),
/Linux-v5.4/net/sched/
Dsch_fq.c78 int credit; member
302 f->credit = q->initial_quantum; in fq_classify()
327 f->credit = q->initial_quantum; in fq_classify()
435 f->credit = max_t(u32, f->credit, q->quantum); in fq_enqueue()
515 if (f->credit <= 0) { in fq_dequeue()
516 f->credit += q->quantum; in fq_dequeue()
554 f->credit -= plen; in fq_dequeue()
570 f->credit = 0; in fq_dequeue()
573 if (f->credit > 0) in fq_dequeue()
/Linux-v5.4/net/ipv4/
Dicmp.c233 u32 credit; member
248 u32 credit, delta, incr = 0, now = (u32)jiffies; in icmp_global_allow() local
254 if (!icmp_global.credit) { in icmp_global_allow()
267 credit = min_t(u32, icmp_global.credit + incr, sysctl_icmp_msgs_burst); in icmp_global_allow()
268 if (credit) { in icmp_global_allow()
269 credit--; in icmp_global_allow()
272 icmp_global.credit = credit; in icmp_global_allow()
/Linux-v5.4/include/uapi/linux/netfilter_bridge/
Debt_limit.h21 __u32 credit; member
/Linux-v5.4/include/uapi/linux/netfilter/
Dxt_limit.h20 __u32 credit; /* moved to xt_limit_priv */ member
/Linux-v5.4/net/vmw_vsock/
Dvirtio_transport_common.c234 u32 virtio_transport_get_credit(struct virtio_vsock_sock *vvs, u32 credit) in virtio_transport_get_credit() argument
240 if (ret > credit) in virtio_transport_get_credit()
241 ret = credit; in virtio_transport_get_credit()
249 void virtio_transport_put_credit(struct virtio_vsock_sock *vvs, u32 credit) in virtio_transport_put_credit() argument
252 vvs->tx_cnt -= credit; in virtio_transport_put_credit()
/Linux-v5.4/include/linux/
Dvirtio_vsock.h157 void virtio_transport_put_credit(struct virtio_vsock_sock *vvs, u32 credit);
/Linux-v5.4/drivers/scsi/ibmvscsi_tgt/
Dibmvscsi_tgt.h234 int credit; member
/Linux-v5.4/net/rds/
Dib_cm.c104 __be32 credit = 0; in rds_ib_cm_connect_complete() local
115 credit = dp->ricp_v6.dp_credit; in rds_ib_cm_connect_complete()
127 credit = dp->ricp_v4.dp_credit; in rds_ib_cm_connect_complete()
134 rds_ib_set_flow_control(conn, be32_to_cpu(credit)); in rds_ib_cm_connect_complete()
/Linux-v5.4/drivers/infiniband/hw/cxgb4/
Dcq.c545 u8 *cqe_flushed, u64 *cookie, u32 *credit, in poll_cq() argument
552 *credit = 0; in poll_cq()
759 u32 credit = 0; in __c4iw_poll_cq_one() local
764 ret = poll_cq(wq, &(chp->cq), &cqe, &cqe_flushed, &cookie, &credit, in __c4iw_poll_cq_one()
/Linux-v5.4/Documentation/ABI/stable/
Dsysfs-driver-ib_srp166 SRP credit algorithm in the SRP specification.
188 information see also the SRP credit algorithm in the SRP
/Linux-v5.4/fs/ext4/
Dresize.c1456 int err = 0, err2 = 0, credit; in ext4_flex_group_add() local
1475 credit = 3; /* sb, resize inode, resize inode dindirect */ in ext4_flex_group_add()
1477 credit += 1 + DIV_ROUND_UP(flex_gd->count, EXT4_DESC_PER_BLOCK(sb)); in ext4_flex_group_add()
1478 credit += reserved_gdb; /* Reserved GDT dindirect blocks */ in ext4_flex_group_add()
1479 handle = ext4_journal_start_sb(sb, EXT4_HT_RESIZE, credit); in ext4_flex_group_add()
/Linux-v5.4/drivers/net/ethernet/broadcom/
Dcnic_if.h160 struct drv_ctl_spq_credit credit; member

123