Documentation ¶
Overview ¶
Package linux implements the Linux specific datapath implementation
Index ¶
- Variables
- func CheckMinRequirements()
- func NewDatapath(p DatapathParams, cfg DatapathConfiguration) datapath.Datapath
- func NewNodeHandler(datapathConfig DatapathConfiguration, nodeAddressing datapath.NodeAddressing, ...) *linuxNodeHandler
- func NodeDeviceNameWithDefaultRoute() (string, error)
- func NodeEnsureLocalRoutingRule() error
- type DatapathConfiguration
- type DatapathParams
- type DeviceManager
- type DevicesConfig
- type NeighLink
- type NextHop
Constants ¶
This section is empty.
Variables ¶
var DevicesControllerCell = cell.Module( "devices-controller", "Synchronizes the device and route tables with the kernel", cell.ProvidePrivate( tables.NewDeviceTable, tables.NewRouteTable, ), cell.Provide( newDevicesController, newDeviceManager, ), cell.Invoke(func(*devicesController) {}), )
DevicesControllerCell registers a controller that subscribes to network devices and routes via netlink and populates the devices and routes devices.
Functions ¶
func CheckMinRequirements ¶
func CheckMinRequirements()
CheckMinRequirements checks that minimum kernel requirements are met for configuring the BPF datapath. If not, fatally exits.
func NewDatapath ¶
func NewDatapath(p DatapathParams, cfg DatapathConfiguration) datapath.Datapath
NewDatapath creates a new Linux datapath
func NewNodeHandler ¶
func NewNodeHandler( datapathConfig DatapathConfiguration, nodeAddressing datapath.NodeAddressing, nodeMap nodemap.Map, mtu datapath.MTUConfiguration, ) *linuxNodeHandler
NewNodeHandler returns a new node handler to handle node events and implement the implications in the Linux datapath
func NodeDeviceNameWithDefaultRoute ¶
NodeDeviceNameWithDefaultRoute returns the node's device name which handles the default route in the current namespace
func NodeEnsureLocalRoutingRule ¶
func NodeEnsureLocalRoutingRule() error
NodeEnsureLocalRoutingRule moves the kernel's default '0: from all lookup local' ip rule up to priority 100 to create space for Cilium to install rules with a lower pref (meaning a higher priority).
Cilium's 'new' rule is always installed before removing the default one with pref 0 to avoid breaking local packet delivery.
Types ¶
type DatapathConfiguration ¶
type DatapathConfiguration struct { // HostDevice is the name of the device to be used to access the host. HostDevice string // TunnelDevice is the name of the tunnel device (if any). TunnelDevice string ProcFs string }
DatapathConfiguration is the static configuration of the datapath. The configuration cannot change throughout the lifetime of a datapath object.
type DatapathParams ¶ added in v1.15.0
type DatapathParams struct { ConfigWriter datapath.ConfigWriter RuleManager datapath.IptablesManager WGAgent datapath.WireguardAgent NodeMap nodemap.Map BWManager datapath.BandwidthManager NodeAddressing datapath.NodeAddressing MTU datapath.MTUConfiguration }
type DeviceManager ¶
type DeviceManager struct {
// contains filtered or unexported fields
}
DeviceManager is a temporary compatibility bridge to keep DeviceManager uses as is and reuse its tests against DevicesController and the devices table.
This will be refactored away in follow-up PRs that convert code over to the devices table. The DirectRoutingDevice and IPv6MCastDevice would computed from the devices table as necessary.
func (*DeviceManager) Stop ¶
func (dm *DeviceManager) Stop()
type DevicesConfig ¶
type DevicesConfig struct { // Devices is the user-specified devices to use. This can be // either concrete devices ("eth0,eth1"), or a wildcard "eth+". // If empty the devices are auto-detected according to rules defined // by isSelectedDevice(). Devices []string }
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package bandwidth provides efficient EDT-based rate-limiting.
|
Package bandwidth provides efficient EDT-based rate-limiting. |
Package bigtcp provides helpers to probe and enable BIG TCP for the Linux datapath
|
Package bigtcp provides helpers to probe and enable BIG TCP for the Linux datapath |
Package ipsec provides the Linux datapath specific abstraction and useful helpers to manage IPSec via Linux xfrm.
|
Package ipsec provides the Linux datapath specific abstraction and useful helpers to manage IPSec via Linux xfrm. |
Package linux_defaults provides the Linux datapath defaults
|
Package linux_defaults provides the Linux datapath defaults |
Package modules contains a manager of loaded modules which supports search operation.
|
Package modules contains a manager of loaded modules which supports search operation. |
Package probes provides BPF features checks based on bpftool.
|
Package probes provides BPF features checks based on bpftool. |
Package route provides the Cilium specific abstraction and useful helpers to manage network routes
|
Package route provides the Cilium specific abstraction and useful helpers to manage network routes |
Package utime converts between time.Time and Unix Epoch time in 512ns time unit.
|
Package utime converts between time.Time and Unix Epoch time in 512ns time unit. |