Lines Matching +full:current +full:- +full:limiting
1 // SPDX-License-Identifier: GPL-2.0
15 * occur at the actual qdisc (which is not used for rate limiting).
20 * - <--------------------------|------------------------> +
31 * to reduce the congestion window. The current implementation uses a linear
39 * tcp_cwr in the current kernel code.
61 int len = skb->len; in _hbm_out_cg()
76 if (qsp != NULL && !qsp->loopback && (skb->ifindex == 1)) in _hbm_out_cg()
88 else if (qdp->lasttime == 0) in _hbm_out_cg()
94 bpf_spin_lock(&qdp->lock); in _hbm_out_cg()
95 credit = qdp->credit; in _hbm_out_cg()
96 delta = curtime - qdp->lasttime; in _hbm_out_cg()
102 qdp->lasttime = curtime; in _hbm_out_cg()
103 new_credit = credit + CREDIT_PER_NS(delta, qdp->rate); in _hbm_out_cg()
109 credit -= len; in _hbm_out_cg()
110 qdp->credit = credit; in _hbm_out_cg()
111 bpf_spin_unlock(&qdp->lock); in _hbm_out_cg()
115 if (qsp != NULL && (qsp->rate * 128) != qdp->rate) { in _hbm_out_cg()
116 qdp->rate = qsp->rate * 128; in _hbm_out_cg()
118 (int)qdp->rate, in _hbm_out_cg()
119 CREDIT_PER_NS(1000000000, qdp->rate) * 8); 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()
135 if (credit < -MARK_THRESH) in _hbm_out_cg()
151 if (-credit >= MARK_THRESH + in _hbm_out_cg()
164 if (qsp->no_cn) in _hbm_out_cg()
171 __sync_add_and_fetch(&(qdp->credit), len); in _hbm_out_cg()