From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hannes Reinecke Subject: Re: [PATCH 1/3] iov: Add 'offset' parameter to iov_to_buf() Date: Fri, 01 Jul 2011 10:07:27 +0200 Message-ID: <4E0D803F.5060605@suse.de> References: <1309506172-17762-1-git-send-email-hare@suse.de> <1309506172-17762-2-git-send-email-hare@suse.de> <0709C61D-84CB-4CD2-803D-93CE3AD66888@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: qemu-devel@nongnu.org, Paolo Bonzini , Stefan Haynoczi , kvm@vger.kernel.org To: Alexander Graf Return-path: Received: from cantor2.suse.de ([195.135.220.15]:42486 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755139Ab1GAIH2 (ORCPT ); Fri, 1 Jul 2011 04:07:28 -0400 In-Reply-To: <0709C61D-84CB-4CD2-803D-93CE3AD66888@suse.de> Sender: kvm-owner@vger.kernel.org List-ID: On 07/01/2011 10:02 AM, Alexander Graf wrote: > > On 01.07.2011, at 09:42, Hannes Reinecke wrote: > >> Occasionally, the buffer needs to be placed at a offset within >> the iovec when copying the buffer to the iovec. > > So this is a buffer into the iovec, right? Wouldn't it make sense > to also modify iov_to_buf respectively then, so the API stays=20 similar? Ahem. That's exactly what the patch does. Except from the mixed-up=20 subject. iov_to_buff() has an offset parameter, iov_from_buf() has not. =46or no obvious reasons. > Also, it'd be nice to give the parameter a more obvious name, so pote= ntial > users can easily recognize what it offsets. > Yes, that sounds reasonable. What about 'iov_off' ? (And possibly rename 'iovcnt' to 'iov_cnt' for consistency ?) Cheers, Hannes --=20 Dr. Hannes Reinecke zSeries & Storage hare@suse.de +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg GF: J. Hawn, J. Guild, F. Imend=F6rffer, HRB 16746 (AG N=FCrnberg) From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:56169) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QcYl9-0003K1-3l for qemu-devel@nongnu.org; Fri, 01 Jul 2011 04:07:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QcYl7-00086n-DW for qemu-devel@nongnu.org; Fri, 01 Jul 2011 04:07:30 -0400 Received: from cantor2.suse.de ([195.135.220.15]:42484 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QcYl7-00086e-15 for qemu-devel@nongnu.org; Fri, 01 Jul 2011 04:07:29 -0400 Message-ID: <4E0D803F.5060605@suse.de> Date: Fri, 01 Jul 2011 10:07:27 +0200 From: Hannes Reinecke MIME-Version: 1.0 References: <1309506172-17762-1-git-send-email-hare@suse.de> <1309506172-17762-2-git-send-email-hare@suse.de> <0709C61D-84CB-4CD2-803D-93CE3AD66888@suse.de> In-Reply-To: <0709C61D-84CB-4CD2-803D-93CE3AD66888@suse.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 1/3] iov: Add 'offset' parameter to iov_to_buf() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: Paolo Bonzini , qemu-devel@nongnu.org, kvm@vger.kernel.org, Stefan Haynoczi On 07/01/2011 10:02 AM, Alexander Graf wrote: > > On 01.07.2011, at 09:42, Hannes Reinecke wrote: > >> Occasionally, the buffer needs to be placed at a offset within >> the iovec when copying the buffer to the iovec. > > So this is a buffer into the iovec, right? Wouldn't it make sense > to also modify iov_to_buf respectively then, so the API stays=20 similar? Ahem. That's exactly what the patch does. Except from the mixed-up=20 subject. iov_to_buff() has an offset parameter, iov_from_buf() has not. For no obvious reasons. > Also, it'd be nice to give the parameter a more obvious name, so potent= ial > users can easily recognize what it offsets. > Yes, that sounds reasonable. What about 'iov_off' ? (And possibly rename 'iovcnt' to 'iov_cnt' for consistency ?) Cheers, Hannes --=20 Dr. Hannes Reinecke zSeries & Storage hare@suse.de +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg GF: J. Hawn, J. Guild, F. Imend=F6rffer, HRB 16746 (AG N=FCrnberg)