Documentation ¶
Overview ¶
Package linux implements the Linux specific datapath implementation
Index ¶
- Variables
- func CheckRequirements(log *slog.Logger) error
- func NewNodeHandler(lifecycle cell.Lifecycle, log *slog.Logger, tunnelConfig dpTunnel.Config, ...) (datapath.NodeHandler, datapath.NodeIDHandler, datapath.NodeNeighbors)
- func NodeDeviceNameWithDefaultRoute() (string, error)
- func NodeEnsureLocalRoutingRule() error
- type DatapathConfiguration
- 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.Invoke( statedb.RegisterTable[*tables.Device], statedb.RegisterTable[*tables.Route], ), cell.Provide( newDevicesController, ), cell.Config(DevicesConfig{}), 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 CheckRequirements ¶ added in v1.16.0
CheckRequirements checks that minimum kernel requirements are met for configuring the BPF datapath.
func NewNodeHandler ¶
func NewNodeHandler( lifecycle cell.Lifecycle, log *slog.Logger, tunnelConfig dpTunnel.Config, nodeMap nodemap.MapV2, nodeManager manager.NodeManager, ) (datapath.NodeHandler, datapath.NodeIDHandler, datapath.NodeNeighbors)
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 }
DatapathConfiguration is the static configuration of the datapath. The configuration cannot change throughout the lifetime of a datapath object.
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 // ForceDeviceDetection forces the auto-detection of devices, // even if user-specific devices are explicitly listed. ForceDeviceDetection bool }
func (DevicesConfig) Flags ¶ added in v1.16.0
func (c DevicesConfig) Flags(flags *pflag.FlagSet)
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 sysctl allows to change kernel parameters at runtime.
|
Package sysctl allows to change kernel parameters at runtime. |
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. |