Re: [PATCH v7 1/3] usbip: exporting devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 10, 2016 at 10:45:01AM +0900, Nobuo Iwata wrote:
> USB/IP supports a function to import USB devices from application-side 
> machine by attach command.
> The usage is as following.
> dev:# (Physically attach your USB device.)
> dev:# insmod usbip-core.ko and usbip-host.ko
> dev:# usbipd -D
> // Start usbip daemon.
> dev:# usbip list -l
> // List local USB devices and their busid.
> dev:# usbip bind --busid <busid>
> // Make a device exportable to other hosts.
> 
> app:# insmod usbip-core.ko and vhci-hcd.ko
> app:# usbip list --remote <host>
> // List importable USB devices from the <host>.
> app:# usbip attach --remote <host> --busid <busid>
> // Import a device
> 
> By attach command, connection will be established from application-side 
> to device-side.
> 
> This patch introduces a function to export devices form device-side 
> machine to application-side machine.
> The usage is as following.
> app:# insmod usbip-core.ko and vhci-hcd.ko
> app:# usbipa -D
> // Start usbip daemon.
> 
> dev:# (Physically attach your USB device.)
> dev:# insmod usbip-core.ko and usbip-host.ko
> dev:# usbip list -l
> // List local USB devices and their busid.
> dev:# usbip connect --remote <host> --busid <busid>
> // Export a device to <host>.
> 
> For this, export function, connection is established from device-side 
> machine to application-side machine.
> 

I don't see any benifit here at all, please explain it better.

You are saying what your patch does, but not why we would want it.

and it is huge:

> Following use cases are supposed for the export function.
> 1) Server application or cloud service serves distributed ubiquitous 
> devices.
> 2) Dedicate devices to server application or cloud service.
> 
> To connect to cloud service, it needs to connect from inside of 
> firewall.
> 
> Probably, the export function was planned because the packets were 
> originally defined in header file usbip_network.h but they were not 
> used yet.
> This patch fixes the defined packet structures (ie. int in reply to 
> uinit32_t) and use them.
> Also, vendor/product name converion is added to port commnad as same as 
> list command.
> 
> Signed-off-by: Nobuo Iwata <nobuo.iwata@xxxxxxxxxxxxxxx>
> ---
>  tools/usb/usbip/libsrc/names.c             |   2 +
>  tools/usb/usbip/libsrc/usbip_host_driver.c |  15 ++
>  tools/usb/usbip/libsrc/usbip_host_driver.h |   1 +
>  tools/usb/usbip/libsrc/vhci_driver.c       | 127 +++++++++--
>  tools/usb/usbip/libsrc/vhci_driver.h       |   8 +-
>  tools/usb/usbip/src/Makefile.am            |   9 +-
>  tools/usb/usbip/src/usbip.c                |  17 +-
>  tools/usb/usbip/src/usbip.h                |  11 +-
>  tools/usb/usbip/src/usbip_attach.c         |  49 +---
>  tools/usb/usbip/src/usbip_bind.c           |   7 +-
>  tools/usb/usbip/src/usbip_connect.c        | 214 ++++++++++++++++++
>  tools/usb/usbip/src/usbip_detach.c         |  13 +-
>  tools/usb/usbip/src/usbip_disconnect.c     | 202 +++++++++++++++++
>  tools/usb/usbip/src/usbip_list.c           |  22 +-
>  tools/usb/usbip/src/usbip_network.h        |   5 +-
>  tools/usb/usbip/src/usbip_port.c           |  21 +-
>  tools/usb/usbip/src/usbip_unbind.c         |   7 +-
>  tools/usb/usbip/src/usbipd.c               | 227 ++-----------------
>  tools/usb/usbip/src/usbipd.h               |  36 +++
>  tools/usb/usbip/src/usbipd_app.c           | 239 ++++++++++++++++++++
>  tools/usb/usbip/src/usbipd_dev.c           | 247 +++++++++++++++++++++
>  21 files changed, 1176 insertions(+), 303 deletions(-)


That's too much code to review, especially for something that I have no
idea what it is, or why it is needed at all.

Please be more descriptive here, and hopefully, break this patch down
into smaller steps.

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux