From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: virtio-net mq vq initialization Date: Sun, 14 Apr 2013 21:35:56 +0300 Message-ID: <20130414183556.GD7165@redhat.com> References: <1365698186-27355-1-git-send-email-will.deacon@arm.com> <516716B8.9090408@oracle.com> <874nfc9e1r.fsf@rustcorp.com.au> <5169CCDD.4070205@oracle.com> <20130414100156.GB2548@redhat.com> <516AC85E.7070603@oracle.com> <20130414155342.GA7165@redhat.com> <516AD26E.8030205@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Rusty Russell , Will Deacon , kvm@vger.kernel.org, penberg@kernel.org, marc.zyngier@arm.com To: Sasha Levin Return-path: Received: from mx1.redhat.com ([209.132.183.28]:41610 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752208Ab3DNSgJ (ORCPT ); Sun, 14 Apr 2013 14:36:09 -0400 Content-Disposition: inline In-Reply-To: <516AD26E.8030205@oracle.com> Sender: kvm-owner@vger.kernel.org List-ID: On Sun, Apr 14, 2013 at 11:59:42AM -0400, Sasha Levin wrote: > On 04/14/2013 11:53 AM, Michael S. Tsirkin wrote: > >> >=20 > >> > Initializing them only when they're actually needed will do the = trick here. > > Not initializing, adding the buffers. In the current spec, initiali= zation > > is always done before DRIVER_OK. >=20 > Yeah, that's better, but we're going to need a spec change either way= since even > adding the buffers is specifically stated to happen before DRIVER_OK: >=20 > """ > 6. The receive virtqueues should be filled with receive buffers. Thi= s is described > in detail below in =E2=80=9CSetting Up Receive Buffers=E2=80=9D. > """ >=20 > Thanks, > Sasha Yes but that's a minor point, specific to virio-net. The main point was to ensure that VQs should have buffers before they g= et any packets. OTOH VQ init bere DRIVER_OK is a generic virtio thing: DRIVER_OK means we can start sending interrupts and we expect driver to be ready to get them. Let's solve the real problem with buffers, a couple of pages per VQ shouldn't be an issue. --=20 MST