celbpf

package
v1.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2026 License: Apache-2.0 Imports: 23 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

CEL -> BPF code generation Heavily based on an earlier implementation by Yutaro Hayakawa <yutaro.hayakawa@isovalent.com>

Cel -> BPF code generation Heavily based on an earlier implementation by Yutaro Hayakawa <yutaro.hayakawa@isovalent.com>

Cel -> BPF code generation Heavily based on an earlier implementation by Yutaro Hayakawa <yutaro.hayakawa@isovalent.com>

CEL -> BPF code generation Heavily based on an earlier implementation by Yutaro Hayakawa <yutaro.hayakawa@isovalent.com>

Cel -> BPF code generation Heavily based on an earlier implementation by Yutaro Hayakawa <yutaro.hayakawa@isovalent.com>

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompileEmptyFunction

func CompileEmptyFunction(fnName string) asm.Instructions

func CompileFn

func CompileFn(fnName, celExpr string, sig, data []v1alpha1.KProbeArg, ret RetType) (asm.Instructions, []uint16, error)

func EnabledInBPF

func EnabledInBPF() bool

EnabledInBPF returns true if celbpf is supported in the BPF programs

func Supported

func Supported() bool

Supported returns true if celbpf is supported at runtime NB: The cel_expr code uses bpf-to-bpf calls, so we need to detect whether mixing bpf-to-bpf calls and tail-calls is allowed. See: https://lore.kernel.org/bpf/20200829231925.GB31692@ranger.igk.intel.com/T/

Types

type Env

type Env struct{}

type ExprArg

type ExprArg struct {
	GenTy     int
	ArgOffset int
}

type Provider

type Provider struct{}

func NewProvider

func NewProvider() (*Provider, error)

func (*Provider) EnumValue

func (p *Provider) EnumValue(_ string) cgRef.Val

func (*Provider) FindIdent

func (p *Provider) FindIdent(_ string) (cgRef.Val, bool)

func (*Provider) FindStructFieldNames

func (p *Provider) FindStructFieldNames(_ string) ([]string, bool)

func (*Provider) FindStructFieldType

func (p *Provider) FindStructFieldType(_, _ string) (*cgTypes.FieldType, bool)

func (*Provider) FindStructType

func (p *Provider) FindStructType(_ string) (*cgTypes.Type, bool)

func (*Provider) NewValue

func (p *Provider) NewValue(_ string, _ map[string]cgRef.Val) cgRef.Val

type RetType added in v1.8.0

type RetType int
const (
	RetBool RetType = iota
	RetInt64
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL