Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.kernel > #60317

Bug#891036: The problem is related to the number of ports created in vhci_hcd.0

Path csiph.com!feeder.erje.net!2.us.feeder.erje.net!goblin1!goblin2!goblin.stu.neva.ru!aioe.org!bofh.it!news.nic.it!robomod
From "wzabolot@elektron.elka.pw.edu.pl" <wzabolot@elektron.elka.pw.edu.pl>
Newsgroups linux.debian.bugs.dist, linux.debian.kernel
Subject Bug#891036: The problem is related to the number of ports created in vhci_hcd.0
Date Thu, 22 Feb 2018 23:50:01 +0100
Message-ID <vm7QB-2QM-3@gated-at.bofh.it> (permalink)
References <vlZgm-5tv-5@gated-at.bofh.it> <vm7nA-2DF-23@gated-at.bofh.it> <vlH06-1O8-3@gated-at.bofh.it> <vm7nA-2DF-23@gated-at.bofh.it>
X-Mailbox-Line From debian-bugs-dist-request@lists.debian.org Thu Feb 22 22:45:12 2018
Old-Return-Path <debbugs@buxtehude.debian.org>
X-Spam-Flag NO
X-Spam-Score -3.96
Reply-To "wzabolot@elektron.elka.pw.edu.pl" <wzabolot@elektron.elka.pw.edu.pl>, 891036@bugs.debian.org
Resent-To debian-bugs-dist@lists.debian.org
Resent-Cc Debian Kernel Team <debian-kernel@lists.debian.org>
X-Debian-Pr-Message followup 891036
X-Debian-Pr-Package usbip
X-Debian-Pr-Source linux, linux-grsec, linux-tools, usbip
X-Spam-Bayes score:0.0000 Tokens: new, 45; hammy, 142; neutral, 57; spammy, 0. spammytokens: hammytokens:0.000-+--sk:config_, 0.000-+--sk:CONFIG_, 0.000-+--H*UA:52.6.0, 0.000-+--H*u:52.6.0, 0.000-+--ifdef
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0
MIME-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 8bit
Content-Language pl-PL
X-Debian-Message from BTS
X-Mailing-List <debian-bugs-dist@lists.debian.org> archive/latest/1443251
List-ID <debian-bugs-dist.lists.debian.org>
List-URL <https://lists.debian.org/debian-bugs-dist/>
Approved robomod@news.nic.it
Lines 59
Organization linux.* mail to news gateway
Sender robomod@news.nic.it
X-Original-Date Thu, 22 Feb 2018 23:42:15 +0100
X-Original-Message-ID <7c22ea61-a9da-caa6-5b69-06e3dfefdb44@elektron.elka.pw.edu.pl>
X-Original-References <da4d5257-9bbd-7abb-2022-ba474aea4720@elka.pw.edu.pl> <6d54befc-2fbb-b1ca-cc93-00eefb5c867f@elektron.elka.pw.edu.pl> <b1abca9f-58c8-c755-6506-c4bf406129a8@ise.pw.edu.pl> <6d54befc-2fbb-b1ca-cc93-00eefb5c867f@elektron.elka.pw.edu.pl>
Xref csiph.com linux.debian.bugs.dist:883245 linux.debian.kernel:60317

Cross-posted to 2 groups.

Show key headers only | View raw


In fact I don't understand how the vhci_hcd is supposed to work.

The constants are defined as follows:
https://elixir.bootlin.com/linux/v4.15.4/source/drivers/usb/usbip/vhci.h#L75

/* Number of supported ports. Value has an upperbound of USB_MAXCHILDREN */
#ifdef CONFIG_USBIP_VHCI_HC_PORTS
#define VHCI_HC_PORTS CONFIG_USBIP_VHCI_HC_PORTS
#else
#define VHCI_HC_PORTS 8
#endif

/* Each VHCI has 2 hubs (USB2 and USB3), each has VHCI_HC_PORTS ports */
#define VHCI_PORTS    (VHCI_HC_PORTS*2)

