types

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NetConf

type NetConf struct {
	types.NetConf
	// enable debug logging
	Debug bool `json:"debug,omitempty"`
	// bridge used to attach representor to it, default is "cni0"
	// can contain comma separated list, e.g. bridge1,bridge2
	Bridge string `json:"bridge,omitempty"`
	// VLAN ID for VF
	Vlan int `json:"vlan,omitempty"`
	// VLAN Trunk configuration
	Trunk []Trunk `json:"trunk"`
	// enable setting matching vlan tags on the bridge uplink interface, default is false
	SetUplinkVlan bool `json:"setUplinkVlan"`
	// MAC as top level config option; required for CNIs that don't support runtimeConfig
	MAC string `json:"mac,omitempty"`
	// MTU for VF and representor
	MTU int `json:"mtu"`
	// PCI address of a VF in valid sysfs format
	DeviceID      string `json:"deviceID"`
	RuntimeConfig struct {
		Mac               string `json:"mac,omitempty"`
		CNIDeviceInfoFile string `json:"CNIDeviceInfoFile,omitempty"`
	} `json:"runtimeConfig,omitempty"`
}

NetConf extends types.NetConf for accelerated-bridge-cni defines accelerated-bridge-cni public API

type PluginConf

type PluginConf struct {
	NetConf
	// IsUserspaceDriver indicate that VF using userspace driver
	IsUserspaceDriver bool
	// Stores the original VF state as it was prior to any operations done during cmdAdd flow
	OrigVfState VfState `json:"orig_vf_state"`
	// Stores the original Representor state as it was prior to any operations done during cmdAdd flow
	OrigRepState RepState `json:"orig_rep_state"`
	// Name of the PF to which VF belongs
	PFName string `json:"pf_name"`
	// ActualBridge is a linux bridge name to which PF is attached
	ActualBridge string `json:"actual_bridge"`
	// MAC which should be set for VF
	MAC string `json:"mac"`
	// MTU for VF and representor
	MTU int `json:"mtu"`
	// VF's representor attached to the bridge; used during deletion
	Representor string `json:"representor"`
	// VF index
	VFID int `json:"vfid"`
	// VF names after in the container; used during deletion
	ContIFNames string `json:"cont_if_names"`
	// Internal presentation of VLAN Trunk config
	Trunk []int `json:"trunk"`
}

PluginConf is a internal representation of config options and state

type RepState added in v0.4.0

type RepState struct {
	MTU int `json:"mtu"`
}

RepState represents the state of the Representor

type Trunk

type Trunk struct {
	MinID *int `json:"minID,omitempty"`
	MaxID *int `json:"maxID,omitempty"`
	ID    *int `json:"id,omitempty"`
}

Trunk represents configuration options for VLAN trunk

type VfState

type VfState struct {
	HostIFName   string `json:"host_if_name"`
	AdminMAC     string `json:"admin_mac"`
	EffectiveMAC string `json:"effective_mac"`
	MTU          int    `json:"mtu"`
}

VfState represents the state of the VF

Jump to

Keyboard shortcuts

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