From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rusty Russell Subject: Re: virtio-net mq vq initialization Date: Mon, 15 Apr 2013 12:25:52 +0930 Message-ID: <87ppxw8ptz.fsf@rustcorp.com.au> 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> <20130414183556.GD7165@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Will Deacon , kvm@vger.kernel.org, penberg@kernel.org, marc.zyngier@arm.com To: "Michael S. Tsirkin" , Sasha Levin Return-path: Received: from ozlabs.org ([203.10.76.45]:56346 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753604Ab3DODuX convert rfc822-to-8bit (ORCPT ); Sun, 14 Apr 2013 23:50:23 -0400 In-Reply-To: <20130414183556.GD7165@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: "Michael S. Tsirkin" writes: > 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, initial= ization >> > is always done before DRIVER_OK. >>=20 >> Yeah, that's better, but we're going to need a spec change either wa= y since even >> adding the buffers is specifically stated to happen before DRIVER_OK= : >>=20 >> """ >> 6. The receive virtqueues should be filled with receive buffers. Th= is 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= get > any packets. > > OTOH VQ init bere DRIVER_OK is a generic virtio thing: DRIVER_OK mean= s > we can start sending interrupts and we expect driver to be ready to g= et > them. > > Let's solve the real problem with buffers, a couple of pages per VQ > shouldn't be an issue. Yeah, let's not populate the extra virtqueues until someone turns multiqueue on. I appended to the last paragraph under Setting Up Receive Buffers: If VIRTIO_NET_F_MQ is negotiated, each of receiveq0...receiveqN= that will be used should be populated with receive buffers Added:=20 before multiqueue is activated (See [sub:Automatic-receive-steer= ing]). Cheers, Rusty.