Versions in this module Expand all Collapse all v1 v1.3.0 Jun 15, 2026 Changes in this version + var ErrDeviceNotFound = errors.New("device not found") + var ErrMultipleRepresentorsFound = errors.New("multiple representors found") + var ErrRepresentorNotFound = errors.New("representor not found") + func GetAuxSFDevByPciAndSFIndex(pciAddress string, sfIndex uint32) (string, error) + func GetDefaultPKeyFromPci(pciAddress string) (string, error) + func GetPKeyByIndexFromPci(pciAddress string, index int) (string, error) + func GetPfIndexByVfPciAddress(vfPciAddress string) (int, error) + func GetPfRepresentorDPU(pfID string) (string, error) + func GetPfRepresentorFromPortParams(pp *RepresentorPortParams) (string, error) + func GetSfRepresentorFromPortParams(pp *RepresentorPortParams, sfIndex uint32) (string, error) + func GetVfRepresentorFromPortParams(pp *RepresentorPortParams, vfIndex uint32) (string, error) + type RepresentorPortParams struct + ControllerNumber uint32 + ECPF string + PFNumber uint16 + func GetPFRepresentorPortParamsFromMAC(mac net.HardwareAddr) (*RepresentorPortParams, error) + func GetRepresentorPortParamsFromVUID(vuid string) (*RepresentorPortParams, error) v1.2.0 Mar 6, 2023 Changes in this version + const AuxSysDir + const NetSysDir + const PORT_FLAVOUR_CPU + const PORT_FLAVOUR_DSA + const PORT_FLAVOUR_PCI_PF + const PORT_FLAVOUR_PCI_SF + const PORT_FLAVOUR_PCI_VF + const PORT_FLAVOUR_PHYSICAL + const PORT_FLAVOUR_UNKNOWN + const PORT_FLAVOUR_UNUSED + const PORT_FLAVOUR_VIRTUAL + const PciSysDir + func BindVf(handle *PfNetdevHandle, vf *VfObj) error + func ConfigVfs(handle *PfNetdevHandle, privileged bool) error + func DisableSriov(pfNetdevName string) error + func EnableSriov(pfNetdevName string) error + func FreeVf(handle *PfNetdevHandle, vf *VfObj) + func FreeVfByNetdevName(handle *PfNetdevHandle, vfIndex int) error + func GetAuxNetDevicesFromPci(pciAddr string) ([]string, error) + func GetNetDevicesFromAux(auxDev string) ([]string, error) + func GetNetDevicesFromPci(pciAddress string) ([]string, error) + func GetPciFromNetDevice(name string) (string, error) + func GetPfPciFromAux(auxDev string) (string, error) + func GetPfPciFromVfPci(vfPciAddress string) (string, error) + func GetPortIndexFromRepresentor(repNetDev string) (int, error) + func GetRepresentorPeerMacAddress(netdev string) (net.HardwareAddr, error) + func GetSfIndexByAuxDev(auxDev string) (int, error) + func GetSfRepresentor(uplink string, sfNum int) (string, error) + func GetSfRepresentorDPU(pfID, sfIndex string) (string, error) + func GetUplinkRepresentor(pciAddress string) (string, error) + func GetUplinkRepresentorFromAux(auxDev string) (string, error) + func GetVfDefaultMacAddr(vfNetdevName string) (string, error) + func GetVfIndexByPciAddress(vfPciAddress string) (int, error) + func GetVfNetdevName(handle *PfNetdevHandle, vf *VfObj) string + func GetVfPciDevList(pfNetdevName string) ([]string, error) + func GetVfRepresentor(uplink string, vfIndex int) (string, error) + func GetVfRepresentorDPU(pfID, vfIndex string) (string, error) + func IsSriovEnabled(netdevName string) bool + func IsSriovSupported(netdevName string) bool + func IsVfPciVfioBound(pciAddr string) bool + func SetPFLinkUp(pfNetdevName string) error + func SetRepresentorPeerMacAddress(netdev string, mac net.HardwareAddr) error + func SetVfDefaultGUID(handle *PfNetdevHandle, vf *VfObj) error + func SetVfDefaultMacAddress(handle *PfNetdevHandle, vf *VfObj) error + func SetVfPrivileged(handle *PfNetdevHandle, vf *VfObj, privileged bool) error + func SetVfVlan(handle *PfNetdevHandle, vf *VfObj, vlan int) error + func UnbindVf(handle *PfNetdevHandle, vf *VfObj) error + type PfNetdevHandle struct + List []*VfObj + PfNetdevName string + func GetPfNetdevHandle(pfNetdevName string) (*PfNetdevHandle, error) + type PortFlavour uint16 + func GetRepresentorPortFlavour(netdev string) (PortFlavour, error) + type VfObj struct + Allocated bool + Bound bool + Index int + PciAddress string + func AllocateVf(handle *PfNetdevHandle) (*VfObj, error) + func AllocateVfByMacAddress(handle *PfNetdevHandle, vfMacAddress string) (*VfObj, error) + type VfObject struct + NetdevName string + PCIDevName string