From: Anthony Liguori <aliguori@us.ibm.com>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Avi Kivity <avi@qumranet.com>, kvm-devel <kvm@vger.kernel.org>
Subject: Re: qemu: remove overzelaous virtio-net printf
Date: Tue, 24 Jun 2008 16:14:09 -0500 [thread overview]
Message-ID: <486163A1.2030405@us.ibm.com> (raw)
In-Reply-To: <20080624211200.GA16361@dmt.cnet>
Marcelo Tosatti wrote:
> 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.
>
Thanks for catching this!
> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
>
Acked-by: Anthony Liguori <aliguori@us.ibm.com>
Regards,
Anthony Liguori
> 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 prev parent reply other threads:[~2008-06-24 21:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-24 21:12 qemu: remove overzelaous virtio-net printf Marcelo Tosatti
2008-06-24 21:14 ` Anthony Liguori [this message]
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=486163A1.2030405@us.ibm.com \
--to=aliguori@us.ibm.com \
--cc=avi@qumranet.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@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