Skip to content

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