Lines Matching refs:last_used
794 u16 last_used; in virtqueue_get_buf_ctx_split() local
812 last_used = (vq->last_used_idx & (vq->split.vring.num - 1)); in virtqueue_get_buf_ctx_split()
814 vq->split.vring.used->ring[last_used].id); in virtqueue_get_buf_ctx_split()
816 vq->split.vring.used->ring[last_used].len); in virtqueue_get_buf_ctx_split()
1605 u16 last_used; in more_used_packed() local
1610 last_used = packed_last_used(last_used_idx); in more_used_packed()
1612 return is_used_desc_packed(vq, last_used, used_wrap_counter); in more_used_packed()
1620 u16 last_used, id, last_used_idx; in virtqueue_get_buf_ctx_packed() local
1642 last_used = packed_last_used(last_used_idx); in virtqueue_get_buf_ctx_packed()
1643 id = le16_to_cpu(vq->packed.vring.desc[last_used].id); in virtqueue_get_buf_ctx_packed()
1644 *len = le32_to_cpu(vq->packed.vring.desc[last_used].len); in virtqueue_get_buf_ctx_packed()
1659 last_used += vq->packed.desc_state[id].num; in virtqueue_get_buf_ctx_packed()
1660 if (unlikely(last_used >= vq->packed.vring.num)) { in virtqueue_get_buf_ctx_packed()
1661 last_used -= vq->packed.vring.num; in virtqueue_get_buf_ctx_packed()
1665 last_used = (last_used | (used_wrap_counter << VRING_PACKED_EVENT_F_WRAP_CTR)); in virtqueue_get_buf_ctx_packed()
1666 WRITE_ONCE(vq->last_used_idx, last_used); in virtqueue_get_buf_ctx_packed()