Skip to content

Commit

Permalink
Merge pull request #275 from e0ne/issues/274
Browse files Browse the repository at this point in the history
Fix VFs configuration for InfiniBand NICs
  • Loading branch information
adrianchiris authored Apr 13, 2022
2 parents 162c2b2 + 7c91b28 commit 236be98
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,13 @@ func configSriovDevice(iface *sriovnetworkv1.Interface, ifaceStatus *sriovnetwor
// for userspace drivers like vfio we configure the vf mac using the kernel nic mac address
// before we switch to the userspace driver
if yes, d := hasDriver(addr); yes && !sriovnetworkv1.StringInArray(d, DpdkDrivers) {
if strings.EqualFold(iface.LinkType, "IB") {
// LinkType is an optional field. Let's fallback to current link type
// if nothing is specified in the SriovNodePolicy
linkType := iface.LinkType
if linkType == "" {
linkType = ifaceStatus.LinkType
}
if strings.EqualFold(linkType, "IB") {
if err = setVfGuid(addr, pfLink); err != nil {
return err
}
Expand Down

0 comments on commit 236be98

Please sign in to comment.