From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sasha Levin Subject: Re: [PATCH] kvm tools: virtio-net mergable rx buffers Date: Tue, 23 Apr 2013 22:51:00 -0400 Message-ID: <51774894.7080008@oracle.com> References: <1366677147-2150-1-git-send-email-sasha.levin@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Pekka Enberg , will.deacon@arm.com, marc.zyngier@arm.com, KVM , asias@redhat.com, jasowang@redhat.com, rusty@rustcorp.com.au, "Michael S. Tsirkin" To: Eric Northup Return-path: Received: from aserp1040.oracle.com ([141.146.126.69]:18167 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756223Ab3DXCvr (ORCPT ); Tue, 23 Apr 2013 22:51:47 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 04/23/2013 12:35 PM, Eric Northup wrote: > Do you care about guests with drivers that don't negotiate > VIRTIO_NET_F_MRG_RXBUF? We usually try to keep backward compatibility, but in this case mergable RX buffers are about 5 years old now, so it's safe to assume they'll be running in any guest. Unless there is a specific reason to allow working without them I'd rather keep the code simple in this case. > On Mon, Apr 22, 2013 at 5:32 PM, Sasha Levin wrote: >> + copied = memcpy_toiovecend(iov, in, buffer, len); >> + len -= copied; >> + hdr->num_buffers++; >> + virt_queue__set_used_elem(vq, head, copied); >> + if (len == 0) >> + break; >> + head = virt_queue__get_iov(vq, iov, &out, &in, kvm); > > Need to check that virt_queue__available(vq) first? Yup. I wonder why it didn't blow up running 'ping -f' with a huge packet size. Thanks, Sasha