#21864 new defect
Sharing multiple usb_8dev devices to guest VM causes received CAN frames to "leak" between interfaces
回報者: | pht | 負責人: | |
---|---|---|---|
元件: | guest additions | 版本: | VirtualBox-7.0.10 |
關鍵字: | can, can2.0b, usb_8dev, Korlan, | 副本: | |
Guest type: | Linux | Host type: | Linux |
描述
There seems to be an issue when using multiple usb_8dev devices on a single guest. CAN frames received via a usb_8dev device monitoring either bus appear on the CAN log of the other bus from within the guest. Separating the two devices by only allowing the guest to access one results in no common messages being logged on either bus.
I do not know if this is in OHCI/EHCI packet passthrough, usb_8dev driver, socketcan, or something else. I do not see this issue when running two or more usb_8dev devices on a single host. It only appears when multiple devices are shared to a guest.
To reproduce:
- Set up physical CAN Bus A with nodes transmitting various IDs at 500kbit
- Set up a different physical CAN Bus B with nodes transmitting various IDs at 500kbit; do not connect Bus A and Bus B physically or through a gateway.
- Connect a Korlan usb_8dev device to each bus
- Connect each Korlan device to the Host machine (6.5.5-arch1-1)
- Launch a Ubuntu 20.04 Guest machine on the Host machine.
- Enable sharing / USB passthrough of both usb_8dev devices to the Guest machine
- Activate both devices in the Guest machine as can1, can0 respectively via
ip link
- Dump each usb_8dev device's bus to terminal via
candump
- Observe that some CAN packets from CAN Bus A are seen on both can0 and can1, though only ~5% of all messages
- Observe that some CAN packets from CAN Bus B are seen on both can0 and can1, though only ~5% of all messages
- Disconnect one of the usb_8dev devices from the Guest, activate it on the Host as can0 or can1
- Observe that only messages from one CAN bus are seen on either the Host or Guest CAN interfaces.
- Disconnect the remaining usb_8dev device from the Guest, activate it on the Host
- Observe again that only messages from one CAN bus are seen on each usb_8dev can interface.
Could it be that the devices are indistinguishable (no serial number, ... and the host OS doesn't provide a usable port number)? Because then they could get confused by either VirtualBox or the host's USB stack.
Can you provide the output of
VBoxManage list usbhost
?