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

elf: add Module.RemoveXDPWithFlags method #275

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dmitris
Copy link
Contributor

@dmitris dmitris commented Feb 3, 2021

PR adds a method Module.RemoveXDPWithFlags to allow unloading xdp sections loaded with SKB aka xdpgeneric flags (mode). Currently AttachXDP has a "sibling" AttachXDPWithFlags but RemoveXDP doesn't. I was playing with modifying https://github.com/sematext/oxdpus and had to resort to vendoring this repository to add RemoveXDPWithFlags function - only then I was able to unload the xdp program loaded with XDP_FLAGS_SKB_MODE [1].

[1] https://github.com/dmitris/oxdpus/blob/skb-mode-vendor/vendordeps/github.com/iovisor/gobpf/elf/module.go#L543-L550, used in https://github.com/dmitris/oxdpus/blob/skb-mode-vendor/pkg/xdp/hook.go#L80

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.

1 participant