Skip to content

Commit

Permalink
Merge pull request #43 from adrianchiris/fix-default-controller-id
Browse files Browse the repository at this point in the history
Change default controller ID to 1
  • Loading branch information
moshe010 authored Jun 30, 2021
2 parents f951cf3 + 5152732 commit 0453bd4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sriovnet_switchdev.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,11 @@ func GetVfRepresentorSmartNIC(pfID, vfIndex string) (string, error) {
// Note: no supoport for Multi-Chassis Smart-NICs
expectedPhysPortNames := map[string]interface{}{
fmt.Sprintf("pf%svf%s", pfID, vfIndex): nil,
fmt.Sprintf("c0pf%svf%s", pfID, vfIndex): nil,
fmt.Sprintf("c1pf%svf%s", pfID, vfIndex): nil,
}

netdev, err := findNetdevWithPortNameCriteria(func(portName string) bool {
// if phys port name == pf<pfIndex>vf<vfIndex> or c0pf<pfIndex>vf<vfIndex> we have a match
// if phys port name == pf<pfIndex>vf<vfIndex> or c1pf<pfIndex>vf<vfIndex> we have a match
if _, ok := expectedPhysPortNames[portName]; ok {
return true
}
Expand Down

0 comments on commit 0453bd4

Please sign in to comment.