Skip to content

Commit

Permalink
incusd/device/sriov: Line up code with comment
Browse files Browse the repository at this point in the history
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
  • Loading branch information
stgraber committed May 31, 2024
1 parent 799b03e commit 3bfa994
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 3bfa994

Please sign in to comment.