Lines Matching refs:pfcu64

100 pf_counter_u64_init(struct pf_counter_u64 *pfcu64, int flags)  in pf_counter_u64_init()  argument
103 pfcu64->pfcu64_value = 0; in pf_counter_u64_init()
104 pfcu64->pfcu64_seqc = 0; in pf_counter_u64_init()
105 pfcu64->pfcu64_pcpu = uma_zalloc_pcpu(pcpu_zone_8, flags | M_ZERO); in pf_counter_u64_init()
106 if (__predict_false(pfcu64->pfcu64_pcpu == NULL)) in pf_counter_u64_init()
112 pf_counter_u64_deinit(struct pf_counter_u64 *pfcu64) in pf_counter_u64_deinit() argument
115 uma_zfree_pcpu(pcpu_zone_8, pfcu64->pfcu64_pcpu); in pf_counter_u64_deinit()
133 pf_counter_u64_rollup_protected(struct pf_counter_u64 *pfcu64, uint64_t n) in pf_counter_u64_rollup_protected() argument
137 pfcu64->pfcu64_value += n; in pf_counter_u64_rollup_protected()
141 pf_counter_u64_add_protected(struct pf_counter_u64 *pfcu64, uint32_t n) in pf_counter_u64_add_protected() argument
147 pcpu = zpcpu_get(pfcu64->pfcu64_pcpu); in pf_counter_u64_add_protected()
153 pf_counter_u64_add(struct pf_counter_u64 *pfcu64, uint32_t n) in pf_counter_u64_add() argument
157 pf_counter_u64_add_protected(pfcu64, n); in pf_counter_u64_add()
162 pf_counter_u64_periodic(struct pf_counter_u64 *pfcu64) in pf_counter_u64_periodic() argument
170 seqc_write_begin(&pfcu64->pfcu64_seqc); in pf_counter_u64_periodic()
171 sum = pfcu64->pfcu64_value; in pf_counter_u64_periodic()
173 pcpu = zpcpu_get_cpu(pfcu64->pfcu64_pcpu, cpu); in pf_counter_u64_periodic()
178 pfcu64->pfcu64_value = sum; in pf_counter_u64_periodic()
179 seqc_write_end(&pfcu64->pfcu64_seqc); in pf_counter_u64_periodic()
184 pf_counter_u64_fetch(const struct pf_counter_u64 *pfcu64) in pf_counter_u64_fetch() argument
192 seqc = seqc_read(&pfcu64->pfcu64_seqc); in pf_counter_u64_fetch()
195 pcpu = zpcpu_get_cpu(pfcu64->pfcu64_pcpu, cpu); in pf_counter_u64_fetch()
198 sum += pfcu64->pfcu64_value; in pf_counter_u64_fetch()
199 if (seqc_consistent(&pfcu64->pfcu64_seqc, seqc)) in pf_counter_u64_fetch()
206 pf_counter_u64_zero_protected(struct pf_counter_u64 *pfcu64) in pf_counter_u64_zero_protected() argument
212 seqc_write_begin(&pfcu64->pfcu64_seqc); in pf_counter_u64_zero_protected()
214 pcpu = zpcpu_get_cpu(pfcu64->pfcu64_pcpu, cpu); in pf_counter_u64_zero_protected()
217 pfcu64->pfcu64_value = 0; in pf_counter_u64_zero_protected()
218 seqc_write_end(&pfcu64->pfcu64_seqc); in pf_counter_u64_zero_protected()
222 pf_counter_u64_zero(struct pf_counter_u64 *pfcu64) in pf_counter_u64_zero() argument
226 pf_counter_u64_zero_protected(pfcu64); in pf_counter_u64_zero()
235 pf_counter_u64_init(struct pf_counter_u64 *pfcu64, int flags) in pf_counter_u64_init() argument
238 pfcu64->counter = counter_u64_alloc(flags); in pf_counter_u64_init()
239 if (__predict_false(pfcu64->counter == NULL)) in pf_counter_u64_init()
245 pf_counter_u64_deinit(struct pf_counter_u64 *pfcu64) in pf_counter_u64_deinit() argument
248 counter_u64_free(pfcu64->counter); in pf_counter_u64_deinit()
264 pf_counter_u64_rollup_protected(struct pf_counter_u64 *pfcu64, uint64_t n) in pf_counter_u64_rollup_protected() argument
267 counter_u64_add(pfcu64->counter, n); in pf_counter_u64_rollup_protected()
271 pf_counter_u64_add_protected(struct pf_counter_u64 *pfcu64, uint32_t n) in pf_counter_u64_add_protected() argument
274 counter_u64_add(pfcu64->counter, n); in pf_counter_u64_add_protected()
278 pf_counter_u64_add(struct pf_counter_u64 *pfcu64, uint32_t n) in pf_counter_u64_add() argument
281 pf_counter_u64_add_protected(pfcu64, n); in pf_counter_u64_add()
285 pf_counter_u64_fetch(const struct pf_counter_u64 *pfcu64) in pf_counter_u64_fetch() argument
288 return (counter_u64_fetch(pfcu64->counter)); in pf_counter_u64_fetch()
292 pf_counter_u64_zero_protected(struct pf_counter_u64 *pfcu64) in pf_counter_u64_zero_protected() argument
295 counter_u64_zero(pfcu64->counter); in pf_counter_u64_zero_protected()
299 pf_counter_u64_zero(struct pf_counter_u64 *pfcu64) in pf_counter_u64_zero() argument
302 pf_counter_u64_zero_protected(pfcu64); in pf_counter_u64_zero()