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 a function to load (but not attach) an eBPF program #405

Merged
merged 1 commit into from
Sep 16, 2022

Conversation

tpapagian
Copy link
Member

This can be used to load tail call programs.

Signed-off-by: Anastasios Papagiannis [email protected]

@tpapagian tpapagian marked this pull request as ready for review September 14, 2022 07:50
@tpapagian tpapagian requested a review from a team as a code owner September 14, 2022 07:50
@tpapagian tpapagian requested a review from tixxdz September 14, 2022 07:50
@@ -139,6 +149,11 @@ func LoadKprobeProgram(bpfDir, mapDir string, load *Program, verbose int) error
return loadProgram(bpfDir, []string{mapDir}, load, KprobeAttach(load), ci, verbose)
}

func LoadTailCallProgram(bpfDir, mapDir string, load *Program, verbose int) error {
ci := &customInstall{fmt.Sprintf("%s-tail-call", load.PinPath), "kprobe"}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe %s-tail-calls with s?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, will update that now

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe I can remove this line entirely and use nil in a similar way to LoadRawTracepointProgram. Checking that now.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed that entirely

This can be used to load tail call programs.

Signed-off-by: Anastasios Papagiannis <[email protected]>
@tpapagian tpapagian force-pushed the pr/apapag/load_no_attach branch from 8c1d7aa to 31009bd Compare September 14, 2022 09:38
@kkourt kkourt merged commit 740843e into main Sep 16, 2022
@kkourt kkourt deleted the pr/apapag/load_no_attach branch September 16, 2022 05:28
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.

3 participants