From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40481) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1briQn-000504-Ay for qemu-devel@nongnu.org; Wed, 05 Oct 2016 05:24:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1briQj-0003qg-NG for qemu-devel@nongnu.org; Wed, 05 Oct 2016 05:24:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53230) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1briQj-0003qV-Gq for qemu-devel@nongnu.org; Wed, 05 Oct 2016 05:24:01 -0400 From: Juan Quintela In-Reply-To: <1473390856-4502-3-git-send-email-eblake@redhat.com> (Eric Blake's message of "Thu, 8 Sep 2016 22:14:15 -0500") References: <1473390856-4502-1-git-send-email-eblake@redhat.com> <1473390856-4502-3-git-send-email-eblake@redhat.com> Reply-To: quintela@redhat.com Date: Wed, 05 Oct 2016 11:23:56 +0200 Message-ID: <87r37vtahf.fsf@emacs.mitica> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH 2/3] migrate: Share common MigrationParameters struct List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: qemu-devel@nongnu.org, ashijeetacharya@gmail.com, Luiz Capitulino , Amit Shah , Markus Armbruster Eric Blake wrote: > It is rather verbose, and slightly error-prone, to repeat > the same set of parameters for input (migrate-set-parameters) > as for output (query-migrate-parameters), where the only > difference is whether the members are optional. We can just > document that the optional members will always be present > on output, and then share a common struct between both > commands. The next patch can then reduce the amount of > code needed on input. > > Also, we made a mistake in qemu 2.7 of returning an empty > string during 'query-migrate-parameters' when there is no > TLS, rather than omitting TLS details entirely. Technically, > this change risks breaking any 2.7 client that is hard-coded > to expect the parameter's existence; on the other hand, clients > that are portable to 2.6 already must be prepared for those > members to not be present. > > And this gets rid of yet one more place where the QMP output > visitor is silently converting a NULL string into "" (which > is a hack I ultimately want to kill off). > > Signed-off-by: Eric Blake Reviewed-by: Juan Quintela