Lines Matching refs:ring

2 /* XDP user-space ring structure
45 struct xdp_ring *ring;
59 * completion ring, the kernel is the producer and user space is the
95 * now and again after circling through the ring.
102 * RESERVE entries PEEK in the ring for entries
103 * WRITE data into the ring READ data from the ring
106 * The producer reserves one or more entries in the ring. It can then
110 * The consumer peeks into the ring to see if the producer has written
122 struct xdp_umem_ring *ring = (struct xdp_umem_ring *)q->ring;
125 *addr = ring->desc[idx];
210 struct xdp_rxtx_ring *ring = (struct xdp_rxtx_ring *)q->ring;
213 *desc = ring->desc[idx];
245 struct xdp_rxtx_ring *ring = (struct xdp_rxtx_ring *)q->ring;
249 descs[nb_entries] = ring->desc[idx];
278 smp_store_release(&q->ring->consumer, q->cached_cons); /* D, matchees A */
284 q->cached_prod = smp_load_acquire(&q->ring->producer); /* C, matches B */
328 * Reflect this to global state when we get new entries from the ring in
344 return READ_ONCE(q->ring->producer) - READ_ONCE(q->ring->consumer);
357 q->cached_cons = READ_ONCE(q->ring->consumer);
385 struct xdp_umem_ring *ring = (struct xdp_umem_ring *)q->ring;
391 ring->desc[q->cached_prod++ & q->ring_mask] = addr;
398 struct xdp_umem_ring *ring = (struct xdp_umem_ring *)q->ring;
404 ring->desc[cached_prod++ & q->ring_mask] = descs[i].addr;
411 struct xdp_rxtx_ring *ring = (struct xdp_rxtx_ring *)q->ring;
419 ring->desc[idx].addr = addr;
420 ring->desc[idx].len = len;
421 ring->desc[idx].options = flags;
428 smp_store_release(&q->ring->producer, idx); /* B, matches C */
438 __xskq_prod_submit(q, q->ring->producer + nb_entries);
444 return READ_ONCE(q->ring->consumer) == READ_ONCE(q->ring->producer);