Documentation ¶
Overview ¶
Package loader provides accessors to compilation and BPF load routines necessary for creating datapath objects and attaching them to links.
Index ¶
- Variables
- func DeviceHasSKBProgramLoaded(device string, checkEgress bool) (bool, error)
- func ELFMapSubstitutions(ep datapath.Endpoint) map[string]string
- func ELFVariableSubstitutions(ep datapath.Endpoint) map[string]uint64
- func NewCompilationLock() types.CompilationLock
- func NewLoader(p Params) datapath.Loader
- type Config
- type Params
Constants ¶
This section is empty.
Variables ¶
View Source
var Cell = cell.Module( "loader", "Loader", cell.Config(DefaultConfig), cell.Provide(NewLoader), cell.Provide(NewCompilationLock), )
View Source
var DefaultConfig = Config{
DeriveMasqIPAddrFromDevice: "",
}
Functions ¶
func DeviceHasSKBProgramLoaded ¶ added in v1.16.0
DeviceHasSKBProgramLoaded returns true if the given device has a tc(x) program attached.
If checkEgress is true, returns true if there's both an ingress and egress program attached.
func ELFMapSubstitutions ¶ added in v1.16.0
ELFMapSubstitutions returns the set of map substitutions that must occur in an ELF template object file to update map references for the specified endpoint.
func ELFVariableSubstitutions ¶ added in v1.16.0
ELFVariableSubstitutions returns the set of data substitutions that must occur in an ELF template object file to update static data for the specified endpoint.
func NewCompilationLock ¶ added in v1.16.0
func NewCompilationLock() types.CompilationLock
Types ¶
type Config ¶ added in v1.16.0
type Config struct { // DeriveMasqIPAddrFromDevice specifies which device's IP addr is used for BPF masquerade. // This is a hidden option and by default not set. Only needed in very specific setups // with ECMP and multiple devices. // See commit d204d789746b1389cc2ba02fdd55b81a2f55b76e for original context. // This can be removed once https://github.com/cilium/cilium/issues/17158 is resolved. DeriveMasqIPAddrFromDevice string }
type Params ¶ added in v1.16.0
type Params struct { cell.In Config Config Sysctl sysctl.Sysctl Prefilter datapath.PreFilter CompilationLock datapath.CompilationLock ConfigWriter datapath.ConfigWriter NodeHandler datapath.NodeHandler }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.