Skip to content

Commit

Permalink
Fix VFs configuration for InfiniBand NICs
Browse files Browse the repository at this point in the history
  • Loading branch information
e0ne authored and bn222 committed Apr 14, 2022
1 parent 8528421 commit 8bb8091
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 8bb8091

Please sign in to comment.