forked from iovisor/bcc
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pull out enums from main BPF class to avoid namespace collisions
In iovisor#3479, the `bpf_attach_type` enum was pulled into the `BPF` class so that its members could be used in `attach_func` and `detach_func` functions introduced to the Python API. Unfortunately this caused a redefinition of BPF.XDP, which was similarly pulled in from `bpf_prog_type` enum, thus breaking program loading (iovisor#3489). Let's pull these enum- and flag-type class variables out into their own wrapper classes. For backwards compatibility, keep them all (except for `bpf_attach_type`, which was merged 2 days ago) defined in the BPF class, but add a comment to not continue doing this.
- Loading branch information
1 parent
dc1bceb
commit 2731825
Showing
3 changed files
with
67 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters