Documentation ¶
Index ¶
- Variables
- func CleanCachedConf(cRefPath string) error
- func GetNetRepresentor(deviceID string) (string, error)
- func GetVFLinkName(pciAddr string) (string, error)
- func IsOvsHardwareOffloadEnabled(deviceID string) bool
- func LoadHostIFNameFromCache(args *skel.CmdArgs) (string, string, error)
- func ReleaseVF(args *skel.CmdArgs, origIfName string) error
- func ResetVF(args *skel.CmdArgs, deviceID, origIfName string) error
- func SaveConf(cid, podIfName string, conf interface{}) error
- func SetupSriovInterface(contNetns ns.NetNS, containerID, ifName string, mtu int, deviceID string) (*current.Interface, *current.Interface, error)
Constants ¶
This section is empty.
Variables ¶
var (
// DefaultCNIDir used for caching hostIFName
DefaultCNIDir = "/var/lib/cni/ovs"
)
var (
// SysBusPci is sysfs pci device directory
SysBusPci = "/sys/bus/pci/devices"
)
Functions ¶
func CleanCachedConf ¶
CleanCachedConf removed cached Conf from disk
func GetNetRepresentor ¶
GetNetRepresentor retrieves network representor device for smartvf
func GetVFLinkName ¶
GetVFLinkName retrives interface name for given pci address
func IsOvsHardwareOffloadEnabled ¶
IsOvsHardwareOffloadEnabled when device id is set, then ovs hardware offload is enabled.
func LoadHostIFNameFromCache ¶
LoadHostIFNameFromCache retrieves cached Conf returns it along with a handle for removal
func ResetVF ¶
ResetVF reset the VF which accidently moved into default network namespace by a container failure
func SaveConf ¶
SaveConf takes in container ID, data dir and Pod interface name as string and a json encoded struct Conf and save this Conf in data dir
func SetupSriovInterface ¶
func SetupSriovInterface(contNetns ns.NetNS, containerID, ifName string, mtu int, deviceID string) (*current.Interface, *current.Interface, error)
SetupSriovInterface moves smartVF into container namespace, rename it with ifName and also returns host interface with VF's representor device
Types ¶
This section is empty.