Linux-限制USB设备带宽 [英] Linux - Limit USB Device Bandwidth

查看:678
本文介绍了Linux-限制USB设备带宽的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将多个(10-20)USB Wi-Fi加密狗连接到单个USB端口(使用外部供电的USB HUB),但是我无法同时连接5-6个以上的设备时间.

I am trying to connect multiple (10-20) USB Wi-Fi Dongles to a single USB port (using an external powered USB HUB), however I am not able to get more than 5-6 devices connected at the same time.

似乎每个加密狗都在分配"500-800".总可用5,000 Mbps(1个USB3端口)中的Mbps,这是没有道理的.

It seems that each dongle is allocating "500-800" Mbps from the total available 5000 Mbps (1x USB3 port), which does not make sense.

但是,我的问题是,是否可以通过某种方式使USB端口/集线器表现为尽力而为".并忽略分配的带宽,或者只是能够将每个设备限制为较低的带宽(例如20-50 Mbps).我不需要他们全速表演.

My question however would be if there is some way to have the USB port/hub behave as a "Best-Effort" and ignore the allocated bandwidths or simply be able to limit each device to a lower bandwidth such as 20-50 Mbps. I don't need them to perform at full speed.

推荐答案

我认为这不可能,原因如下.

I do not think it will be possible and the reasons are below.

在讨论原因之前,让我们讨论公交车实例".

Before going to the reason, lets discuss "Bus Instance".

根据XHCI规范,每个总线实例(BI)代表BI支持的速度的单位"带宽"

As per the XHCI spec, "Each Bus Instance (BI) represents a "unit" bandwidth at the speed that the BI supports"

因此,集线器中的每个USB 3.0端口将具有两个总线实例.超级速度和高速.

So each of your USB 3.0 port in the hub will have two Bus Instance. Super speed and High speed.

带宽取决于所连接的设备.如果是USB 2.0设备,它将获得最高480 Mbps的带宽,而SS设备的最高带宽将为5 Gbps.如果连接了多个设备,则在总线实例之间分配带宽将完全取决于USB控制器硬件.

Bandwidth depends on the device attached. If its a USB 2.0 device, it will get at most 480 Mbps bandwidth and for SS device 5 Gbps at most. If multiple device is connected, then it will be completely dependent on the USB controller hardware to divide the bandwidth between the Bus instances.

所以基本上,我不认为我们可以通过软件来做到这一点. XHCI规范没有任何更改带宽的命令.我们只有一条命令可以获取带宽.另外,对于集线器端口的带宽管理,我们也没有任何集线器请求.

So basically, I do not think we can do it via software. XHCI specification does not have any command to change bandwidth. We have only command to get bandwidth. Also we do not have any hub requests for bandwidth management of hub ports.

这篇关于Linux-限制USB设备带宽的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