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.
68 int len = skb->len; in _hbm_out_cg()
74 if (qsp != NULL && !qsp->loopback && (skb->ifindex == 1)) in _hbm_out_cg()
86 if (qdp->lasttime == 0) in _hbm_out_cg()
92 bpf_spin_lock(&qdp->lock); in _hbm_out_cg()
93 delta = qdp->lasttime - curtime; in _hbm_out_cg()
95 if (delta < -BURST_SIZE_NS) { in _hbm_out_cg()
97 qdp->lasttime = curtime - BURST_SIZE_NS; in _hbm_out_cg()
98 delta = -BURST_SIZE_NS; in _hbm_out_cg()
100 sendtime = qdp->lasttime; in _hbm_out_cg()
101 delta_send = BYTES_TO_NS(len, qdp->rate); in _hbm_out_cg()
102 __sync_add_and_fetch(&(qdp->lasttime), delta_send); in _hbm_out_cg()
103 bpf_spin_unlock(&qdp->lock); in _hbm_out_cg()
107 skb->tstamp = sendtime; in _hbm_out_cg()
110 if (qsp != NULL && (qsp->rate * 128) != qdp->rate) in _hbm_out_cg()
111 qdp->rate = qsp->rate * 128; in _hbm_out_cg()
153 if (qsp != NULL && qsp->no_cn) in _hbm_out_cg()
160 __sync_add_and_fetch(&(qdp->lasttime), -delta_send); in _hbm_out_cg()