[PATCH v3 0/2] usbip: vhci number of ports extension

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

 



This series of patches extends number of ports limitaion in application 
(vhci) side.

0. Version info

v3)
# Fixed conflicts against linux-next 20160209.
# Changed sysfs object and attribute name for old tools compatibility.
# Changed nports status format not to include num_controllers value.
# Fixed checkpatch errors and warnings.

v2)
# Added static to some functions and variables not called from other 
files. 

1. Overview

This series conatins 2 patches.
1/2:
    Extends number of ports using multiple host controllers.
    'num_controllers=N' module parameter denotes the number.
    The default is 1.
    Number of ports per controller are extended from 8 to
    USB_MAXCHILDREN(31).
    It can be altered with -DVHCI_NPORTS=n at compile time.
2/2:
    Event handling threads are used to be created for each port.
    This patch aggregates them to one thread.
    Rewritten with workqueue.

Assumed use case is a system that service in internet serves 
distributes devices in home or office. In the use case, application 
side might be needed to support more ports than 31.

Home/SOHO/Enterprise     Intranet/Internet
                                               +--------+
 +------+   +------+                           |Service |
+|device|---|Linux |---------------------------|on      |
|+------+   +------+                           |Linux   |
+------+   controller                          +--------+
ex)
Device                                      Service
 sensors ................................... environment analysis
 cameras ................................... monitoring, recording
 ID/biometric readers ...................... authentication

To increase number of ports, existing implementation has an overhead 
that event handing kernel threads are started for each port. The second 
patch eliminates the overhead.

2. TODO

1) Dynamic extension and reduction

If it's only extension, it's not so difficult to implement.
For reduction, many rcu_readlock/unlock are needed.
To keep code simple, this version simply extends the limitaion 
statically.

NOTE: This series depends on "exporting devices" patch set.

*** BLURB HERE ***

Nobuo Iwata (2):
  usbip: vhci number of ports extension
  usbip: single thread event handler

 drivers/usb/usbip/README             |   3 +
 drivers/usb/usbip/stub_dev.c         |   3 +-
 drivers/usb/usbip/usbip_common.c     |   7 +
 drivers/usb/usbip/usbip_common.h     |   4 +-
 drivers/usb/usbip/usbip_event.c      | 168 ++++++---
 drivers/usb/usbip/vhci.h             |  42 ++-
 drivers/usb/usbip/vhci_hcd.c         | 268 ++++++++-----
 drivers/usb/usbip/vhci_rx.c          |  21 +-
 drivers/usb/usbip/vhci_sysfs.c       | 294 +++++++++++----
 tools/usb/usbip/libsrc/vhci_driver.c | 541 ++++++++++++++-------------
 tools/usb/usbip/libsrc/vhci_driver.h |  37 +-
 tools/usb/usbip/src/usbip_attach.c   |   8 +-
 tools/usb/usbip/src/usbip_port.c     |  13 +-
 tools/usb/usbip/src/usbipd_app.c     |  49 ++-
 14 files changed, 912 insertions(+), 546 deletions(-)

-- 
2.1.0

--
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