diff --git a/cnf-tests/testsuites/e2esuite/dpdk/dpdk.go b/cnf-tests/testsuites/e2esuite/dpdk/dpdk.go index 738381627b..aaaa8d1576 100644 --- a/cnf-tests/testsuites/e2esuite/dpdk/dpdk.go +++ b/cnf-tests/testsuites/e2esuite/dpdk/dpdk.go @@ -709,6 +709,11 @@ func findSriovDeviceForDPDK(sriovInfos *sriovcluster.EnabledNodes, nodeNames []s if sriovInfos.IsSecureBootEnabled[nodeName] && iface.Vendor == networks.MlxVendorID { continue } + + if networks.IsIntelDisabledNic(iface) { + continue + } + return nodeName, &iface, true } } diff --git a/cnf-tests/testsuites/pkg/networks/sriov.go b/cnf-tests/testsuites/pkg/networks/sriov.go index 1089e252ce..d1fca2c36a 100644 --- a/cnf-tests/testsuites/pkg/networks/sriov.go +++ b/cnf-tests/testsuites/pkg/networks/sriov.go @@ -125,6 +125,16 @@ func GetSupportedSriovNics() (map[string]string, error) { return supportedNicsConfigMap.Data, nil } +// 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 +func IsIntelDisabledNic(iface sriovv1.InterfaceExt) bool { + if iface.Vendor == IntelVendorID && iface.TotalVfs == 0 { + return true + } + return false +} + func CreateSriovPolicyAndNetworkDPDKOnlyWithVhost(dpdkResourceName, workerCnfLabelSelector string) { createSriovPolicyAndNetwork(dpdkResourceName, workerCnfLabelSelector, true) } diff --git a/vendor/github.com/k8snetworkplumbingwg/sriov-network-operator/test/util/cluster/cluster.go b/vendor/github.com/k8snetworkplumbingwg/sriov-network-operator/test/util/cluster/cluster.go index f571f68f99..387cac9054 100644 --- a/vendor/github.com/k8snetworkplumbingwg/sriov-network-operator/test/util/cluster/cluster.go +++ b/vendor/github.com/k8snetworkplumbingwg/sriov-network-operator/test/util/cluster/cluster.go @@ -104,6 +104,13 @@ func (n *EnabledNodes) FindOneSriovDevice(node string) (*sriovv1.InterfaceExt, e 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 itf.Vendor == intelVendorID && itf.TotalVfs == 0 { + continue + } + return &itf, nil } } @@ -126,6 +133,13 @@ func (n *EnabledNodes) FindSriovDevices(node string) ([]*sriovv1.InterfaceExt, e 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 itf.Vendor == intelVendorID && itf.TotalVfs == 0 { + continue + } + devices = append(devices, &s.Status.Interfaces[i]) } } @@ -136,7 +150,7 @@ func (n *EnabledNodes) FindSriovDevices(node string) ([]*sriovv1.InterfaceExt, e func (n *EnabledNodes) FindOneVfioSriovDevice() (string, sriovv1.InterfaceExt) { for _, node := range n.Nodes { for _, nic := range n.States[node].Status.Interfaces { - if nic.Vendor == intelVendorID && sriovv1.IsSupportedModel(nic.Vendor, nic.DeviceID) { + if nic.Vendor == intelVendorID && sriovv1.IsSupportedModel(nic.Vendor, nic.DeviceID) && nic.TotalVfs != 0 { return node, nic } }