On Fri, Apr 03, 2015 at 09:33:32AM +0900, Nobuo Iwata wrote:
> Originally, USB/IP transmits requests and response PDUs for preparation to 
> transfer URBs in user space, after the preparation, URBs are transmitted in 
> kernel space.
> 
> To make easy to introduce application network protocols like SSL, WebSocket 
> and so on, the driver, usbip_ux.ko, forwards URBs to USB/IP user space 
> utilities. It's just like fuse driver for user space file system. 

You do this on all of your patches, please wrap your changelog lines at
72 columns so they show up correctly in the log.

> Then, utilities transfer URBs in user space.
> 
> To do so, usbip_trx_ops makes send/receive functions pluggable. 
> kernel_sendmsg() and kernel_recvmsg() for kernel mode transfer can be 
> substituted by read/write methods to user space utilities.
> 
> In the absence of usbip_ux.ko, original kernel space transferring is valid. 
> usbip_ux.ko replaces usbip_trx_ops in its init routine.
> 
> A) Original - kernel space URBs transfer
> 
> User            +-------+   1) import/export    +-------+
> space           |uspipd,|<--------------------->|usbip, |
>                 |usbip  |                       |usbipa |
>                 +---+---+                       +---+---+
>                     |                               |
>         2)Set sockfd|                               |2)Set sockfd
>           thru sysfs|                               |  thru sysfs
>                     V                               V
> Kernel          +-------+        4)URBs         +-------+
> space           |usbip  |<--------------------->|vhci   |
>                 |host.ko|                       |hcd.ko |
>                 +-------+                       +-------+
>                 3)link to kernel trx_ops        3)link to kernel trx_ops
> 
> B) New - user space URBs transfer
> 
> User            +-------+    1)import/export    +-------+
> space           |uspipd,|<--------------------->|usbip, |
>             +---|usbip  |<--------------------->|usbipa |---+
> 2)Set sockfd|+--+-------+        6)URBs         +-------+--+|2)Set sockfd
>   thru ioctl||      ^                              ^       ||  thru ioctl
>   (right)   ||      |5)read/write      5)read/write|       ||  (left)
> 3)Set sockfd||      +-------+               +------+       ||3)Set Sockfd
>   thru sysfs|+-----------+  | /dev/usbip-ux |  +-----------+|  thru sysfs
>   (left)    V            V  V               V  V            V  (right)
> Kernel  +-------+       +-------+       +-------+       +-------+
> space   |usbip  |<----->|usbip  |       |usbip  |<----->|vhci   |
>         |host.ko|5)send |ux.ko  |       |ux.ko  |5)send |hcd.ko |
>         +-------+  recv +-------+       +-------+  recv +-------+
>         4)link to user trx_ops          4)link to user trx_ops

This is really interesting, but how does this tie into usbfs where you
can send and receive USB urbs today from userspace to USB devices?  Why
do you need another user/kernel interface here?

And there have been previous patches to add openssl support for usbip,
but do so in a much different way from this patch set.  Is that the
primary reason you did this work, or do you have some other goal /
requirement with usbip that caused you to create this design?

thanks,

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

Reply via email to