Documentation ¶
Index ¶
- Constants
- func GetUplinkMtu(params *VppManagerParams, conf *LinuxInterfaceState, includeEncap bool) int
- func TemplateScriptReplace(input string, params *VppManagerParams, conf []*LinuxInterfaceState) (template string)
- type InterfaceSpec
- type KernelVersion
- type LinuxInterfaceState
- type VppManagerParams
Constants ¶
View Source
const ( DataInterfaceSwIfIndex = uint32(1) // Assumption: the VPP config ensures this is true VppConfigFile = "/etc/vpp/startup.conf" VppConfigExecFile = "/etc/vpp/startup.exec" VppManagerStatusFile = "/var/run/vpp/vppmanagerstatus" VppManagerTapIdxFile = "/var/run/vpp/vppmanagertap0" VppManagerLinuxMtu = "/var/run/vpp/vppmanagerlinuxmtu" VppApiSocket = "/var/run/vpp/vpp-api.sock" CalicoVppPidFile = "/var/run/vpp/calico_vpp.pid" VppPath = "/usr/bin/vpp" VppNetnsName = "calico-vpp-ns" VppSigKillTimeout = 2 DefaultEncapSize = 60 // Used to lower the MTU of the routes to the cluster )
View Source
const ( DRIVER_UIO_PCI_GENERIC = "uio_pci_generic" DRIVER_VFIO_PCI = "vfio-pci" DRIVER_VIRTIO_PCI = "virtio-pci" DRIVER_I40E = "i40e" DRIVER_MLX5_CORE = "mlx5_core" DRIVER_VMXNET3 = "vmxnet3" )
Variables ¶
This section is empty.
Functions ¶
func GetUplinkMtu ¶
func GetUplinkMtu(params *VppManagerParams, conf *LinuxInterfaceState, includeEncap bool) int
func TemplateScriptReplace ¶
func TemplateScriptReplace(input string, params *VppManagerParams, conf []*LinuxInterfaceState) (template string)
Types ¶
type InterfaceSpec ¶
type KernelVersion ¶
func (*KernelVersion) IsAtLeast ¶
func (ver *KernelVersion) IsAtLeast(other *KernelVersion) bool
func (*KernelVersion) String ¶
func (ver *KernelVersion) String() string
type LinuxInterfaceState ¶
type LinuxInterfaceState struct { PciId string Driver string IsUp bool Addresses []netlink.Addr Routes []netlink.Route HardwareAddr net.HardwareAddr PromiscOn bool NumTxQueues int NumRxQueues int DoSwapDriver bool Hasv4 bool Hasv6 bool NodeIP4 string NodeIP6 string Mtu int InterfaceName string }
func (*LinuxInterfaceState) AddressString ¶
func (c *LinuxInterfaceState) AddressString() string
func (*LinuxInterfaceState) RouteString ¶
func (c *LinuxInterfaceState) RouteString() string
func (*LinuxInterfaceState) SortRoutes ¶
func (c *LinuxInterfaceState) SortRoutes()
SortRoutes sorts the route slice by dependency order, so we can then add them in the order of the slice without issues
type VppManagerParams ¶
type VppManagerParams struct { VppStartupSleepSeconds int InterfacesSpecs []InterfaceSpec ConfigExecTemplate string ConfigTemplate string NodeName string CorePattern string RxMode types.RxMode TapRxMode types.RxMode ServiceCIDRs []net.IPNet ExtraAddrCount int TapRxQueueSize int TapTxQueueSize int RxQueueSize int TxQueueSize int UserSpecifiedMtu int DefaultGWs []net.IP IfConfigSavePath string EnableGSO bool IpsecNbAsyncCryptoThread int /* Capabilities */ LoadedDrivers map[string]bool KernelVersion *KernelVersion AvailableHugePages int VfioUnsafeiommu bool }
Click to show internal directories.
Click to hide internal directories.