driver

package
v0.0.0-...-b8d6f3f Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2019 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SRIOV_ENABLED  = "enabled"
	SRIOV_DISABLED = "disabled"
)

Variables

This section is empty.

Functions

func BuildNetworkOptions

func BuildNetworkOptions(nwDbEntry *Db_Network_Info) (map[string]string, error)

func Del_Nw_Config_From_DB

func Del_Nw_Config_From_DB(nwKey string) error

func FindVFDirForNetdev

func FindVFDirForNetdev(pfNetdevName string, vfNetdevName string) (string, error)

func GetChildNetdevListByPort

func GetChildNetdevListByPort(netdevName string) ([]string, error)

func GetNetdevicePortMap

func GetNetdevicePortMap() []ndevPortMap

func GetVFDefaultMacAddr

func GetVFDefaultMacAddr(vfNetdevName string) (string, error)

func GetVfPciDevList

func GetVfPciDevList(name string) ([]string, error)

func IsNetworkIdValid

func IsNetworkIdValid(id string) bool

func IsSRIOVSupported

func IsSRIOVSupported(netdevName string) bool

func SetPFLinkUp

func SetPFLinkUp(parentNetdev string) error

func SetVFDefaultMacAddress

func SetVFDefaultMacAddress(parentNetdev string, vfDir string, vfNetdevName string) error

func SetVFPrivileged

func SetVFPrivileged(parentNetdev string, vfDir string, privileged bool) error

func SetVFVlan

func SetVFVlan(parentNetdev string, vfDir string, vlan int) error

func StartDriver

func StartDriver() (*driver, error)

func Write_Nw_Config_to_DB

func Write_Nw_Config_to_DB(nwKey string, nw *Db_Network_Info) error

Types

type DB_Endpoint

type DB_Endpoint struct {
	Version   uint32 `json:"Version"`
	HwAddress string `json:"Hw_Address"`
}

Endpoint config.json

type Db_Network

type Db_Network struct {
	NetworkID string
	Info      Db_Network_Info
}

func Read_Past_Config

func Read_Past_Config(configDir string) ([]*Db_Network, error)

type Db_Network_Info

type Db_Network_Info struct {
	Version    uint32 `json:"Version"`
	Netdev     string `json:"Netdevice"`
	Mode       string `json:"Mode"`
	Subnet     string `json:"Subnet"`
	Gateway    string `json:"Gateway"`
	Vlan       int    `json:"vlan"`
	Privileged bool   `json:"Privileged"`
}

Network config.json

func Read_Nw_Config_From_DB

func Read_Nw_Config_From_DB(nwKey string) (*Db_Network_Info, error)

type NwIface

type NwIface interface {
	CreateNetwork(d *driver, genNw *genericNetwork,
		nid string, options map[string]string,
		ipv4Data *network.IPAMData) error
	DeleteNetwork(d *driver, req *network.DeleteNetworkRequest)

	CreateEndpoint(r *network.CreateEndpointRequest) (*network.CreateEndpointResponse, error)
	DeleteEndpoint(endpoint *ptEndpoint)
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

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