From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Dunlap Subject: Re: [PATCH V5 3/7] libxl: add pvusb API Date: Mon, 10 Aug 2015 11:08:33 +0100 Message-ID: <55C87821.10504@citrix.com> References: <1435226838-3067-1-git-send-email-cyliu@suse.com> <1435226838-3067-4-git-send-email-cyliu@suse.com> <559B9AFD0200006600046992@relay2.provo.novell.com> <559BA270.4000006@eu.citrix.com> <55C340F90200006600055945@relay2.provo.novell.com> <55C39796.8000500@citrix.com> <55C488EA020000660005630B@relay2.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <55C488EA020000660005630B@relay2.provo.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Chun Yan Liu , George Dunlap , xen-devel@lists.xen.org Cc: Juergen Gross , wei.liu2@citrix.com, ian.campbell@citrix.com, Ian.Jackson@eu.citrix.com, Jim Fehlig , Simon Cao List-Id: xen-devel@lists.xenproject.org On 08/07/2015 03:31 AM, Chun Yan Liu wrote: >>>>>> + ("devid", libxl_devid), >>>>>> + ("version", integer), >>>>>> + ("ports", integer), >>>>>> + ("backend_domid", libxl_domid), >>>>>> + ("backend_domname", string), >>>>>> + ]) >>>>>> + >>>>>> +libxl_device_usb = Struct("device_usb", [ >>>>>> + ("ctrl", libxl_devid), >>>>>> + ("port", integer), >>>>>> + ("hostbus", integer), >>>>>> + ("hostaddr", integer), >>>>>> + ]) >> >> I think we do want to plan for the future here by doing something like this: >> >> libxl_device_usb = Struct("device_usb", [ >> ("ctrl", libxl_devid), >> ("port", integer), >> ("u", KeyedUnion(None, libxl_device_usb_type, "devtype", >> [("hostdev", Struct(None, [ >> ("hostbus", integer), >> ("hostaddr", integer) ])) >> ])) >> ]) >> > > Yes, that's the future look. For pvusb, currenlty with kernel pvusb driver, the > devtype is not really necessary. But I can add 'devtype' if it is preferred now. Yes, I think as much as possible we want the interface which is actually checked in to be forward-compatible. Thanks! -George