Skip to content

Commit

Permalink
Merge pull request #15 from oshoval/fix_reset
Browse files Browse the repository at this point in the history
Update DiscoverSriovDevices to list only pfs with networking devices
  • Loading branch information
zshi-redhat authored Feb 8, 2021
2 parents 65f8e18 + 092394b commit 1f42de5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pkg/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,18 @@ func DiscoverSriovDevices() ([]sriovnetworkv1.InterfaceExt, error) {
glog.Warningf("DiscoverSriovDevices(): unable to parse device driver for device %+v %q", device, err)
continue
}

deviceNames, err := dputils.GetNetNames(device.Address)
if err != nil {
glog.Warningf("DiscoverSriovDevices(): unable to get device names for device %+v %q", device, err)
continue
}

if len(deviceNames) == 0 {
// no network devices found, skipping device
continue
}

iface := sriovnetworkv1.InterfaceExt{
PciAddress: device.Address,
Driver: driver,
Expand Down

0 comments on commit 1f42de5

Please sign in to comment.