Re: qemu: remove overzelaous virtio-net printf

2008-06-25 Thread Avi Kivity

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

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: qemu: remove overzelaous virtio-net printf

2008-06-24 Thread Anthony Liguori

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 <[EMAIL PROTECTED]>
  


Acked-by: Anthony Liguori <[EMAIL PROTECTED]>

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


--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


qemu: remove overzelaous virtio-net printf

2008-06-24 Thread Marcelo Tosatti

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 <[EMAIL PROTECTED]>

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");
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html