aboutsummaryrefslogtreecommitdiffstats
path: root/fdio.infra.ansible/roles/vpp_device/files
diff options
context:
space:
mode:
authorpmikus <pmikus@cisco.com>2021-08-30 10:38:53 +0000
committerpmikus <pmikus@cisco.com>2021-08-30 10:38:53 +0000
commit6708e2187eb02ed47cc97b3477cd73e343695c5d (patch)
tree9b3154eb16fa6830bef330405e861e504520c9b3 /fdio.infra.ansible/roles/vpp_device/files
parent4bf3efc45c708370b5d8bc30ae0fb64c671a3877 (diff)
Infra: vpp_device NICs
Signed-off-by: pmikus <pmikus@cisco.com> Change-Id: I06d4012552eee918ae29e0bd789d3d316840ad4a
Diffstat (limited to 'fdio.infra.ansible/roles/vpp_device/files')
-rw-r--r--fdio.infra.ansible/roles/vpp_device/files/csit-initialize-vfs.sh7
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