From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36813) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZH84j-0007Wm-12 for qemu-devel@nongnu.org; Mon, 20 Jul 2015 06:13:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZH84f-0003Ek-Pk for qemu-devel@nongnu.org; Mon, 20 Jul 2015 06:13:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42588) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZH84f-0003Ec-K8 for qemu-devel@nongnu.org; Mon, 20 Jul 2015 06:13:29 -0400 Date: Mon, 20 Jul 2015 15:43:07 +0530 From: Amit Shah Message-ID: <20150720101307.GB10280@grmbl.mre> References: <1434450415-11339-1-git-send-email-dgilbert@redhat.com> <1434450415-11339-19-git-send-email-dgilbert@redhat.com> <87k2u4l3ri.fsf@neno.neno> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87k2u4l3ri.fsf@neno.neno> Subject: Re: [Qemu-devel] [PATCH v7 18/42] Add wrappers and handlers for sending/receiving the postcopy-ram migration messages. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juan Quintela Cc: aarcange@redhat.com, yamahata@private.email.ne.jp, liang.z.li@intel.com, "Dr. David Alan Gilbert (git)" , qemu-devel@nongnu.org, luis@cs.umu.se, pbonzini@redhat.com, david@gibson.dropbear.id.au On (Mon) 13 Jul 2015 [13:02:09], Juan Quintela wrote: > > + /* We're expecting a > > + * Version (0) > > + * a RAM ID string (length byte, name, 0 term) > > + * then at least 1 16 byte chunk > > + */ > > + if (len < 20) { 1 + > > 1+1+1+1+2*8 > > Humm, thinking about it, .... why are we not needing a length field of > number of entries? hm, yea. > > + error_report("CMD_POSTCOPY_RAM_DISCARD invalid length (%d)", len); > > + return -1; > > + } > > + > > + tmp = qemu_get_byte(mis->file); > > + if (tmp != 0) { > > I think that a constant telling POSTCOPY_VERSION0 or whatever? agreed. Amit