Lines Matching refs:q
55 struct bpf_vqueue *q; in bpf_spin_lock_test() local
80 q = bpf_map_lookup_elem(&vqueue, &key); in bpf_spin_lock_test()
81 if (!q) in bpf_spin_lock_test()
84 bpf_spin_lock(&q->lock); in bpf_spin_lock_test()
85 q->credit += CREDIT_PER_NS(curtime - q->lasttime, q->rate); in bpf_spin_lock_test()
86 q->lasttime = curtime; in bpf_spin_lock_test()
87 if (q->credit > max_credit) in bpf_spin_lock_test()
88 q->credit = max_credit; in bpf_spin_lock_test()
89 q->credit -= pkt_len; in bpf_spin_lock_test()
90 credit = q->credit; in bpf_spin_lock_test()
91 bpf_spin_unlock(&q->lock); in bpf_spin_lock_test()