Documentation ¶
Index ¶
- func CalculateIfaceName(chosenName, defaultName string) string
- func ConvertCniResult(rawCniResult types.Result) *current.Result
- func DelegateInterfaceDelete(danmClient danmclientset.Interface, netInfo *danmtypes.DanmNet, ...) error
- func DelegateInterfaceSetup(danmClient danmclientset.Interface, netInfo *danmtypes.DanmNet, ...) (*current.Result, error)
- func IsDelegationRequired(danmClient danmclientset.Interface, nid, namespace string) (bool, *danmtypes.DanmNet, error)
- type DpdkOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateIfaceName ¶
CalculateIfaceName decides what should be the name of a container's interface. If a name is explicitly set in the related DanmNet API object, the NIC will be named accordingly. If a name is not explicitly set, then DANM will name the interface ethX where X=sequence number of the interface
func ConvertCniResult ¶
ConvertCniResult converts a CNI result from an older API version to the latest format Returns nil if conversion is unsuccessful
func DelegateInterfaceDelete ¶
func DelegateInterfaceDelete(danmClient danmclientset.Interface, netInfo *danmtypes.DanmNet, ep *danmtypes.DanmEp) error
DelegateInterfaceDelete delegates Ks8 Pod network interface delete task to the input 3rd party CNI plugin Returns an error if interface creation was unsuccessful, or if the 3rd party CNI config could not be loaded
func DelegateInterfaceSetup ¶
func DelegateInterfaceSetup(danmClient danmclientset.Interface, netInfo *danmtypes.DanmNet, ep *danmtypes.DanmEp) (*current.Result, error)
DelegateInterfaceSetup delegates K8s Pod network interface setup task to the input 3rd party CNI plugin Returns the CNI compatible result object, or an error if interface creation was unsuccessful, or if the 3rd party CNI config could not be loaded
func IsDelegationRequired ¶
func IsDelegationRequired(danmClient danmclientset.Interface, nid, namespace string) (bool, *danmtypes.DanmNet, error)
IsDelegationRequired decides if the interface creation operations should be delegated to a 3rd party CNI, or can be handled by DANM Decision is made based on the NetworkType parameter of the DanmNet object
Types ¶
type DpdkOption ¶
type DpdkOption struct { // The name of kernel NIC driver NicDriver string `json:"kernel_driver"` // The name of DPDK capable driver DpdkDriver string `json:"dpdk_driver"` // Path to the dpdk-devbind.py script DpdkTool string `json:"dpdk_tool"` }
DpdkOption represents the DPDK options for the sriov plugin