celbpf

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2026 License: Apache-2.0 Imports: 22 Imported by: 0

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 Compile

func Compile(celExpr string, sig []v1alpha1.KProbeArg, labelPrefix string) (asm.Instructions, []uint16, error)

func CompileEmptyFunction

func CompileEmptyFunction(fnName string) asm.Instructions

func CompileFn

func CompileFn(fnName, celExpr string, sig []v1alpha1.KProbeArg) (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

Jump to

Keyboard shortcuts

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