[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] How to lock-up your tap-based VM network
From: |
Paul Brook |
Subject: |
Re: [Qemu-devel] How to lock-up your tap-based VM network |
Date: |
Tue, 13 Apr 2010 14:03:19 +0100 |
User-agent: |
KMail/1.12.4 (Linux/2.6.33-2-amd64; KDE/4.3.4; x86_64; ; ) |
> Paul Brook wrote:
> >> A major reason for this deadlock could likely be removed by shutting
> >> down the tap (if peered) or dropping packets in user space (in case of
> >> vlan) when a NIC is stopped or otherwise shut down. Currently most (if
> >> not all) NIC models seem to signal both "queue full" and "RX disabled"
> >> via !can_receive().
> >
> > No. A disabled device should return true from can_recieve, then discard
> > the packets in its receive callback. Failure to do so is a bug in the
> > device. It looks like the virtio-net device may be buggy.
>
> That's not a virtio-only issue. In fact, we ran into this over pcnet,
> and a quick check of other popular PCI NIC models (except for rtl8139)
> revealed the same picture: They only report can_receive if their
> receiver unit is up and ready (some also include the queue state, but
> that's an "add-on").
If so these are also buggy.
> I think it's clear why: "can_receive" strongly suggests that a suspended
> receiver should make the model return false. If we want to keep this
> handler, it should be refactored to something like "queue_full".
I don't see a need to refactor anything. You just need to fix the devices
that incorrectly return false when their RX engine is disabled.
Paul
Re: [Qemu-devel] How to lock-up your tap-based VM network, Blue Swirl, 2010/04/13