Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Kernel Misc Probe #17541

Merged
merged 1 commit into from
Oct 14, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 11 additions & 0 deletions pkg/datapath/linux/probes/probes.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,17 @@ type MapTypes struct {
HaveStackMapType bool `json:"have_stack_map_type"`
}

// Kernel misc configurations kernel large 1M instructions support
type Misc struct {
HaveLargeInsnLimit bool `json:"have_large_insn_limit"`
}

// Features contains BPF feature checks returned by bpftool.
type Features struct {
SystemConfig `json:"system_config"`
MapTypes `json:"map_types"`
Helpers map[string][]string `json:"helpers"`
Misc `json:"misc"`
}

// ProbeManager is a manager of BPF feature checks.
Expand Down Expand Up @@ -306,6 +312,11 @@ func (p *ProbeManager) GetMapTypes() *MapTypes {
return &p.features.MapTypes
}

// GetMisc returns information about kernel misc.
func (p *ProbeManager) GetMisc() Misc {
return p.features.Misc
}

// GetHelpers returns information about available BPF helpers for the given
// program type.
// If program type is not found, returns nil.
Expand Down