void virtqueue_fill(VirtQueue *vq, const VirtQueueElement *elem,
                    unsigned int len, unsigned int idx)
{
    VRingUsedElem uelem;
    trace_virtqueue_fill(vq, elem, len, idx);
    virtqueue_unmap_sg(vq, elem, len);
    idx = (idx + vq->used_idx) % vq->vring.num;
    uelem.id = elem->index;
    uelem.len = len;
    vring_used_write(vq, &uelem, idx);
void virtqueue_fill(VirtQueue *vq, const VirtQueueElement *elem,
                    unsigned int len, unsigned int idx)
{
    VRingUsedElem uelem;
    trace_virtqueue_fill(vq, elem, len, idx);
    virtqueue_unmap_sg(vq, elem, len);
    idx = (idx + vq->used_idx) % vq->vring.num;
    uelem.id = elem->index;
    uelem.len = len;
    vring_used_write(vq, &uelem, idx);
void FUNC_0(VirtQueue *VAR_0, const VirtQueueElement *VAR_1,
                    unsigned int VAR_2, unsigned int VAR_3)
{
    VRingUsedElem uelem;
    trace_virtqueue_fill(VAR_0, VAR_1, VAR_2, VAR_3);
    virtqueue_unmap_sg(VAR_0, VAR_1, VAR_2);
    VAR_3 = (VAR_3 + VAR_0->used_idx) % VAR_0->vring.num;
    uelem.id = VAR_1->index;
    uelem.VAR_2 = VAR_2;
    vring_used_write(VAR_0, &uelem, VAR_3);
void FUNC_0(VirtQueue *VAR_0, const VirtQueueElement *VAR_1,
unsigned int VAR_2, unsigned int VAR_3)
{ VRingUsedElem uelem; trace_virtqueue_fill(VAR_0, VAR_1, VAR_2, VAR_3); virtqueue_unmap_sg(VAR_0, VAR_1, VAR_2); VAR_3 = (VAR_3 + VAR_0->used_idx) % VAR_0->vring.num; uelem.id = VAR_1->index; uelem.VAR_2 = VAR_2; vring_used_write(VAR_0, &uelem, VAR_3);