From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:58650) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SbsjU-0006z1-WD for qemu-devel@nongnu.org; Tue, 05 Jun 2012 08:19:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SbsjQ-0000tS-6L for qemu-devel@nongnu.org; Tue, 05 Jun 2012 08:19:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:28570) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SbsjP-0000sL-Uz for qemu-devel@nongnu.org; Tue, 05 Jun 2012 08:19:28 -0400 Message-ID: <4FCDF944.5000507@redhat.com> Date: Tue, 05 Jun 2012 14:19:16 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: <1338858018-17189-1-git-send-email-mdroth@linux.vnet.ibm.com> <1338858018-17189-2-git-send-email-mdroth@linux.vnet.ibm.com> <4FCDDA12.4040907@redhat.com> In-Reply-To: <4FCDDA12.4040907@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 01/17] qidl: add QEMU IDL processor List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: aliguori@us.ibm.com, owasserm@redhat.com, quintela@redhat.com, qemu-devel@nongnu.org, Michael Roth , yamahata@valinux.co.jp, pbonzini@redhat.com, akong@redhat.com, afaerber@suse.de Hi, > > > Suggestion: add a _guest marker for ordinary state. Fail the build on > unmarked fields. This ensures that some thought is given to each field, > instead of having a default that may be correct most of the time, but > not always. > > Suggestion: add a mandatory position hint (_guest(7) or _pos(7)) that > generates ordering within the fields. This decouples the order of lines > in the struct from the protocol, so you can add state where it make > sense, or rearrange lines when they don't, and detect copy/paste errors. I wouldn't make the position mandatory. I expect the next generation migration wire protocol transmits the field names anyway, so the ordering will not matter any more, we need it for compatibility with today's format only. cheers, Gerd