vmxnet3_init_msix(VMXNET3State *s)

{

    PCIDevice *d = PCI_DEVICE(s);

    int res = msix_init(d, VMXNET3_MAX_INTRS,

                        &s->msix_bar,

                        VMXNET3_MSIX_BAR_IDX, VMXNET3_OFF_MSIX_TABLE,

                        &s->msix_bar,

                        VMXNET3_MSIX_BAR_IDX, VMXNET3_OFF_MSIX_PBA(s),

                        VMXNET3_MSIX_OFFSET(s));



    if (0 > res) {

        VMW_WRPRN("Failed to initialize MSI-X, error %d", res);

        s->msix_used = false;

    } else {

        if (!vmxnet3_use_msix_vectors(s, VMXNET3_MAX_INTRS)) {

            VMW_WRPRN("Failed to use MSI-X vectors, error %d", res);

            msix_uninit(d, &s->msix_bar, &s->msix_bar);

            s->msix_used = false;

        } else {

            s->msix_used = true;

        }

    }

    return s->msix_used;

}

vmxnet3_init_msix(VMXNET3State *s)

{

    PCIDevice *d = PCI_DEVICE(s);

    int res = msix_init(d, VMXNET3_MAX_INTRS,

                        &s->msix_bar,

                        VMXNET3_MSIX_BAR_IDX, VMXNET3_OFF_MSIX_TABLE,

                        &s->msix_bar,

                        VMXNET3_MSIX_BAR_IDX, VMXNET3_OFF_MSIX_PBA(s),

                        VMXNET3_MSIX_OFFSET(s));



    if (0 > res) {

        VMW_WRPRN("Failed to initialize MSI-X, error %d", res);

        s->msix_used = false;

    } else {

        if (!vmxnet3_use_msix_vectors(s, VMXNET3_MAX_INTRS)) {

            VMW_WRPRN("Failed to use MSI-X vectors, error %d", res);

            msix_uninit(d, &s->msix_bar, &s->msix_bar);

            s->msix_used = false;

        } else {

            s->msix_used = true;

        }

    }

    return s->msix_used;

}

                        VMXNET3_MSIX_OFFSET(s));
FUNC_0(VMXNET3State *VAR_0)

{

    PCIDevice *d = PCI_DEVICE(VAR_0);

    int VAR_1 = msix_init(d, VMXNET3_MAX_INTRS,

                        &VAR_0->msix_bar,

                        VMXNET3_MSIX_BAR_IDX, VMXNET3_OFF_MSIX_TABLE,

                        &VAR_0->msix_bar,

                        VMXNET3_MSIX_BAR_IDX, VMXNET3_OFF_MSIX_PBA(VAR_0),

                        VMXNET3_MSIX_OFFSET(VAR_0));



    if (0 > VAR_1) {

        VMW_WRPRN("Failed to initialize MSI-X, error %d", VAR_1);

        VAR_0->msix_used = false;

    } else {

        if (!vmxnet3_use_msix_vectors(VAR_0, VMXNET3_MAX_INTRS)) {

            VMW_WRPRN("Failed to use MSI-X vectors, error %d", VAR_1);

            msix_uninit(d, &VAR_0->msix_bar, &VAR_0->msix_bar);

            VAR_0->msix_used = false;

        } else {

            VAR_0->msix_used = true;

        }

    }

    return VAR_0->msix_used;

}

FUNC_0(VMXNET3State *VAR_0)
{ PCIDevice *d = PCI_DEVICE(VAR_0); int VAR_1 = msix_init(d, VMXNET3_MAX_INTRS,
&VAR_0->msix_bar,
VMXNET3_MSIX_BAR_IDX, VMXNET3_OFF_MSIX_TABLE,
&VAR_0->msix_bar,
VMXNET3_MSIX_BAR_IDX, VMXNET3_OFF_MSIX_PBA(VAR_0),
VMXNET3_MSIX_OFFSET(VAR_0)); if (0 > VAR_1) { VMW_WRPRN("Failed to initialize MSI-X, error %d", VAR_1); VAR_0->msix_used = false; } else { if (!vmxnet3_use_msix_vectors(VAR_0, VMXNET3_MAX_INTRS)) { VMW_WRPRN("Failed to use MSI-X vectors, error %d", VAR_1); msix_uninit(d, &VAR_0->msix_bar, &VAR_0->msix_bar); VAR_0->msix_used = false; } else { VAR_0->msix_used = true; } } return VAR_0->msix_used; }