Skip to content

Commit

Permalink
Set link state up for target ports of SriovNetworkNodePolicy for kube…
Browse files Browse the repository at this point in the history
…rnetes cluster

Signed-off-by: Mamduh Alassi <[email protected]>
  • Loading branch information
Mmduh-483 committed Feb 23, 2021
1 parent 06a440b commit ab7165e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pkg/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,17 @@ func configSriovDevice(iface *sriovnetworkv1.Interface, ifaceStatus *sriovnetwor
}
}
}
// Set PF link up
pfLink, err := netlink.LinkByName(ifaceStatus.Name)
if err != nil {
return err
}
if pfLink.Attrs().OperState != netlink.OperUp {
err = netlink.LinkSetUp(pfLink)
if err != nil {
return err
}
}
return nil
}

Expand Down

0 comments on commit ab7165e

Please sign in to comment.