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

features: implement probes for StructOps maps and programs #746

Merged
merged 3 commits into from Aug 1, 2022

Conversation

ti-mo
Copy link
Collaborator

@ti-mo ti-mo commented Jul 22, 2022

Turns out this was never really blocking: #344. Specifying any invalid vmlinux type id when creating a map is enough to get some information other than EINVAL.

features/prog.go Show resolved Hide resolved
features/map.go Outdated Show resolved Hide resolved
features/map.go Show resolved Hide resolved
features/map.go Outdated Show resolved Hide resolved
features/map.go Outdated Show resolved Hide resolved
@ti-mo ti-mo requested review from lmb and rgo3 July 27, 2022 09:37
features/prog.go Outdated Show resolved Hide resolved
@ti-mo ti-mo marked this pull request as draft July 27, 2022 15:10
@ti-mo ti-mo force-pushed the tb/struct-ops-probes branch 2 times, most recently from 1e40754 to 667f06d Compare July 29, 2022 10:56
Remove all variables declared in createMapTypeAttr in favor of
writing values directly into a MapCreateAttr.

Signed-off-by: Timo Beckers <timo@isovalent.com>
With the libbpf feature probe API being reworked a while back, a probe for
StructOps maps was also implemented. Setting an invalid vmlinux type id
and checking for ENOTSUPP signals the map's availability.

Signed-off-by: Timo Beckers <timo@isovalent.com>
ENOTSUPP means the program type is available.

Signed-off-by: Timo Beckers <timo@isovalent.com>
@ti-mo ti-mo marked this pull request as ready for review July 29, 2022 12:49
@ti-mo ti-mo merged commit 7fb0b56 into cilium:master Aug 1, 2022
@ti-mo ti-mo deleted the tb/struct-ops-probes branch August 1, 2022 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants