Skip to content

Commit

Permalink
dualport: Fix ignore devices which doesn't belong to pf.
Browse files Browse the repository at this point in the history
This patch adds the fix where netdev port map contains all the
netdevices which potentially could be of other device when multiple PCIe
cards are present in the system.

Signed-off-by: Parav Pandit <[email protected]
  • Loading branch information
paravmellanox committed Sep 17, 2017
1 parent 4f392bb commit d3bbaf5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion driver/dualport_sriov_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func findPhyPort(netdevName string) int {
for _, entry := range npMap {
ibndevName := entry.ndevName + "__"
if ndevSearchName == ibndevName {
fmt.Printf("FOUND device = %s port = %d\n", entry.ndevName, entry.port)
fmt.Printf("device = %s port = %d\n", entry.ndevName, entry.port)
port = entry.port
}
}
Expand Down Expand Up @@ -128,6 +128,11 @@ func GetChildNetdevListByPort(netdevName string) ([]string, error) {
if entry.ndevName == netdevName {
continue
}

vfDir, err := FindVFDirForNetdev(netdevName, entry.ndevName)
if vfDir == "" || err != nil {
continue
}
netdevList = append(netdevList, entry.ndevName)
}
fmt.Println("ndev list lengh = ", len(netdevList))
Expand Down

0 comments on commit d3bbaf5

Please sign in to comment.