Skip to content

Commit

Permalink
always set mac address to sriov vf (#1551)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaosuiba committed May 20, 2022
1 parent 4f1e812 commit 9d950f6
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions pkg/daemon/ovs_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -811,12 +811,11 @@ func setupSriovInterface(containerID, deviceID, vfDriver, ifName string, mtu int
return "", "", fmt.Errorf("failed to set MTU on %s: %v", hostNicName, err)
}

if isVfioPciDriver {
// 7. set MAC address to VF
if err := setVfMac(deviceID, vfIndex, mac); err != nil {
return "", "", err
}
// 7. set MAC address to VF
if err = setVfMac(deviceID, vfIndex, mac); err != nil {
return "", "", err
}

return hostNicName, vfNetdevice, nil
}

Expand Down

0 comments on commit 9d950f6

Please sign in to comment.