From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O1l9q-0007pV-8P for qemu-devel@nongnu.org; Tue, 13 Apr 2010 14:48:22 -0400 Received: from [140.186.70.92] (port=58746 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O1l9o-0007pC-Qx for qemu-devel@nongnu.org; Tue, 13 Apr 2010 14:48:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O1l9l-0000bZ-MA for qemu-devel@nongnu.org; Tue, 13 Apr 2010 14:48:20 -0400 Received: from mail-pv0-f173.google.com ([74.125.83.173]:52226) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O1l9l-0000ax-H0 for qemu-devel@nongnu.org; Tue, 13 Apr 2010 14:48:17 -0400 Received: by pvd12 with SMTP id 12so2965229pvd.4 for ; Tue, 13 Apr 2010 11:48:15 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <201004122107.19425.paul@codesourcery.com> References: <4BC34D95.7050804@siemens.com> <201004122107.19425.paul@codesourcery.com> Date: Tue, 13 Apr 2010 21:48:14 +0300 Message-ID: Subject: Re: [Qemu-devel] How to lock-up your tap-based VM network From: Blue Swirl Content-Type: text/plain; charset=UTF-8 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: Jan Kiszka , qemu-devel@nongnu.org On 4/12/10, 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. Awesome, it looks like a longstanding bug with pcnet/lance has is fixed by this change! OpenBSD installer would hang when receiving packages, now it works! diff --git a/hw/pcnet.c b/hw/pcnet.c index 5e63eb5..a04ad09 100644 --- a/hw/pcnet.c +++ b/hw/pcnet.c @@ -1031,8 +1031,6 @@ static int pcnet_tdte_poll(PCNetState *s) int pcnet_can_receive(VLANClientState *nc) { PCNetState *s = DO_UPCAST(NICState, nc, nc)->opaque; - if (CSR_STOP(s) || CSR_SPND(s)) - return 0; return sizeof(s->buffer)-16; }