vmxnet3_pop_next_tx_descr(VMXNET3State *s,

                          int qidx,

                          struct Vmxnet3_TxDesc *txd,

                          uint32_t *descr_idx)

{

    Vmxnet3Ring *ring = &s->txq_descr[qidx].tx_ring;

    PCIDevice *d = PCI_DEVICE(s);



    vmxnet3_ring_read_curr_cell(d, ring, txd);

    if (txd->gen == vmxnet3_ring_curr_gen(ring)) {

        /* Only read after generation field verification */

        smp_rmb();

        /* Re-read to be sure we got the latest version */

        vmxnet3_ring_read_curr_cell(d, ring, txd);

        VMXNET3_RING_DUMP(VMW_RIPRN, "TX", qidx, ring);

        *descr_idx = vmxnet3_ring_curr_cell_idx(ring);

        vmxnet3_inc_tx_consumption_counter(s, qidx);

        return true;

    }



    return false;

}

vmxnet3_pop_next_tx_descr(VMXNET3State *s,

                          int qidx,

                          struct Vmxnet3_TxDesc *txd,

                          uint32_t *descr_idx)

{

    Vmxnet3Ring *ring = &s->txq_descr[qidx].tx_ring;

    PCIDevice *d = PCI_DEVICE(s);



    vmxnet3_ring_read_curr_cell(d, ring, txd);

    if (txd->gen == vmxnet3_ring_curr_gen(ring)) {

        

        smp_rmb();

        

        vmxnet3_ring_read_curr_cell(d, ring, txd);

        VMXNET3_RING_DUMP(VMW_RIPRN, "TX", qidx, ring);

        *descr_idx = vmxnet3_ring_curr_cell_idx(ring);

        vmxnet3_inc_tx_consumption_counter(s, qidx);

        return true;

    }



    return false;

}

    vmxnet3_ring_read_curr_cell(d, ring, txd);         vmxnet3_ring_read_curr_cell(d, ring, txd);
FUNC_0(VMXNET3State *VAR_0,

                          int VAR_1,

                          struct Vmxnet3_TxDesc *VAR_2,

                          uint32_t *VAR_3)

{

    Vmxnet3Ring *ring = &VAR_0->txq_descr[VAR_1].tx_ring;

    PCIDevice *d = PCI_DEVICE(VAR_0);



    vmxnet3_ring_read_curr_cell(d, ring, VAR_2);

    if (VAR_2->gen == vmxnet3_ring_curr_gen(ring)) {

        

        smp_rmb();

        

        vmxnet3_ring_read_curr_cell(d, ring, VAR_2);

        VMXNET3_RING_DUMP(VMW_RIPRN, "TX", VAR_1, ring);

        *VAR_3 = vmxnet3_ring_curr_cell_idx(ring);

        vmxnet3_inc_tx_consumption_counter(VAR_0, VAR_1);

        return true;

    }



    return false;

}

FUNC_0(VMXNET3State *VAR_0,
int VAR_1,
struct Vmxnet3_TxDesc *VAR_2,
uint32_t *VAR_3)
{ Vmxnet3Ring *ring = &VAR_0->txq_descr[VAR_1].tx_ring; PCIDevice *d = PCI_DEVICE(VAR_0); vmxnet3_ring_read_curr_cell(d, ring, VAR_2); if (VAR_2->gen == vmxnet3_ring_curr_gen(ring)) { smp_rmb(); vmxnet3_ring_read_curr_cell(d, ring, VAR_2); VMXNET3_RING_DUMP(VMW_RIPRN, "TX", VAR_1, ring); *VAR_3 = vmxnet3_ring_curr_cell_idx(ring); vmxnet3_inc_tx_consumption_counter(VAR_0, VAR_1); return true; } return false; }