qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 7/7] vhost-user: call VHOST_USER_SET_VRING_ENABLE synchronous


From: Michael S. Tsirkin
Subject: Re: [PATCH 7/7] vhost-user: call VHOST_USER_SET_VRING_ENABLE synchronously
Date: Tue, 3 Oct 2023 08:26:58 -0400

On Mon, Oct 02, 2023 at 05:13:26PM -0400, Stefan Hajnoczi wrote:
> One more question:
> 
> Why is the disabled state not needed by regular (non-vhost) virtio-net 
> devices?

Tap does the same - it purges queued packets:

int tap_disable(NetClientState *nc)
{   
    TAPState *s = DO_UPCAST(TAPState, nc, nc);
    int ret;

    if (s->enabled == 0) {
        return 0;
    } else {
        ret = tap_fd_disable(s->fd);
        if (ret == 0) {
            qemu_purge_queued_packets(nc);
            s->enabled = false;
            tap_update_fd_handler(s);
        }
        return ret;
    }       
}       

what about non tap backends? I suspect they just aren't
used widely with multiqueue so no one noticed.

-- 
MST




reply via email to

[Prev in Thread] Current Thread [Next in Thread]