feat: increase vhci-hcd capacity to 128 USB/IP devices (16 ports × 4 controllers)#2024
Draft
yaroslavborbat wants to merge 1 commit intomainfrom
Draft
feat: increase vhci-hcd capacity to 128 USB/IP devices (16 ports × 4 controllers)#2024yaroslavborbat wants to merge 1 commit intomainfrom
yaroslavborbat wants to merge 1 commit intomainfrom
Conversation
e07b964 to
2ab816f
Compare
e2fbe59 to
624844b
Compare
08b99af to
2b35d29
Compare
88d65ec to
b0a7cc2
Compare
diafour
reviewed
Feb 26, 2026
Comment on lines
+11
to
+19
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| # Build usbip-core, usbip-host, vhci-hcd for the running kernel and put .ko into a tmp dir. | ||
| # Needs: kernel headers (e.g. linux-headers-$(uname -r)), make, gcc. No full kernel source. | ||
| # | ||
| # Usage: |
Member
There was a problem hiding this comment.
Add a gap between the license and the documentation.
Suggested change
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, | |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| # See the License for the specific language governing permissions and | |
| # limitations under the License. | |
| # Build usbip-core, usbip-host, vhci-hcd for the running kernel and put .ko into a tmp dir. | |
| # Needs: kernel headers (e.g. linux-headers-$(uname -r)), make, gcc. No full kernel source. | |
| # | |
| # Usage: | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, | |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| # See the License for the specific language governing permissions and | |
| # limitations under the License. | |
| # Purpose: | |
| # Build usbip-core, usbip-host, vhci-hcd for the running kernel and put .ko into a tmp dir. | |
| # | |
| # Requirements: | |
| # - kernel headers (e.g. apt install linux-headers-$(uname -r)) (Full kernel source is not required) | |
| # - make | |
| # - gcc | |
| # - bash | |
| # | |
| # Usage: |
diafour
reviewed
Feb 26, 2026
Comment on lines
+28
to
+29
| # | ||
| # Minimal deps: bash, make, gcc, kernel headers package (e.g. linux-headers-${KVER}). |
Member
There was a problem hiding this comment.
Already noted above.
Suggested change
| # | |
| # Minimal deps: bash, make, gcc, kernel headers package (e.g. linux-headers-${KVER}). |
6e4912a to
07adb29
Compare
Signed-off-by: Yaroslav Borbat <yaroslav.borbat@flant.com>
b0a7cc2 to
c83042d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR updates the init container logic for DRA to dynamically build and load patched USB/IP kernel modules (
usbip-core,usbip-host,vhci-hcd) at startup with increased scalability limits.The Problem
The
vhci-hcddriver:This limits the total number of simultaneously attached remote USB devices to:
1 controller × 2 hubs × 8 ports = 16 devices
This becomes a bottleneck for high-density USB/IP workloads.
Additionally, the maximum number of ports per hub is constrained by the kernel constant
USB_MAXCHILDREN, which is defined as 31 in the Linux USB specification headers. This means the number of ports per hub cannot exceed 31, regardless ofvhci-hcdconfiguration.The Solution
We patch the
vhci-hcddriver to:CONFIG_USBIP_VHCI_HC_PORTSCONFIG_USBIP_VHCI_NR_HCSNew total capacity:
4 controllers × 2 hubs × 16 ports = 128 devices per node
The selected value (16 ports per hub) remains safely below the kernel-enforced maximum of 31 ports.
This provides significantly higher USB device density while preserving kernel constraints.
How It Works
Checklist
Changelog entries