#ifdef CONFIG_USBIP_VHCI_NR_HCS
#define VHCI_NR_HCS CONFIG_USBIP_VHCI_NR_HCS
#else
#define VHCI_NR_HCS 1
#endif

#define MAX_STATUS_NAME 16

Then in the line
https://elixir.bootlin.com/linux/v4.15.4/source/drivers/usb/usbip/vhci_hcd.c#L46
we can see:

int vhci_num_controllers = VHCI_NR_HCS;

But, when I have unpacked the sources of the Debian kernel:

("apt source usbip" downloads and unpacks the kernel sources)

In the debian/config/config I can see:

CONFIG_USBIP_CORE=m
CONFIG_USBIP_VHCI_HCD=m
CONFIG_USBIP_VHCI_HC_PORTS=15
CONFIG_USBIP_VHCI_NR_HCS=8
CONFIG_USBIP_HOST=m

So the number of created controllers is equal to 8, and for each
controller there are 30 ports created (2 * 15)

That results in 240 ports, that is above the MAXNPORT number defined in

https://elixir.bootlin.com/linux/v4.15.4/source/tools/usb/usbip/libsrc/vhci_driver.h#L16
#define MAXNPORT 128

To obtain the working configuration it is necessary either to increase
the MAXNPORT to 240 or even to 256 or to decrease the
CONFIG_USBIP_VHCI_NR_HCS to 4


-- 
Wojciech M Zabolotny, PhD
Institute of Electronic Systems
Faculty of Electronics and Information Technology
Warsaw University of Technology

Back to linux.debian.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Bug#891036: libusbip: error: port number exceeds 128 wzab <wzab@ise.pw.edu.pl> - 2018-02-21 19:10 +0100
  Bug#891036: More details - the problem is associated with the vhci-hcd driver. wzab <wzab@ise.pw.edu.pl> - 2018-02-21 20:00 +0100
  Bug#891036: Problem occurs in 4.13 and 4.14, but not in 4.12 "wzabolot@elektron.elka.pw.edu.pl" <wzabolot@elektron.elka.pw.edu.pl> - 2018-02-21 20:30 +0100
  Bug#891036: Problem still persists in kernel 4.15 "wzabolot@elektron.elka.pw.edu.pl" <wzabolot@elektron.elka.pw.edu.pl> - 2018-02-21 21:10 +0100
  Bug#891036: Even after updating "usbip" to usbip_2.0+4.15.4-1_amd64.deb problem remains "wzabolot@elektron.elka.pw.edu.pl" <wzabolot@elektron.elka.pw.edu.pl> - 2018-02-21 21:20 +0100
  Bug#891036: The problem is related to the number of ports created in vhci_hcd.0 Wojtek Zabolotny <W.Zabolotny@elka.pw.edu.pl> - 2018-02-22 14:40 +0100
    Bug#891036: The problem is related to the number of ports created in vhci_hcd.0 "wzabolot@elektron.elka.pw.edu.pl" <wzabolot@elektron.elka.pw.edu.pl> - 2018-02-22 23:20 +0100
      Bug#891036: The problem is related to the number of ports created in vhci_hcd.0 "wzabolot@elektron.elka.pw.edu.pl" <wzabolot@elektron.elka.pw.edu.pl> - 2018-02-22 23:50 +0100
        Bug#891036: Workaround found, the problem is with Debian configuration of kernel "wzabolot@elektron.elka.pw.edu.pl" <wzabolot@elektron.elka.pw.edu.pl> - 2018-02-23 01:10 +0100
        Bug#891036: Proposal - how to make usbip more resistant to misconfiguration "wzabolot@elektron.elka.pw.edu.pl" <wzabolot@elektron.elka.pw.edu.pl> - 2018-02-23 02:10 +0100
  Bug#891036: libusbip: error: port number exceeds 128 Gergely Risko <risko@debian.org> - 2018-05-22 18:20 +0200

csiph-web