public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* qemu: remove overzelaous virtio-net printf
@ 2008-06-24 21:12 Marcelo Tosatti
  2008-06-24 21:14 ` Anthony Liguori
  2008-06-25 12:07 ` Avi Kivity
  0 siblings, 2 replies; 3+ messages in thread
From: Marcelo Tosatti @ 2008-06-24 21:12 UTC (permalink / raw)
  To: Anthony Liguori, Avi Kivity; +Cc: kvm-devel


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");

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: qemu: remove overzelaous virtio-net printf
  2008-06-24 21:12 qemu: remove overzelaous virtio-net printf Marcelo Tosatti
@ 2008-06-24 21:14 ` Anthony Liguori
  2008-06-25 12:07 ` Avi Kivity
  1 sibling, 0 replies; 3+ messages in thread
From: Anthony Liguori @ 2008-06-24 21:14 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: Avi Kivity, kvm-devel

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");
>   


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: qemu: remove overzelaous virtio-net printf
  2008-06-24 21:12 qemu: remove overzelaous virtio-net printf Marcelo Tosatti
  2008-06-24 21:14 ` Anthony Liguori
@ 2008-06-25 12:07 ` Avi Kivity
  1 sibling, 0 replies; 3+ messages in thread
From: Avi Kivity @ 2008-06-25 12:07 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: Anthony Liguori, kvm-devel

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.
>
>   

Applied, thanks.

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-06-25 12:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-24 21:12 qemu: remove overzelaous virtio-net printf Marcelo Tosatti
2008-06-24 21:14 ` Anthony Liguori
2008-06-25 12:07 ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox