Guest OS Hangs When Creating VF
The following command from the hypervisor hangs:
# echo 100
> /sys/bus/pci/drivers/virtio-pci/0000
:89
:00.4
/sriov_numvfs
This can happen when more VIRTIO_NET_EMULATION_NUM_PF/VIRTIO_NET_EMULATION_NUM_VF are reserved than PF_TOTAL_SF (VIRTIO_NET_EMULATION_NUM_PF + VIRTIO_NET_EMULATION_NUM_VF > PF_TOTAL_SF) as each virtio-net PF/VF requires a corresponding SF created. Example:
# mlxconfig -d 03
:00.0
-e q | grep -iE 'PF_TOTAL_SF|VIRTIO_NET_EMULATION_NUM_PF|VIRTIO_NET_EMULATION_NUM_VF'
* VIRTIO_NET_EMULATION_NUM_VF 0
126
126
* VIRTIO_NET_EMULATION_NUM_PF 0
4
4
* PF_TOTAL_SF 0
508
508
By default, BlueField creates an SF for each PF. Take this into consideration when reserving PF_TOTAL_SF.
BlueField supports a limited number of SFs. The SF reserved on the BlueField Arm side and host side are not shared. Make sure to remove the SFs reserved on the host side when reserving a large number on the BlueField Arm side.