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 support for BPF_PROG_TYPE_CGROUP_SOCKOPT #268

Merged
merged 4 commits into from May 20, 2022

Conversation

nak3
Copy link
Contributor

@nak3 nak3 commented May 20, 2022

This patch adds support for BPF_PROG_TYPE_CGROUP_SOCKOPT.

close #219

This patch adds support for `BPF_PROG_TYPE_CGROUP_SOCKOPT`.
@netlify
Copy link

netlify bot commented May 20, 2022

Deploy Preview for aya-rs ready!

Name Link
🔨 Latest commit e8287dd
🔍 Latest deploy log https://app.netlify.com/sites/aya-rs/deploys/62877fc7b6c41b00090e08fd
😎 Deploy Preview https://deploy-preview-268--aya-rs.netlify.app/settings
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@nak3
Copy link
Contributor Author

nak3 commented May 20, 2022

https://github.com/nak3/aya-showcase/tree/main/cgroup-sockopt is the demonstration for this PR.

Copy link
Collaborator

@alessandrod alessandrod left a comment

Choose a reason for hiding this comment

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

You're on a roll!

Remove the copypasta but otherwise great stuff!

aya/src/programs/cgroup_sockopt.rs Outdated Show resolved Hide resolved
nak3 added 2 commits May 20, 2022 20:46
- Fix copy & paste
- Use anyhow:Error to drop Error enum
@nak3
Copy link
Contributor Author

nak3 commented May 20, 2022

Thank you so much! Updated.

Copy link
Collaborator

@alessandrod alessandrod left a comment

Choose a reason for hiding this comment

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

small doc typo

/// A program that can be used to get or set options on sockets.
///
/// [`CgroupSockopt`] programs can be attached to a cgroup and will be called every
/// time a process executes getsockopt or getsockopt system call.
Copy link
Collaborator

Choose a reason for hiding this comment

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

getsockopt or setsockopt

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you! Updated.

@alessandrod alessandrod merged commit e68d734 into aya-rs:main May 20, 2022
fasterthanlime pushed a commit to fasterthanlime/aya that referenced this pull request May 20, 2022
@nak3 nak3 deleted the add-cgroup-sockopt branch May 21, 2022 01:53
@dave-tucker dave-tucker added feature A PR that implements a new feature or enhancement aya-bpf This is about aya-bpf (kernel) aya This is about aya (userspace) labels May 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aya This is about aya (userspace) aya-bpf This is about aya-bpf (kernel) feature A PR that implements a new feature or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for BPF_PROG_TYPE_CGROUP_SOCKOPT
4 participants