Skip to content

Commit

Permalink
cnf-tests: improve sriov nic selector
Browse files Browse the repository at this point in the history
this commit add a check to be sure for intel nics that we enable sriov in the bios.
if that is not the case the totalvf variabel will be 0 so we skip that nic

Signed-off-by: Sebastian Sch <[email protected]>
  • Loading branch information
SchSeba committed Nov 2, 2022
1 parent ca6e187 commit 17f3051
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
8 changes: 8 additions & 0 deletions cnf-tests/testsuites/e2esuite/dpdk/dpdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,14 @@ func findSriovDeviceForDPDK(sriovInfos *sriovcluster.EnabledNodes, nodeNames []s
if sriovInfos.IsSecureBootEnabled[nodeName] && iface.Vendor == networks.MlxVendorID {
continue
}

// if the sriov is not able in the kernel for intel nic the totalVF will be 0 so we skip the device
// That is not the case for Mellanox devices that will report 0 until we configure the sriov interfaces
// with the mstconfig package
if iface.Vendor == networks.IntelVendorID && iface.TotalVfs == 0 {
continue
}

return nodeName, &iface, true
}
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 17f3051

Please sign in to comment.