Lines Matching refs:nb
157 static inline __u32 xsk_prod_nb_free(struct xsk_ring_prod *r, __u32 nb) in xsk_prod_nb_free() argument
161 if (free_entries >= nb) in xsk_prod_nb_free()
177 static inline __u32 xsk_cons_nb_avail(struct xsk_ring_cons *r, __u32 nb) in xsk_cons_nb_avail() argument
186 return (entries > nb) ? nb : entries; in xsk_cons_nb_avail()
189 static inline __u32 xsk_ring_prod__reserve(struct xsk_ring_prod *prod, __u32 nb, __u32 *idx) in xsk_ring_prod__reserve() argument
191 if (xsk_prod_nb_free(prod, nb) < nb) in xsk_ring_prod__reserve()
195 prod->cached_prod += nb; in xsk_ring_prod__reserve()
197 return nb; in xsk_ring_prod__reserve()
200 static inline void xsk_ring_prod__submit(struct xsk_ring_prod *prod, __u32 nb) in xsk_ring_prod__submit() argument
205 libbpf_smp_store_release(prod->producer, *prod->producer + nb); in xsk_ring_prod__submit()
208 static inline __u32 xsk_ring_cons__peek(struct xsk_ring_cons *cons, __u32 nb, __u32 *idx) in xsk_ring_cons__peek() argument
210 __u32 entries = xsk_cons_nb_avail(cons, nb); in xsk_ring_cons__peek()
220 static inline void xsk_ring_cons__cancel(struct xsk_ring_cons *cons, __u32 nb) in xsk_ring_cons__cancel() argument
222 cons->cached_cons -= nb; in xsk_ring_cons__cancel()
225 static inline void xsk_ring_cons__release(struct xsk_ring_cons *cons, __u32 nb) in xsk_ring_cons__release() argument
230 libbpf_smp_store_release(cons->consumer, *cons->consumer + nb); in xsk_ring_cons__release()