From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52263) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V59rc-00084C-4b for qemu-devel@nongnu.org; Fri, 02 Aug 2013 03:33:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V59rW-0000HN-4B for qemu-devel@nongnu.org; Fri, 02 Aug 2013 03:33:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43607) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V59rV-0000H1-RU for qemu-devel@nongnu.org; Fri, 02 Aug 2013 03:33:21 -0400 Date: Fri, 2 Aug 2013 09:33:19 +0200 From: Stefan Hajnoczi Message-ID: <20130802073319.GB20399@stefanha-thinkpad.redhat.com> References: <51FA97CA.7050905@siemens.com> <51FA99BD.2040502@siemens.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <51FA99BD.2040502@siemens.com> Subject: Re: [Qemu-devel] net/tap.c: Possibly a way to stall tap input List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: qemu-devel On Thu, Aug 01, 2013 at 07:24:13PM +0200, Jan Kiszka wrote: > On 2013-08-01 19:15, Jan Kiszka wrote: > > Hi all, > > > > I'm tracking down a nasty stall of tap input over a custom 1.3.x QEMU > > version. Under certain load, our tap backend stops reading from the char > > device, and that even if we reset the guest. The frontend device > > (pcnet32) is able to receive (can_receive would return > 0), but the > ^^^^^^^ > Yes, the pcnet lacks qemu_flush_queued_packets, like certain other NIC > models already have. We added that to pcnet_init and pcnet_start (patch > will follow), but that didn't make a difference, likely due to what I > described below. Yes, you need to add qemu_flush_queued_packets() where the guest enables RX or marks RX descriptors free (usually by writing to a hardware register to update the RX ring index). Please also confirm that you are using -netdev tap -device pcnet32 instead of the legacy -net syntax. The reason I'm asking is because I remember the same issue with net/hub.c, which gets in the way if you use legacy syntax (see 199ee608). Hope this helps, Stefan