From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Dunlap Subject: Re: [PATCH V8 3/7] libxl: add pvusb API Date: Mon, 23 Nov 2015 17:24:33 +0000 Message-ID: <56534BD1.10101@citrix.com> References: <1445418510-19614-1-git-send-email-cyliu@suse.com> <1445418510-19614-4-git-send-email-cyliu@suse.com> <20151113111921.GA16965@aepfle.de> <5649A988.7010609@citrix.com> <564C81CB0200006600084926@relay2.provo.novell.com> <20151118094410.GB21970@aepfle.de> <564D97610200006600085301@relay2.provo.novell.com> <564DDBA402000066000853B5@relay2.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <564DDBA402000066000853B5@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 , Olaf Hering , george.dunlap@eu.citrix.com Cc: Juergen Gross , wei.liu2@citrix.com, ian.campbell@citrix.com, Ian.Jackson@eu.citrix.com, xen-devel@lists.xen.org, Jim Fehlig , Simon Cao List-Id: xen-devel@lists.xenproject.org On 19/11/15 06:24, Chun Yan Liu wrote: > > >>>> On 11/19/2015 at 09:33 AM, in message > <564D97610200006600085301@relay2.provo.novell.com>, "Chun Yan Liu" > wrote: > >> >>>>> On 11/18/2015 at 05:44 PM, in message <20151118094410.GB21970@aepfle.de>, Olaf >> Hering wrote: >>> On Tue, Nov 17, Chun Yan Liu wrote: >>> >>>> I think libxl_device_usb doesn't need to be changed into >>> libxl_device_usbdev? > > George & Olaf, > > About the naming, can we get to a decision? > e.g. > * usb controller and everything related, using "usbctrl" > * usb device and everything related, using "usbdev" (?) > Currently in pvusb, almost everywhere referring to a usb device, we use "usb". > Like: libxl_device_usb, libxl_device_usb_add/remove, etc. > > If we decide, I can update all together. So I finally went back and spent some time mulling over the e-mail thread we had before about designing the interface. Just as a reminder, SCSI has a topology of host / bus / target / LUN; USB has a topology controller / hub[bus] / [port]device / interface. At the moment in USB we're not dealing with virtual hubs, so each controller will have a single bus. Additionally, we are only passing through and/or creating devices; a physical device with more than one interface will have all of its interfaces passed through transparently. So we're only effectively exposing two levels in our API. In the previous discussion, for pvscsi, Juergen argued it makes sense to be able to assign LUNs from the same physical target to different virtual targets; and it also makes sense to be able to assign newly-created physical LUNs to existing virtual targets. (Please people correct me if I've misunderstood something anywhere.) So for SCSI, there may be three levels at which people want to be able to do things. Given, that, I wonder if it would make sense to name the different "levels" for these multi-level devices after the name for that level in their respective specificaitons. I.e., libxl_device_usbctrl, libxl_device_usbdev, libxl_device_scsihost, libxl_device_scsitgt, libxl_device_scsilun or something like that. In which case, "usbdev" would be indicated (since it's the "device" we're talking about). Thoughts? -George