Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not skip VFs configuration for BlueField 2 NICs in legacy mode #235

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions pkg/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ const (
ClusterTypeOpenshift = "openshift"
ClusterTypeKubernetes = "kubernetes"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This const isn't used anywhere and should be cleaned up sometime

VendorMellanox = "15b3"
adrianchiris marked this conversation as resolved.
Show resolved Hide resolved
DeviceBF2 = "a2d6"
)

var InitialState sriovnetworkv1.SriovNetworkNodeState
Expand Down Expand Up @@ -173,17 +172,12 @@ func SyncNodeState(newState *sriovnetworkv1.SriovNetworkNodeState) error {
return nil
}

// skip config VF for switchdev mode or BF-2 NICs
// SkipConfigVf for switchdev mode or BF-2 NICs
func SkipConfigVf(ifSpec sriovnetworkv1.Interface, ifStatus sriovnetworkv1.InterfaceExt) bool {
if ifSpec.EswitchMode == sriovnetworkv1.ESWITCHMODE_SWITCHDEV {
glog.V(2).Infof("SkipConfigVf(): skip config VF for switchdev device")
return true
}
// Nvidia_mlx5_MT42822_BlueField-2_integrated_ConnectX-6_Dx
if ifStatus.Vendor == VendorMellanox && ifStatus.DeviceID == DeviceBF2 {
glog.V(2).Infof("SkipConfigVf(): skip config VF for BF2 device")
return true
}
return false
}

Expand Down