Drop in UDP Speed with USB Ethernet Adapter with DomU Kernel > 5.15 #9650
Labels
affects-4.2
This issue affects Qubes OS 4.2.
C: kernel
C: networking
hardware support
needs diagnosis
Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed.
P: default
Priority: default. Default priority for new issues, to be replaced given sufficient information.
T: bug
Type: bug report. A problem or defect resulting in unintended behavior in something that exists.
Qubes OS release
Brief summary
For my embedded development projects, my target devices usually boot via TFTP from my computer. Since my current laptop (Lenovo X1 Carbon 10th gen) does not have a physical ethernet port, I am forced to use a USB Ethernet Adapter. For this, I attach the USB Ethernet Adapter to my
dev-embedded
Qube. This worked fine with the5.15.103-1.qubes.fc32.x86_64
kernel with TFTP speed up to 1.2 MiB/s. However, using any more recent kernel (>6.1) the TFTP transfer speed drops down to a painfully slow 45 KiB/s. My workaround until now was to keep the kernel for that Qube at version 5.15, which is very undesirable.Steps to reproduce
dev-embedded
from5.15.103-1.qubes.fc32.x86_64
to6.6.63-1.qubes.fc37.x86_64
dev-embedded
dev-embedded
to enable network boot for embedded target (u-boot)Expected behavior
Actual behavior
Further Information
I have been investigating the problem for a while now, and here are my findings using a 6.6 kernel:
Scheduling Weirdness
When I run
stress -c 10
during the TFTP transfer, the speed significantly increases to ~500 KiB/s.Power Saving Knobs
Tweaking the power saving options using TLP or USB autosuspend did impact the transfer speed.
Diagnostics
Neither the kernel log nor
usbview
revealed any obvious information indicating the reason for the slow speed.USB Ethernet Adapters
I have tried the following ethernet adapters without any significant difference:
0b95:1790 ASIX Electronics Corp. AX88179 Gigabit Ethernet
0bda:8153 Realtek Semiconductor Corp. RTL8153 Gigabit Ethernet Adapter
0bda:8156 Realtek Semiconductor Corp. USB 10/100/1G/2.5G LAN
More Recent Kernels
Changing the DomU kernel to the following versions did not have any significant effect:
Transfer Speed in
sys-usb
Setting up a tftp/dhcp server in
sys-usb
, the TFTP transfer speed is at a blazing fast 1.4 MiB/s.I understand I can keep the USB Ethernet Adapter within
sys-usb
and route the traffic to mydev-embedded
Qube. However, my networking requirements are a bit more complex than just forwarding TFTP packets:dev-embedded
dev-embedded
Qube via WiFi ofsys-net
sys-net
dev-embedded
QubeI implemented the above requirements by attaching the USB Adapter to
dev-embedded
.Before going down the rabbit hole of keeping the USB Ethernet Adapter attached to
sys-usb
and setting up this rather complex network topology onsys-usb
,sys-firewall
,dev-embedded
andsys-net
, I'm wondering if anyone has an idea what could be the root problem or which other knobs are there to tweak.Doing a PCI passthrough of a USB host controller is not an option as the number of USB ports is already limited, and my two USB-C ports are on the same controller.
The text was updated successfully, but these errors were encountered: