qemu: remove overzelaous virtio-net printf
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.
qemu/hw/virtio-net.c +1 -3
@@ -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" );
Anthony Liguori
Acked-byQuoted 7 lines · 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_receivecheck and actualnet_receivecall.
Thanks for catching this!
Quoted 2 lines
Signed-off-by Marcelo Tosatti <[email protected]>
Regards,
Anthony Liguori
Quoted 17 lines
qemu/hw/virtio-net.c +1
-3@@ -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" );
Avi Kivity
AppliedQuoted 8 lines · 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_receivecheck and actualnet_receivecall.
Applied, thanks.
Signature · 1 line
error compiling committee.c: too many arguments to function