nichelper

package
v0.2.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureVF added in v0.2.5

func ConfigureVF(deviceAddr string, numvfs int) error

func CurrentVFConfigured added in v0.2.5

func CurrentVFConfigured(deviceAddr string) (int, error)

func GenerateSRIOVNics added in v0.2.5

func GenerateSRIOVNics(nodeName string, nodeCache ctlcorev1.NodeCache, vlanConfigCache ctlnetworkv1beta1.VlanConfigCache, nics *ghw.NetworkInfo) ([]*v1beta1.SRIOVNetworkDevice, error)

GenerateSRIOVNics will generate list of v1beta1.SRIOVNetworkDevice Objects on regular reconciles to ensure new nics are processed, and nic's used for management or cluster network configures are skipped from usage

func GetDefaultSysPath added in v0.2.5

func GetDefaultSysPath() string

GetDefaultSysPath is a helper to fetch the current defaultDevicePath variable

func GetVFList added in v0.2.5

func GetVFList(pf string) (vfList []string, err error)

copied from: https://github.com/k8snetworkplumbingwg/sriov-network-device-plugin/blob/v3.0.0/pkg/utils/utils.go#L112 with minor change to allow override to sysBusPci path to make it easier to test with umockdev GetVFList returns a List containing PCI addr for all VF discovered in a given PF

func IdentifyHarvesterManagedNIC

func IdentifyHarvesterManagedNIC(nodeName string, nodeCache ctlcorev1.NodeCache, vlanConfigCache ctlnetworkv1beta1.VlanConfigCache) ([]string, error)

func IdentifyManagementNics

func IdentifyManagementNics() ([]string, error)

IdentifyManagementNics will identify the NICS used on the host for default harvester management and bonded interfaces

func IsNICSRIOVCapable added in v0.2.5

func IsNICSRIOVCapable(deviceAddr string) (bool, error)

func ListNICSInUseBySRIOV added in v0.2.5

func ListNICSInUseBySRIOV(nics *net.Info) ([]string, error)

func OverrideDefaultSysPath added in v0.2.5

func OverrideDefaultSysPath(val string)

OverrideDefaultSysPath is a helper to override the defaultDevicePath variable to make it easier to use mocks for testing other packages dependent on nichelper

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL