USB 2.5Gb adaptor, ProxMox Install

Started by ibrewster, June 12, 2024, 07:16:38 PM

Previous topic - Next topic
I have a backup OPNSense install running under ProxMox installed on an intel Mac Mini (I don't know the exact model, but I can try to dig it up if it matters). OPNSense is fully updated as of this morning, running version 24.1.8-amd64.

To this hardware I added a 2.5Gbe USB adaptor, And set it up in ProxMox to do USB passthrough to the VM. From the OPNSense command line it now shows up like this in usbconfig:

root@gatekeeper2:~ # usbconfig -d 1.2 dump_device_desc
ugen1.2: <Realtek USB 10/100/1G/2.5G LAN> at usbus1, cfg=1 md=HOST spd=SUPER (5.0Gbps) pwr=ON (64mA)

  bLength = 0x0012
  bDescriptorType = 0x0001
  bcdUSB = 0x0320
  bDeviceClass = 0x0000  <Probed by interface class>
  bDeviceSubClass = 0x0000
  bDeviceProtocol = 0x0000
  bMaxPacketSize0 = 0x0009
  idVendor = 0x0bda
  idProduct = 0x8156
  bcdDevice = 0x3104
  iManufacturer = 0x0001  <Realtek>
  iProduct = 0x0002  <USB 10/100/1G/2.5G LAN>
  iSerialNumber = 0x0006  <4013000000>
  bNumConfigurations = 0x0003


ifconfig for the interface shows the following:


ue0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
description: LAN (lan)
options=80008<VLAN_MTU,LINKSTATE>
ether 8c:ae:4c:dd:d5:9e
inet6 fe80::8eae:4cff:fedd:d59e%ue0 prefixlen 64 scopeid 0x6
inet 10.27.81.247 netmask 0xffffff00 broadcast 10.27.81.255
inet 10.27.81.1 netmask 0xffffff00 broadcast 10.27.81.255 vhid 3
carp: BACKUP vhid 3 advbase 1 advskew 100
media: Ethernet autoselect
status: active
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>


At any rate, I set that up as my LAN interface, and used iperf to run a test back to my main router (connected via a 10G link). Somewhat to my surprise, I saw I was only getting 100Mbps. After some digging, I found this: https://forum.opnsense.org/index.php?topic=27189.0, which suggested "setting the device into ECM mode". I tried that, which did help - I now get around 500Mbps.

Am I missing something/doing something wrong here? Looking at ifconfig, I would think it should show the media type - for example, one interface on my main router shows this for media:

media: Ethernet autoselect (10Gbase-Twinax <full-duplex,rxpause,txpause>)

But on the backup it's just "Ethernet autoselect" - no indication of what it selected. Also, the "SIMPLEX" bugs me (shouldn't it be "DUPLEX" or just not there?), but that's the same on my main OPNsense router (which is running bare metal on an old Intel i7), as well as my desktop Mac Studio (though settings shows full-duplex. Gah!), so maybe that's normal?

I'm wondering if this is a driver issue? I switched things up, letting Proxmox handle the adaptors, and just sharing them with the VM using a Linux Bridge and VirtIO, rather than using USB passthrough, and iperf now shows full speed. So I guess that's a solution, though OPNSense showing the interfaces as always up and 10Mbps bugs my sensibilities (and may cause issues with things like High Availability if the interface is really down?). I am under the impression this is "normal" for VirtIO devices, however.