-
Notifications
You must be signed in to change notification settings - Fork 206
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 support for autoload libbpf APIs #3555
Labels
Milestone
Comments
dthaler
added a commit
to dthaler/ebpf-for-windows
that referenced
this issue
May 30, 2024
Fixes microsoft#3555 Signed-off-by: Dave Thaler <dthaler1968@gmail.com>
dthaler
added a commit
to dthaler/ebpf-for-windows
that referenced
this issue
May 30, 2024
Fixes microsoft#3555 Signed-off-by: Dave Thaler <dthaler1968@gmail.com>
dthaler
added a commit
to dthaler/ebpf-for-windows
that referenced
this issue
May 31, 2024
Fixes microsoft#3555 Signed-off-by: Dave Thaler <dthaler1968@gmail.com>
dthaler
added a commit
to dthaler/ebpf-for-windows
that referenced
this issue
May 31, 2024
Fixes microsoft#3555 Signed-off-by: Dave Thaler <dthaler1968@gmail.com>
github-merge-queue bot
pushed a commit
that referenced
this issue
Jun 3, 2024
* Implement libbpf autoload APIs Fixes #3555 Signed-off-by: Dave Thaler <dthaler1968@gmail.com> * Suppress spurious compiler warning Signed-off-by: Dave Thaler <dthaler1968@gmail.com> * Fix test failure Signed-off-by: Dave Thaler <dthaler1968@gmail.com> * Update tests Files with no program sections succeed loading Signed-off-by: Dave Thaler <dthaler1968@gmail.com> * Address PR comment from Anurag Signed-off-by: Dave Thaler <dthaler1968@gmail.com> * PR feedback Signed-off-by: Dave Thaler <dthaler1968@gmail.com> * Fix test Signed-off-by: Dave Thaler <dthaler1968@gmail.com> * Prevent changing prog type of a native program Signed-off-by: Dave Thaler <dthaler1968@gmail.com> * PR feedback Signed-off-by: Dave Thaler <dthaler1968@gmail.com> * Remove unused program_type from native load ioctl Signed-off-by: Dave Thaler <dthaler1968@gmail.com> * Update default autoload value Signed-off-by: Dave Thaler <dthaler1968@gmail.com> * PR feedback Signed-off-by: Dave Thaler <dthaler1968@gmail.com> * Fix test Signed-off-by: Dave Thaler <dthaler1968@gmail.com> * Add check to unit_test to match api_test Signed-off-by: Dave Thaler <dthaler1968@gmail.com> * Fix api_test Signed-off-by: Dave Thaler <dthaler1968@gmail.com> --------- Signed-off-by: Dave Thaler <dthaler1968@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the feature you'd like supported
libbpf.h has these APIs which are not currently supported:
Today when
bpf_object__load(object)
is called, all programs in the object get loaded regardless of whether they will ever be attached. If a caller only wants to use (say) one program in the object, this wastes memory and verification time.bpf_program__set_autoload
can be used to control, on a per program basis, whetherbpf_object__load
will or will not load the program, andbpf_program__autoload
can be used to read whether it will be loaded.Proposed solution
Implement to match equivalent functionality as standard libbpf.
Additional context
map.o for instance has 3 programs, only the last of which can actually be loaded:
The text was updated successfully, but these errors were encountered: