Skip to content

elf: add Module.RemoveXDPWithFlags method#275

Open
dmitris wants to merge 1 commit intoiovisor:masterfrom
dmitris:removexdp-flags
Open

elf: add Module.RemoveXDPWithFlags method#275
dmitris wants to merge 1 commit intoiovisor:masterfrom
dmitris:removexdp-flags

Conversation

@dmitris
Copy link
Copy Markdown
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