From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark McLoughlin Subject: Re: [Qemu-devel] qemu-kvm-0.11 regression, crashes on older guests with virtio network Date: Thu, 29 Oct 2009 12:16:06 +0000 Message-ID: <1256818566.10825.58.camel@blaa> References: <1256807803.10825.39.camel@blaa> <1256815818-sup-7805@xpc65.scottt> Reply-To: Mark McLoughlin Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: Dustin Kirkland , qemu-devel , kvm , Anthony Liguori To: Scott Tsai Return-path: Received: from mx1.redhat.com ([209.132.183.28]:41268 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750707AbZJ2MSH (ORCPT ); Thu, 29 Oct 2009 08:18:07 -0400 In-Reply-To: <1256815818-sup-7805@xpc65.scottt> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, 2009-10-29 at 20:00 +0800, Scott Tsai wrote: > Excerpts from Mark McLoughlin's message of Thu Oct 29 17:16:43 +0800 2009: > > Assuming this is something like the virtio-net in 2.6.26, there was no > > receivable buffers support so (as Scott points out) it must be that > > we've read a packet from the tap device which is >1514 bytes (or >1524 > > bytes with IFF_VNET_HDR) but the guest has not supplied buffers which > > are large enough to take it > > > One thing to check is that the tap device is being initialized by > > qemu-kvm using TUNSETOFFLOAD with either zero or TUN_F_CSUM - i.e. GSO > > should not be enabled, because the guest cannot handle large GSO packets > > > Another possibility is that the MTU on the bridge in the host is too > > large and that's what's causing the large packets to be sent > > Using Dustin's image, I see: > virtio_net_set_features(features: 0x00000930) Hmm - 0x930 doesn't seem right. Is that 930 decimal, 0x3a2 hex? > tap_set_offload(csum: 1, tso4: 1, tso6: 1, ecn: 1) > being called and get an mtu of 1500 on virbr0 using his birdge.sh script. > > virtio_net_receive2 was trying to transfer a 1534 byte packet (1524 'size' + 10 'virtio_net_hdr') > and the guest only had 1524 bytes of space in its input descriptors. Okay, that sounds like a bug in Dustin's version of the guest virtio-net driver - if it is only supplying 1524 byte buffers, it should not be saying it supports the VIRTIO_NET_F_GUEST_TSO4 feature Cheers, Mark. From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N3TxJ-0000D0-8W for qemu-devel@nongnu.org; Thu, 29 Oct 2009 08:18:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N3TxE-0000C1-Hj for qemu-devel@nongnu.org; Thu, 29 Oct 2009 08:18:16 -0400 Received: from [199.232.76.173] (port=57620 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N3TxE-0000Bx-Dk for qemu-devel@nongnu.org; Thu, 29 Oct 2009 08:18:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40189) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N3TxD-0007gd-QX for qemu-devel@nongnu.org; Thu, 29 Oct 2009 08:18:12 -0400 Subject: Re: [Qemu-devel] qemu-kvm-0.11 regression, crashes on older guests with virtio network From: Mark McLoughlin In-Reply-To: <1256815818-sup-7805@xpc65.scottt> References: <1256807803.10825.39.camel@blaa> <1256815818-sup-7805@xpc65.scottt> Content-Type: text/plain Date: Thu, 29 Oct 2009 12:16:06 +0000 Message-Id: <1256818566.10825.58.camel@blaa> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Reply-To: Mark McLoughlin List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Scott Tsai Cc: qemu-devel , kvm , Dustin Kirkland On Thu, 2009-10-29 at 20:00 +0800, Scott Tsai wrote: > Excerpts from Mark McLoughlin's message of Thu Oct 29 17:16:43 +0800 2009: > > Assuming this is something like the virtio-net in 2.6.26, there was no > > receivable buffers support so (as Scott points out) it must be that > > we've read a packet from the tap device which is >1514 bytes (or >1524 > > bytes with IFF_VNET_HDR) but the guest has not supplied buffers which > > are large enough to take it > > > One thing to check is that the tap device is being initialized by > > qemu-kvm using TUNSETOFFLOAD with either zero or TUN_F_CSUM - i.e. GSO > > should not be enabled, because the guest cannot handle large GSO packets > > > Another possibility is that the MTU on the bridge in the host is too > > large and that's what's causing the large packets to be sent > > Using Dustin's image, I see: > virtio_net_set_features(features: 0x00000930) Hmm - 0x930 doesn't seem right. Is that 930 decimal, 0x3a2 hex? > tap_set_offload(csum: 1, tso4: 1, tso6: 1, ecn: 1) > being called and get an mtu of 1500 on virbr0 using his birdge.sh script. > > virtio_net_receive2 was trying to transfer a 1534 byte packet (1524 'size' + 10 'virtio_net_hdr') > and the guest only had 1524 bytes of space in its input descriptors. Okay, that sounds like a bug in Dustin's version of the guest virtio-net driver - if it is only supplying 1524 byte buffers, it should not be saying it supports the VIRTIO_NET_F_GUEST_TSO4 feature Cheers, Mark.