VirtualBox

14 月 前 建立

13 月 前 更新

#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:

  1. Set up physical CAN Bus A with nodes transmitting various IDs at 500kbit
  2. 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.
  3. Connect a Korlan usb_8dev device to each bus
  4. Connect each Korlan device to the Host machine (6.5.5-arch1-1)
  5. Launch a Ubuntu 20.04 Guest machine on the Host machine.
  6. Enable sharing / USB passthrough of both usb_8dev devices to the Guest machine
  7. Activate both devices in the Guest machine as can1, can0 respectively via ip link
  8. Dump each usb_8dev device's bus to terminal via candump
  9. Observe that some CAN packets from CAN Bus A are seen on both can0 and can1, though only ~5% of all messages
  10. Observe that some CAN packets from CAN Bus B are seen on both can0 and can1, though only ~5% of all messages
  11. Disconnect one of the usb_8dev devices from the Guest, activate it on the Host as can0 or can1
  12. Observe that only messages from one CAN bus are seen on either the Host or Guest CAN interfaces.
  13. Disconnect the remaining usb_8dev device from the Guest, activate it on the Host
  14. Observe again that only messages from one CAN bus are seen on each usb_8dev can interface.

更動歷史 (1)

comment:1 13 月 前Klaus Espenlaub 編輯

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?

注意: 瀏覽 TracTickets 來幫助您使用待辦事項功能

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette