Okay, I changed my parameters to: num_vfs=3,3,0 probe_vf=3,3,0. On boot, this gets me a total of 4 Infiniband and 4 Ethernet interfaces with random MAC/GUID assignments. I can use `driverctl set-override $dev none` and it will unbind the driver. Then `ip link set $dev mac 00:11:22:33:44:55 vlan 3` puts the right values in `ip link`. When I re-bind mlx4_core to that device, it comes back as a usable network interface with the right properties.
At least, they look right. I haven't actually tested them yet.
IB GUIDs are weird and probably not right. The `ip link set` for node_guid and port_guid do not work (RTNETLINK answers: Operation not supported) but I can set a MAC address and then re-bind the driver and the GUID will be constructed from that MAC address. The output in `ip link`, in this situation, is still wrong; it still shows the MAC as 00:00:00:00:00:00.
So, here's a functioning workflow for my Ethernet VFs:
This experience is making me appreciate the mlx5 driver model and adapters that use it. Shame they cost so much and run so hot.
Thanks so much for the help. I could not have gotten this far without it.
At least, they look right. I haven't actually tested them yet.
IB GUIDs are weird and probably not right. The `ip link set` for node_guid and port_guid do not work (RTNETLINK answers: Operation not supported) but I can set a MAC address and then re-bind the driver and the GUID will be constructed from that MAC address. The output in `ip link`, in this situation, is still wrong; it still shows the MAC as 00:00:00:00:00:00.
So, here's a functioning workflow for my Ethernet VFs:
- Use mlxconfig to set NUM_OF_VFS to x
- Use num_vfs=0,x,0 probe_vf=0,x,0
- Reboot.
- Unbind mlx4_core from the vfs using driverctl. (I didn't try any other methods.)
- Use `ip link set dev vf num mac stuff etc` to set the VF's properties
- Either re-bind mlx4_core to the VF if you want the host to use that interface, or attach it to a virtual machine.
This experience is making me appreciate the mlx5 driver model and adapters that use it. Shame they cost so much and run so hot.
Thanks so much for the help. I could not have gotten this far without it.