Skip to content

Commit

Permalink
Merge pull request #72 from Mmduh-483/k8s-cluster-pf-state
Browse files Browse the repository at this point in the history
Set link state up for target ports of SriovNetworkNodePolicy for kubernetes cluster
  • Loading branch information
pliurh authored Mar 2, 2021
2 parents 690c4ba + ab7165e commit 80d51bf
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 80d51bf

Please sign in to comment.