From: Marcelo Tosatti <mtosatti@redhat.com>
To: Anthony Liguori <aliguori@us.ibm.com>, Avi Kivity <avi@qumranet.com>
Cc: kvm-devel <kvm@vger.kernel.org>
Subject: qemu: remove overzelaous virtio-net printf
Date: Tue, 24 Jun 2008 18:12:00 -0300 [thread overview]
Message-ID: <20080624211200.GA16361@dmt.cnet> (raw)
When two virtio devices share an interrupt virtio-net floods the console
with "this should not happen" message.
As Anthony points this is not a fatal condition: its possible that the
guest consumed all ring elements between the can_receive check and
actual net_receive call.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
diff --git a/qemu/hw/virtio-net.c b/qemu/hw/virtio-net.c
index a61fdb1..2e57e5a 100644
--- a/qemu/hw/virtio-net.c
+++ b/qemu/hw/virtio-net.c
@@ -119,10 +119,8 @@ static void virtio_net_receive(void *opaque, const uint8_t *buf, int size)
struct virtio_net_hdr *hdr;
int offset, i;
- if (virtqueue_pop(n->rx_vq, &elem) == 0) {
- fprintf(stderr, "virtio_net: this should not happen\n");
+ if (virtqueue_pop(n->rx_vq, &elem) == 0)
return;
- }
if (elem.in_num < 1 || elem.in_sg[0].iov_len != sizeof(*hdr)) {
fprintf(stderr, "virtio-net header not in first element\n");
next reply other threads:[~2008-06-24 21:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-24 21:12 Marcelo Tosatti [this message]
2008-06-24 21:14 ` qemu: remove overzelaous virtio-net printf Anthony Liguori
2008-06-25 12:07 ` Avi Kivity
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=20080624211200.GA16361@dmt.cnet \
--to=mtosatti@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=avi@qumranet.com \
--cc=kvm@vger.kernel.org \
/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