diff options
Diffstat (limited to 'fdio.infra.ansible/roles')
-rw-r--r-- | fdio.infra.ansible/roles/vpp_device/files/csit-initialize-vfs.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fdio.infra.ansible/roles/vpp_device/files/csit-initialize-vfs.sh b/fdio.infra.ansible/roles/vpp_device/files/csit-initialize-vfs.sh index 4d2c22e7f5..afa84ae15a 100644 --- a/fdio.infra.ansible/roles/vpp_device/files/csit-initialize-vfs.sh +++ b/fdio.infra.ansible/roles/vpp_device/files/csit-initialize-vfs.sh @@ -28,7 +28,12 @@ for pci_addr in ${PCI_WHITELIST[@]}; do # SR-IOV initialization case "${1:-start}" in "start" ) - sriov_totalvfs=$(< "${pci_path}"/sriov_totalvfs) + if [ $(< "${pci_path}"/sriov_totalvfs) -gt 128 ] + then + sriov_totalvfs=128 + else + sriov_totalvfs=$(< "${pci_path}"/sriov_totalvfs) + fi ;; "stop" ) sriov_totalvfs=0 |