Message ID | 1242300155.17366.20.camel@blaa |
---|---|
State | Not Applicable, archived |
Delegated to: | David Miller |
Headers | show |
Mark McLoughlin wrote: > That sounds like a bug in qemu's mergeable receive buffers > implementation - the host is running out of buffers for the packet, even > though it supposedly has already checked that there is enough buffers > available on the ring. > > Hmm, I think I see the bug - does the patch below work? Please try > several mtu values around the 9k mark to be sure No, it doesn't help, same crash. Or. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/hw/virtio-net.c b/hw/virtio-net.c index f125edc..3ffd2c0 100644 --- a/hw/virtio-net.c +++ b/hw/virtio-net.c @@ -438,16 +438,16 @@ static void virtio_net_receive(void *opaque, const uint8_t *buf, int size) struct virtio_net_hdr_mrg_rxbuf *mhdr = NULL; size_t hdr_len, offset, i; - if (!do_virtio_net_can_receive(n, size)) + /* hdr_len refers to the header we supply to the guest */ + hdr_len = n->mergeable_rx_bufs ? + sizeof(struct virtio_net_hdr_mrg_rxbuf) : sizeof(struct virtio_net_hdr); + + if (!do_virtio_net_can_receive(n, size + hdr_len)) return; if (!receive_filter(n, buf, size)) return; - /* hdr_len refers to the header we supply to the guest */ - hdr_len = n->mergeable_rx_bufs ? - sizeof(struct virtio_net_hdr_mrg_rxbuf) : sizeof(struct virtio_net_hdr); - offset = i = 0; while (offset < size) {