From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:34724) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UftRT-0000d3-T0 for qemu-devel@nongnu.org; Fri, 24 May 2013 10:58:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UftRS-0004OG-9N for qemu-devel@nongnu.org; Fri, 24 May 2013 10:58:03 -0400 Received: from mail-wg0-x22f.google.com ([2a00:1450:400c:c00::22f]:52652) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UftB4-0006NR-89 for qemu-devel@nongnu.org; Fri, 24 May 2013 10:41:06 -0400 Received: by mail-wg0-f47.google.com with SMTP id e11so2732918wgh.26 for ; Fri, 24 May 2013 07:41:05 -0700 (PDT) Date: Fri, 24 May 2013 16:34:24 +0200 From: Stefan Hajnoczi Message-ID: <20130524143424.GA15233@stefanha-thinkpad.redhat.com> References: <1369227018-27837-1-git-send-email-stefanha@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1369227018-27837-1-git-send-email-stefanha@redhat.com> Subject: Re: [Qemu-devel] [PATCH] rtl8139: flush queued packets when RxBufPtr is written List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: oliver.francke@filoo.de, qemu-devel@nongnu.org On Wed, May 22, 2013 at 02:50:18PM +0200, Stefan Hajnoczi wrote: > Net queues support efficient "receive disable". For example, tap's file > descriptor will not be polled while its peer has receive disabled. This > saves CPU cycles for needlessly copying and then dropping packets which > the peer cannot receive. > > rtl8139 is missing the qemu_flush_queued_packets() call that wakes the > queue up when receive becomes possible again. > > As a result, the Windows 7 guest driver reaches a state where the > rtl8139 cannot receive packets. The driver has actually refilled the > receive buffer but we never resume reception. > > The bug can be reproduced by running a large FTP 'get' inside a Windows > 7 guest: > > $ qemu -netdev tap,id=tap0,... > -device rtl8139,netdev=tap0 > > The Linux guest driver does not trigger the bug, probably due to a > different buffer management strategy. > > Reported-by: Oliver Francke > Signed-off-by: Stefan Hajnoczi > --- > hw/net/rtl8139.c | 3 +++ > 1 file changed, 3 insertions(+) Applied to my net tree: https://github.com/stefanha/qemu/commits/net Stefan