-
Notifications
You must be signed in to change notification settings - Fork 101
feature: Add AttachProgs/DetachProgs api for bpf object #409
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
feature: Add AttachProgs/DetachProgs api for bpf object #409
Conversation
geyslan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chentao-kernel thank you for this contrib.
As the proposal is to emulate bpf_object__attach_skeleton and bpf_object__detach_skeleton, some behaviours have to be replicated. I've put comments below.
Please check also for the selftest failure: https://github.com/aquasecurity/libbpfgo/actions/runs/8326584366/job/22782547013?pr=409
d106dae to
4d48d28
Compare
Signed-off-by: Tao Chen <[email protected]>
6199fe4 to
9f902da
Compare
Thank you for your review! |
Ok, i will check the failed case. |
Hi geyslan, the failed case seems confused, it dose not display which case really failed. And i try again, all |
Ok, disregard this, it was due to selftest/iter, possibly a network issue. |
1522093 to
6865720
Compare
|
@chentao-kernel take a look at this: chentao-kernel#2 |
6865720 to
9581375
Compare
It introduces api for bpf object like api in libbpf: bpf_object__attach_skeleton/bpf_object__detach_skeleton. So we don't need to specify the program name to attach one by one. Signed-off-by: Tao Chen <[email protected]> CC: Dylane Chen <[email protected]> Co-authored-by: Geyslan Gregório <[email protected]>
Signed-off-by: Tao Chen <[email protected]> CC: Dylane Chen <[email protected]> Co-authored-by: Geyslan Gregório <[email protected]>
9581375 to
5b49136
Compare
@geyslan Hi, geyslan, thank you for your cooperation, i have merged it. |
geyslan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
@chentao-kernel thanks again for your contribution. |

Add AttachProgs/DetachProgs api for bpf object like api in libbpf: bpf_object__attach_skeleton/bpf_object__detach_skeleton. So we don't need to specify the program name to attach one by one.