qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: oliver.francke@filoo.de, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] rtl8139: flush queued packets when RxBufPtr is written
Date: Fri, 24 May 2013 16:34:24 +0200	[thread overview]
Message-ID: <20130524143424.GA15233@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <1369227018-27837-1-git-send-email-stefanha@redhat.com>

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 <oliver.francke@filoo.de>
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>  hw/net/rtl8139.c | 3 +++
>  1 file changed, 3 insertions(+)

Applied to my net tree:
https://github.com/stefanha/qemu/commits/net

Stefan

  parent reply	other threads:[~2013-05-24 14:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-22 12:50 [Qemu-devel] [PATCH] rtl8139: flush queued packets when RxBufPtr is written Stefan Hajnoczi
2013-05-22 12:53 ` Andreas Färber
2013-05-22 13:33   ` Stefan Hajnoczi
2013-05-24 14:34 ` Stefan Hajnoczi [this message]
2013-05-27  6:15 ` Peter Lieven
2013-05-27  8:32   ` Stefan Hajnoczi
2013-05-27 10:19     ` Peter Lieven
2013-05-27 14:07   ` Oliver Francke
2013-05-27 14:24     ` Peter Lieven
2013-05-27 15:29       ` Stefan Hajnoczi
2013-05-28  6:27         ` Peter Lieven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130524143424.GA15233@stefanha-thinkpad.redhat.com \
    --to=stefanha@gmail.com \
    --cc=oliver.francke@filoo.de \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).