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 DetachXDP(ifaceName string, bpffsBase, progName string) error
- 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 Params
Constants ¶
This section is empty.
Variables ¶
var Cell = cell.Module( "loader", "Loader", cell.Provide(NewLoader), cell.Provide(NewCompilationLock), )
Functions ¶
func DetachXDP ¶ added in v1.15.0
DetachXDP removes an XDP program from a network interface. On kernels before 4.15, always removes the XDP program regardless of progName.
bpffsBase is typically /sys/fs/bpf/cilium, but can be overridden to a tempdir during tests.
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 Params ¶ added in v1.16.0
type Params struct { cell.In Sysctl sysctl.Sysctl Prefilter datapath.PreFilter CompilationLock datapath.CompilationLock ConfigWriter datapath.ConfigWriter NodeHandler datapath.NodeHandler // Force map initialisation before loader. You should not use these otherwise. // Some of the entries in this slice may be nil. BpfMaps []bpf.BpfMap `group:"bpf-maps"` }