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

link: document AttachCgroup and flags #980

Merged
merged 2 commits into from
Mar 23, 2023

Conversation

ti-mo
Copy link
Collaborator

@ti-mo ti-mo commented Mar 21, 2023

Document some of the lessons learned through cilium/cilium#23557.

Also removes some papercuts from AttachCgroup resource cloning.

@ti-mo ti-mo requested review from lmb and rgo3 March 21, 2023 16:35
Copy link
Contributor

@rgo3 rgo3 left a comment

Choose a reason for hiding this comment

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

Had to double check that QueryPrograms also returns progs attached with links just one more time 😁

@ti-mo
Copy link
Collaborator Author

ti-mo commented Mar 22, 2023

Had to double check that QueryPrograms also returns progs attached with links just one more time grin

Yep, we had to find that out the hard way. 😢

link/cgroup.go Outdated Show resolved Hide resolved
link/cgroup.go Show resolved Hide resolved
@lmb
Copy link
Collaborator

lmb commented Mar 22, 2023

Had to double check that QueryPrograms also returns progs attached with links

Ooh! Now I understand why you changed the doc.

@ti-mo ti-mo requested a review from lmb March 22, 2023 14:10
link/cgroup.go Show resolved Hide resolved
…achCgroup

Prog only needs to be cloned in newProgAttachCgroup. Remove the Close() footgun,
making future modifications less tricky.

Execute PROG_ATTACH using the cloned program for good measure.

Signed-off-by: Timo Beckers <timo@isovalent.com>
Also addressed an inaccuracy in the QueryPrograms docstring. bpf_link progs
are returned through PROG_QUERY.

Clarify that BPF_F_REPLACE only affects programs attached with the Multi flag.

Signed-off-by: Timo Beckers <timo@isovalent.com>
@ti-mo ti-mo merged commit f53f2ed into cilium:master Mar 23, 2023
@ti-mo ti-mo deleted the tb/attach-cgroup-flags branch March 23, 2023 13:38
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.

3 participants