mirror-linux/include/linux/usb
Simon Schippers 7ff14c5204 usbnet: Add support for Byte Queue Limits (BQL)
In the current implementation, usbnet uses a fixed tx_qlen of:

USB2: 60 * 1518 bytes = 91.08 KB
USB3: 60 * 5 * 1518 bytes = 454.80 KB

Such large transmit queues can be problematic, especially for cellular
modems. For example, with a typical celluar link speed of 10 Mbit/s, a
fully occupied USB3 transmit queue results in:

454.80 KB / (10 Mbit/s / 8 bit/byte) = 363.84 ms

of additional latency.

This patch adds support for Byte Queue Limits (BQL) [1] to dynamically
manage the transmit queue size and reduce latency without sacrificing
throughput.

Testing was performed on various devices using the usbnet driver for
packet transmission:

- DELOCK 66045: USB3 to 2.5 GbE adapter (ax88179_178a)
- DELOCK 61969: USB2 to 1 GbE adapter (asix)
- Quectel RM520: 5G modem (qmi_wwan)
- USB2 Android tethering (cdc_ncm)

No performance degradation was observed for iperf3 TCP or UDP traffic,
while latency for a prioritized ping application was significantly
reduced. For example, using the USB3 to 2.5 GbE adapter, which was fully
utilized by iperf3 UDP traffic, the prioritized ping was improved from
1.6 ms to 0.6 ms. With the same setup but with a 100 Mbit/s Ethernet
connection, the prioritized ping was improved from 35 ms to 5 ms.

[1] https://lwn.net/Articles/469652/

Signed-off-by: Simon Schippers <simon.schippers@tu-dortmund.de>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20251106175615.26948-1-simon.schippers@tu-dortmund.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-11-10 17:28:38 -08:00
..
audio-v2.h
audio-v3.h
audio.h
c67x00.h
ccid.h
cdc-wdm.h
cdc.h
cdc_ncm.h net: usb: cdc-ncm: check for filtering capability 2025-07-21 16:59:26 -07:00
ch9.h
chipidea.h usb: chipidea: udc: add CI_HDRC_CONTROLLER_PULLUP_EVENT event 2025-06-19 12:28:25 +02:00
composite.h usb: gadget: Remove unused usb_remove_config 2025-06-19 12:26:48 +02:00
ehci-dbgp.h
ehci_def.h
ehci_pdriver.h
ezusb.h
func_utils.h
functionfs.h
g_hid.h
gadget.h usb: gadget: Introduce free_usb_request helper 2025-09-17 12:44:53 +02:00
gadget_configfs.h
hcd.h
input.h
iowarrior.h
irda.h
isp116x.h
isp1301.h
isp1362.h
ljca.h
m66592.h
mctp-usb.h usb: Add base USB MCTP definitions 2025-02-21 16:45:21 -08:00
midi-v2.h
musb-ux500.h
musb.h usb: musb: Constify struct musb_fifo_cfg 2025-02-03 16:29:53 +01:00
net2280.h
of.h
ohci_pdriver.h
onboard_dev.h
otg-fsm.h
otg.h
pd.h usb: typec: tcpm: Add new AMS for Get_Revision response 2024-12-24 08:56:04 +01:00
pd_ado.h
pd_bdo.h
pd_ext_sdb.h
pd_vdo.h
phy.h usb: phy: Remove API devm_usb_put_phy() 2025-01-13 06:12:09 +01:00
phy_companion.h
quirks.h
r8a66597.h
r8152.h r8152: add vendor/device ID pair for Dell Alienware AW1022z 2025-02-10 17:57:35 -08:00
renesas_usbhs.h
rndis_host.h
role.h
rzv2m_usb3drd.h
serial.h
sl811.h
storage.h
tcpci.h
tcpm.h usb: typec: tcpci: Prevent Sink disconnection before vPpsShutdown in SPR PPS 2025-01-17 12:40:20 +01:00
tegra_usb_phy.h usb: phy: tegra: Remove unused functions 2025-06-19 12:26:32 +02:00
typec.h usb: typec: Make active on port altmode writable 2024-12-24 08:56:05 +01:00
typec_altmode.h
typec_dp.h usb: typec: altmodes/displayport: do not index invalid pin_assignments 2025-06-24 15:42:55 +01:00
typec_mux.h usb: typec: Stub out typec_switch APIs when CONFIG_TYPEC=n 2025-09-17 12:42:30 +02:00
typec_retimer.h
typec_tbt.h usb: typec: Add driver for Thunderbolt 3 Alternate Mode 2024-12-24 08:56:05 +01:00
uas.h
ulpi.h usb: ulpi: Remove unused otg_ulpi_create 2025-03-03 10:23:35 +01:00
usb338x.h
usb_phy_generic.h
usbio.h usb: misc: Add Intel USBIO bridge driver 2025-09-12 14:05:09 +02:00
usbnet.h usbnet: Add support for Byte Queue Limits (BQL) 2025-11-10 17:28:38 -08:00
uvc.h media: uvcvideo: Support UVC_CROSXU_CONTROL_IQ_PROFILE 2025-09-13 18:35:02 +02:00
webusb.h
xhci-dbgp.h
xhci-sideband.h xhci: sideband: add api to trace sideband usage 2025-09-12 14:08:02 +02:00