From mboxrd@z Thu Jan 1 00:00:00 1970 From: ANNIE LI Subject: Re: Re: [PATCH 1/3] xen/granttable: Introducing grant table V2 stucture Date: Fri, 18 Nov 2011 11:08:43 +0800 Message-ID: <4EC5CC3B.4050808@oracle.com> References: <4EC3B62F.6080702@oracle.com> <1321451304-13559-1-git-send-email-annie.li@oracle.com> <1321526148.3664.263.camel@zakaz.uk.xensource.com> <4EC53119.7060307@oracle.com> <20111117162955.GA6758@phenom.dumpdata.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20111117162955.GA6758@phenom.dumpdata.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Konrad Rzeszutek Wilk Cc: "jeremy@goop.org" , "xen-devel@lists.xensource.com" , Ian Campbell , "kurt.hackel@oracle.com" , "linux-kernel@vger.kernel.org" , Paul Durrant List-Id: xen-devel@lists.xenproject.org On 2011-11-18 0:29, Konrad Rzeszutek Wilk wrote: >>> The more normal way to do this would be to make gnttab_interface a >>> pointer, define gnttab_v1_ops and do: >>> gnttab_interface =&gnttab_v1_ops; >>> or if the pointer overhead is significant remove that and just do a >>> struct assignment: >>> gnttab_interface = gnttab_v1_ops; >>> >> If using this way, we need two more public structures(gnttab_v1_ops >> and gnttab_v2_ops), and two more functions to initialize those two >> structures and then initialize the pointer gnttab_interface. It is >> more complicated, am i missing something? > Why two functions? I agree on the structures - but they need not to be > public (they can be static). > > For a good example look at how apic_physflat is done. Thanks, static structure is simpler and clean. I am very glad to change that.:-) Thanks Annie > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel