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

Support for implicit context for helper functions #3645

Closed
saxena-anurag opened this issue Jun 17, 2024 · 0 comments · Fixed by #3656 or #3698
Closed

Support for implicit context for helper functions #3645

saxena-anurag opened this issue Jun 17, 2024 · 0 comments · Fixed by #3656 or #3698
Assignees
Labels
enhancement New feature or request P1 triaged Discussed in a triage meeting
Milestone

Comments

@saxena-anurag
Copy link
Contributor

There are some program type specific helper functions where the helper function signature does not take program context has input. This causes an extra overhead for extensions to store and lookup the context in some per-cpu or per-thread storage. This has a performance hit, if it is a per-packet hook.

Allowing helper function implementation to also take context as argument (along with the arguments defined in helper prototype) will save the extensions from extra overhead of storage and lookups.

This change will have 2 parts:

  1. For native mode, bpf2c change to support helper functions with implicit context.
  2. For JIT / interpret mode, ubpf changes to generate x64 code with context also passed as argument to the helper function.
@saxena-anurag saxena-anurag added the enhancement New feature or request label Jun 17, 2024
@dahavey dahavey added the triaged Discussed in a triage meeting label Jun 17, 2024
@dahavey dahavey added the P1 label Jun 17, 2024
@dahavey dahavey modified the milestones: 2406, 2407 Jun 17, 2024
@saxena-anurag saxena-anurag linked a pull request Jul 17, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P1 triaged Discussed in a triage meeting
Projects
None yet
2 participants