static void vhost_net_stop_one(struct vhost_net *net,

                               VirtIODevice *dev)

{

    struct vhost_vring_file file = { .fd = -1 };



    if (!net->dev.started) {

        return;

    }



    if (net->nc->info->type == NET_CLIENT_OPTIONS_KIND_TAP) {

        for (file.index = 0; file.index < net->dev.nvqs; ++file.index) {

            const VhostOps *vhost_ops = net->dev.vhost_ops;

            int r = vhost_ops->vhost_call(&net->dev, VHOST_NET_SET_BACKEND,

                                          &file);

            assert(r >= 0);

        }

    }

    if (net->nc->info->poll) {

        net->nc->info->poll(net->nc, true);

    }

    vhost_dev_stop(&net->dev, dev);

    vhost_dev_disable_notifiers(&net->dev, dev);

}

static void vhost_net_stop_one(struct vhost_net *net,

                               VirtIODevice *dev)

{

    struct vhost_vring_file file = { .fd = -1 };



    if (!net->dev.started) {

        return;

    }



    if (net->nc->info->type == NET_CLIENT_OPTIONS_KIND_TAP) {

        for (file.index = 0; file.index < net->dev.nvqs; ++file.index) {

            const VhostOps *vhost_ops = net->dev.vhost_ops;

            int r = vhost_ops->vhost_call(&net->dev, VHOST_NET_SET_BACKEND,

                                          &file);

            assert(r >= 0);

        }

    }

    if (net->nc->info->poll) {

        net->nc->info->poll(net->nc, true);

    }

    vhost_dev_stop(&net->dev, dev);

    vhost_dev_disable_notifiers(&net->dev, dev);

}

static void FUNC_0(struct vhost_net *VAR_0,

                               VirtIODevice *VAR_1)

{

    struct vhost_vring_file VAR_2 = { .fd = -1 };



    if (!VAR_0->VAR_1.started) {

        return;

    }



    if (VAR_0->nc->info->type == NET_CLIENT_OPTIONS_KIND_TAP) {

        for (VAR_2.index = 0; VAR_2.index < VAR_0->VAR_1.nvqs; ++VAR_2.index) {

            const VhostOps *vhost_ops = VAR_0->VAR_1.vhost_ops;

            int r = vhost_ops->vhost_call(&VAR_0->VAR_1, VHOST_NET_SET_BACKEND,

                                          &VAR_2);

            assert(r >= 0);

        }

    }

    if (VAR_0->nc->info->poll) {

        VAR_0->nc->info->poll(VAR_0->nc, true);

    }

    vhost_dev_stop(&VAR_0->VAR_1, VAR_1);

    vhost_dev_disable_notifiers(&VAR_0->VAR_1, VAR_1);

}

static void FUNC_0(struct vhost_net *VAR_0,
VirtIODevice *VAR_1)
{ struct vhost_vring_file VAR_2 = { .fd = -1 }; if (!VAR_0->VAR_1.started) { return; } if (VAR_0->nc->info->type == NET_CLIENT_OPTIONS_KIND_TAP) { for (VAR_2.index = 0; VAR_2.index < VAR_0->VAR_1.nvqs; ++VAR_2.index) { const VhostOps *vhost_ops = VAR_0->VAR_1.vhost_ops; int r = vhost_ops->vhost_call(&VAR_0->VAR_1, VHOST_NET_SET_BACKEND,
&VAR_2); assert(r >= 0); } } if (VAR_0->nc->info->poll) { VAR_0->nc->info->poll(VAR_0->nc, true); } vhost_dev_stop(&VAR_0->VAR_1, VAR_1); vhost_dev_disable_notifiers(&VAR_0->VAR_1, VAR_1); }