From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 5/5] kvm: qemu: Improve virtio_net recv buffer allocation scheme Date: Tue, 14 Oct 2008 17:47:10 +0200 Message-ID: <48F4BEFE.7090800@redhat.com> References: <> <1223494513-18826-1-git-send-email-markmc@redhat.com> <1223494513-18826-2-git-send-email-markmc@redhat.com> <1223494513-18826-3-git-send-email-markmc@redhat.com> <1223494513-18826-4-git-send-email-markmc@redhat.com> <1223494513-18826-5-git-send-email-markmc@redhat.com> <48F1CABA.8010301@redhat.com> <1223991840.11098.29.camel@blaa> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, Rusty Russell , Herbert Xu , Anthony Liguori To: Mark McLoughlin Return-path: Received: from mx2.redhat.com ([66.187.237.31]:44869 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751578AbYJNPr3 (ORCPT ); Tue, 14 Oct 2008 11:47:29 -0400 In-Reply-To: <1223991840.11098.29.camel@blaa> Sender: kvm-owner@vger.kernel.org List-ID: Mark McLoughlin wrote: > Yeah, it's far from pretty. The current ABI basically says "you must > supply >64k receive buffers" whereas this new ABI says "you must supply > at least 18 >4k receive buffers". > > We could think about having the host expose the maximum rx packet size > to the guest (and handle migrating to a host with a different max), but > TBH I don't think it would be worth much until we have the prospect of > running on a host with a larger maximum rx packet size. > > Requiring the guest to fill the ring with ~64k of buffers isn't onerous; > the Linux guest impl currently re-fills the ring up to the max (e.g. 256 > x 4k) > > We should document the ABI somewhere. All those hidden rules will make implementing non-Linux drivers difficult, as well as maintaining backwards compatibility. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic.