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

feature: Add AttachProgs/DetachProgs api for bpf object #409

Merged
merged 3 commits into from
Mar 25, 2024

Conversation

chentao-kernel
Copy link
Contributor

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.

Copy link
Member

@geyslan geyslan left a 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

@chentao-kernel
Copy link
Contributor Author

@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

Thank you for your review!

@chentao-kernel
Copy link
Contributor Author

@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

Ok, i will check the failed case.

@chentao-kernel
Copy link
Contributor Author

@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

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
case were passed.
image

@geyslan
Copy link
Member

geyslan commented Mar 19, 2024

Hi geyslan, the failed case seems confused, it dose not display which case really failed. And i try again, all case were passed.

Ok, disregard this, it was due to selftest/iter, possibly a network issue.

@chentao-kernel chentao-kernel force-pushed the dylane/attach_progs branch 4 times, most recently from 1522093 to 6865720 Compare March 20, 2024 02:33
@chentao-kernel chentao-kernel requested a review from geyslan March 21, 2024 15:40
@geyslan
Copy link
Member

geyslan commented Mar 22, 2024

@chentao-kernel take a look at this: chentao-kernel#2

chentao-kernel and others added 2 commits March 23, 2024 23:43
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]>
@chentao-kernel
Copy link
Contributor Author

chentao-kernel commented Mar 23, 2024

@chentao-kernel take a look at this: chentao-kernel#2

@geyslan Hi, geyslan, thank you for your cooperation, i have merged it.

Copy link
Member

@geyslan geyslan left a comment

Choose a reason for hiding this comment

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

LGTM

@geyslan geyslan merged commit 3c5cd66 into aquasecurity:main Mar 25, 2024
14 checks passed
@geyslan
Copy link
Member

geyslan commented Mar 25, 2024

@chentao-kernel thanks again for your contribution.

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.

2 participants