Skip to content

Commit

Permalink
Merge pull request #905 from stgraber/main
Browse files Browse the repository at this point in the history
incusd/device/sriov: Line up code with comment
  • Loading branch information
hallyn authored May 31, 2024
2 parents 799b03e + 3bfa994 commit c8cedd0
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions internal/server/device/device_utils_network.go
Original file line number Diff line number Diff line change
Expand Up @@ -778,10 +778,7 @@ func networkSRIOVSetupVF(d deviceCommon, vfParent string, vfDevice string, vfID
// before being able to set a new VF MAC or disable spoofchecking. However some devices don't
// allow it so ignore failures.
link := &ip.Link{Name: vfParent}
err = link.SetVfAddress(volatile["last_state.vf.id"], "00:00:00:00:00:00")
if err != nil {
return vfPCIDev, 0, fmt.Errorf("Failed clearing MAC for VF %q: %w", volatile["last_state.vf.id"], err)
}
_ = link.SetVfAddress(volatile["last_state.vf.id"], "00:00:00:00:00:00")

if useSpoofCheck {
// Ensure spoof checking is disabled if not enabled in instance (only for real VF).
Expand Down

0 comments on commit c8cedd0

Please sign in to comment.