From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NcHcJ-0001JZ-Sw for qemu-devel@nongnu.org; Tue, 02 Feb 2010 07:12:27 -0500 Received: from [199.232.76.173] (port=36263 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NcHcI-0001J5-O7 for qemu-devel@nongnu.org; Tue, 02 Feb 2010 07:12:26 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NcHcG-0003Qh-Sb for qemu-devel@nongnu.org; Tue, 02 Feb 2010 07:12:26 -0500 Received: from mx1.redhat.com ([209.132.183.28]:11230) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NcHcG-0003Q5-Bt for qemu-devel@nongnu.org; Tue, 02 Feb 2010 07:12:24 -0500 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o12CCNPL012873 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 2 Feb 2010 07:12:23 -0500 Date: Tue, 2 Feb 2010 10:12:15 -0200 From: Luiz Capitulino Subject: Re: [Qemu-devel] [PATCH 0/8]: QMP feature negotiation support Message-ID: <20100202101215.420001dc@doriath> In-Reply-To: References: <1264686180-29845-1-git-send-email-lcapitulino@redhat.com> <20100201162234.0f144f3f@doriath> <20100201175004.5b1b5cc8@doriath> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: qemu-devel@nongnu.org On Tue, 02 Feb 2010 09:03:32 +0100 Markus Armbruster wrote: > Luiz Capitulino writes: > > > On Mon, 01 Feb 2010 20:37:41 +0100 > > Markus Armbruster wrote: > > > >> Luiz Capitulino writes: > >> > >> > On Mon, 01 Feb 2010 18:08:27 +0100 > >> > Markus Armbruster wrote: > [...] > >> >> I don't doubt your design does the job. I just think it's overly > >> >> general. I had something far more stupid in mind: > >> >> > >> >> client connects > >> >> server -> client: version & capability offer (one message) > >> >> again: > >> >> client -> server: capability selection (one message) > >> >> server -> client: either okay or error (one message) > >> >> if error goto again > >> >> connection is now ready for commands > >> >> > >> >> No modes. The distinct lack of generality is a design feature. > >> > > >> > I like the simplicity and if we were allowed to change later I'd > >> > do it. > >> > > >> > The question is if we will ever want features to be _configured_ > >> > before the protocol is operational. In this case we'd need to > >> > pass feature arguments through the capability selection command, > >> > which will get ugly and hard to use/understand. > >> > > >> > Mode oriented support doesn't have this limitation. Maybe we > >> > won't never really use it, but it's safer. > >> > >> Capability selection could be done as an object where the name/value > >> pairs are capability/argument. If you need multiple arguments for a > >> capability, make the capability's value an object. > > > > That's exactly what seems complicated to me, because besides performing > > two functions (enable/configure) some feature setup could require > > more commands to be done in a clear way. > > What do you mean by "feature setup"? And how does it go beyond setting > a bunch of parameters? > > > The async messages setup in the previous series was an example of this. > > I don't remember the details. Could you summarize? Not the best example since we agreed async messages setup could be done in operational mode, but in case other features will require it: 1. The async message feature _and_ each async message were disabled by default 2. You could enable async message feature with capability_enable 3. Then, each message should be enabled separately with async_message_enable The use case here is: a feature requires to be configured before the protocol is operational. It's possible to do this with a command like feature, but it'll get bloated over time.