From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56913) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJNQv-0001Cj-4l for qemu-devel@nongnu.org; Thu, 05 Feb 2015 09:29:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YJNQq-0001Mx-5e for qemu-devel@nongnu.org; Thu, 05 Feb 2015 09:29:29 -0500 Received: from mx-v6.kamp.de ([2a02:248:0:51::16]:59345 helo=mx01.kamp.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJNQp-0001MX-R1 for qemu-devel@nongnu.org; Thu, 05 Feb 2015 09:29:24 -0500 Message-ID: <54D37E3D.7060208@kamp.de> Date: Thu, 05 Feb 2015 15:29:17 +0100 From: Peter Lieven MIME-Version: 1.0 References: <54CBF2B2.20703@kamp.de> <20150205140029.GF19277@stefanha-thinkpad.redhat.com> In-Reply-To: <20150205140029.GF19277@stefanha-thinkpad.redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] value of VIRTQUEUE_MAX_SIZE List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Kevin Wolf , "Michael S. Tsirkin" , ming.lei@canonical.com, "qemu-devel@nongnu.org" , Max Reitz , Stefan Hajnoczi Am 05.02.2015 um 15:00 schrieb Stefan Hajnoczi: > On Fri, Jan 30, 2015 at 10:08:02PM +0100, Peter Lieven wrote: >> Just wondering if VIRTQUEUE_MAX_SIZE in include/hw/virtio/virtio.h should not be equal to IOV_MAX instead of the hardcoded 1024? > The vring queue size is guest-visible to some extent (e.g. vring memory > layout). Tying it to a constant that is defined by the host operating > system could lead to problems (e.g. live migration between different > hosts). > > Anyway, all of the virtio devices have a queue size that is less than or > equal to VIRTQUEUE_MAX_SIZE (and there is an assertion to check this in > virtio_add_queue()). > > Guests are supposed to honor the vring queue size, although indirect > descriptors seem to be able to use up to VIRTQUEUE_MAX_SIZE according to > my understanding of QEMU's virtio.c code. > > Why would you like to use IOV_MAX? The idea was that IOV_MAX is the limit in case of at least virtio-blk. The host will not support more than IOV_MAX iovecs passed to a block request. Peter