Skip to content

Commit

Permalink
Fix VFs configuration for InfiniBand NICs
Browse files Browse the repository at this point in the history
Closes: #274
  • Loading branch information
e0ne committed Apr 1, 2022
1 parent 2e6003b commit 41b2c9d
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 := ifaceStatus.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 41b2c9d

Please sign in to comment.