From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42886) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlQhX-000530-KN for qemu-devel@nongnu.org; Tue, 26 Nov 2013 17:01:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VlQhR-0008EJ-Lj for qemu-devel@nongnu.org; Tue, 26 Nov 2013 17:01:47 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51213) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlQhR-0008Dv-DM for qemu-devel@nongnu.org; Tue, 26 Nov 2013 17:01:41 -0500 Message-ID: <5294ACC8.4090900@redhat.com> Date: Tue, 26 Nov 2013 15:14:32 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1385025100-3191-1-git-send-email-lilei@linux.vnet.ibm.com> <1385025100-3191-9-git-send-email-lilei@linux.vnet.ibm.com> <5294867E.1060203@redhat.com> <5294A99B.3000000@linux.vnet.ibm.com> In-Reply-To: <5294A99B.3000000@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 08/17] add unix_msgfd_lookup() to callback get_buffer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Lei Li Cc: aarcange@redhat.com, quintela@redhat.com, qemu-devel@nongnu.org, mrhines@linux.vnet.ibm.com, mdroth@linux.vnet.ibm.com, aliguori@amazon.com, lagarcia@br.ibm.com, rcj@linux.vnet.ibm.com Il 26/11/2013 15:00, Lei Li ha scritto: >>> >> I think adding a byte in the middle of the stream is not reliable. >> >> Rather, you should transmit the socket always at the same place, for >> example in the first call of qemu_local_save_ram, after it has written >> the 64-bit field. > > I guess 'transmit the socket' you mean transmit the fd? Yes. > Sorry that I am quite understand your suggestion here.. Do you > mean that send_pipefd in the first call of qemu_local_save_ram > after it has written the 64-bit field? In this way, get rid of > qemu_local_send_pipefd? Yes. This way you know exactly where to "eat" the byte that's written with sendmsg. Paolo > Currently, the fd control message is sent at the end of the stream > in ram_save_setup stage, followed by the ram page. The control > message of fd is always at the same place.