| 3683 | } |
| 3684 | |
| 3685 | static struct mbuf ** |
| 3686 | _ring_peek_one(struct ifmp_ring *r, int cidx, int offset, int remaining) |
| 3687 | { |
| 3688 | int next, size; |
| 3689 | struct mbuf **items; |
| 3690 | |
| 3691 | size = r->size; |
| 3692 | next = (cidx + CACHE_PTR_INCREMENT) & (size-1); |
| 3693 | items = __DEVOLATILE(struct mbuf **, &r->items[0]); |
| 3694 | |
| 3695 | prefetch(items[(cidx + offset) & (size-1)]); |
| 3696 | if (remaining > 1) { |
| 3697 | prefetch2cachelines(&items[next]); |
| 3698 | prefetch2cachelines(items[(cidx + offset + 1) & (size-1)]); |
| 3699 | prefetch2cachelines(items[(cidx + offset + 2) & (size-1)]); |
| 3700 | prefetch2cachelines(items[(cidx + offset + 3) & (size-1)]); |
| 3701 | } |
| 3702 | return (__DEVOLATILE(struct mbuf **, &r->items[(cidx + offset) & (size-1)])); |
| 3703 | } |
| 3704 | |
| 3705 | static void |
| 3706 | iflib_txq_check_drain(iflib_txq_t txq, int budget) |
no test coverage detected